/* ========================================
   LOCK SCREEN STYLES
   ======================================== */

/* CSS Custom Properties (Variables) */
:root {
    --lock-bg-color: #FAEBD7;
    --lock-text-color: #000000;
    --lock-error-color: #FF3333;
    --lock-border-color: #000000;
    --lock-hover-bg: rgba(0, 0, 0, 0.05);
    --lock-font-family: 'Pacifico', system-ui, sans-serif;
    --lock-transition: all 0.3s ease;
    --lock-z-index: 9999;
}

/* ========================================
   BASE STYLES
   ======================================== */

/* Reset and base styles for lock screen */
html, body {
    background: var(--lock-bg-color) !important;
    background-image: none !important;
    font-family: var(--lock-font-family);
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    overflow: hidden;
    position: relative;
    color: var(--lock-text-color);
}

/* Hide any existing body pseudo-elements */
body::before { 
    display: none; 
}

/* Ensure body is visible on lock screen */
body {
    visibility: visible !important;
}

/* ========================================
   LOCK SCREEN CONTAINER
   ======================================== */

.lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: var(--lock-z-index);
    transition: transform 0.5s ease;
    font-family: var(--lock-font-family);
    font-weight: 100;
}

.lock-box {
    padding: 10px;
    border-radius: 12px;
    text-align: center;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

.lock-screen h1 {
    color: var(--lock-text-color);
    margin: 10px;
    padding: 12px;
    font-size: 2.5rem;
    font-weight: 100;
}

.lock-screen h2 {
    color: var(--lock-text-color);
    margin: 10px;
    padding: 12px;
    font-size: 1.5rem;
    font-weight: 100;
}

/* ========================================
   INPUT STYLES
   ======================================== */

.date-input {
    width: 280px;
    max-width: 90%;
    padding: 12px 24px;
    margin: 10px auto;
    display: block;
    border: 2px solid var(--lock-border-color);
    border-radius: 25px;
    font-size: 1rem;
    text-align: center;
    font-family: var(--lock-font-family);
    background: transparent;
    color: var(--lock-text-color);
    transition: var(--lock-transition);
    outline: none;
}

.date-input:focus {
    border-color: var(--lock-text-color);
    background: rgba(0, 0, 0, 0.02);
}

.date-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

/* Error state for input */
.date-input.error {
    border-color: var(--lock-error-color);
    animation: shake 0.4s ease;
}

/* ========================================
   BUTTON STYLES
   ======================================== */

.unlock-btn {
    padding: 12px 32px;
    margin: 10px;
    border: 2px solid var(--lock-border-color);
    border-radius: 25px;
    background: transparent;
    color: var(--lock-text-color);
    font-size: 1rem;
    font-family: var(--lock-font-family);
    cursor: pointer;
    transition: var(--lock-transition);
    outline: none;
}

.unlock-btn:hover {
    background: var(--lock-hover-bg);
    transform: scale(1.03);
}

.unlock-btn:active {
    transform: scale(0.98);
}

/* ========================================
   ERROR MESSAGE
   ======================================== */

.error-message {
    color: var(--lock-error-color);
    font-size: 0.9rem;
    margin-top: 8px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message:not(:empty) {
    opacity: 1;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.error-animation {
    animation: shake 0.4s ease;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 480px) {
    .lock-screen h1 {
        font-size: 2rem;
        padding: 8px;
    }

    .lock-screen h2 {
        font-size: 1.2rem;
        padding: 8px;
    }

    .date-input {
        width: 240px;
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .unlock-btn {
        padding: 10px 28px;
        font-size: 0.95rem;
    }
}
