.auth-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.auth-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: 32px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.input-group {
    position: relative;
    margin-bottom: 15px;
    text-align: left;
}

.auth-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.auth-input.input-error {
    border-color: #ef4444;
    background: #fef2f2;
}

.error-msg {
    display: block;
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 4px;
    margin-left: 10px;
    height: 12px;
}

.auth-btn {
    width: 100%;
    padding: 16px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 18px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-btn.disabled {
    background: #1e293b;
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.auth-close {
    position: absolute;
    top: 24px; right: 24px;
    background: #f1f5f9 !important;
    border: none !important;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: #64748b;
}

.auth-footer { margin-top: 30px; font-size: 0.8rem; color: #94a3b8; }
.auth-switch { margin-top: 20px; color: #64748b; }
.auth-switch a { color: #2563eb; text-decoration: none; font-weight: 600; }

.server-error {
    background: #fef2f2;
    color: #ef4444;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #fee2e2;
    text-align: center;
    display: none;
}

.server-error:not(:empty) {
    display: block;
}

.auth-card.shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

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

.auth-input.input-error {
    border-color: #ef4444 !important;
    background: #fff1f1 !important;
}

.timer-container {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #64748b;
}

.spam-hint {
    margin-top: 15px;
    font-size: 0.8rem;
    color: #94a3b8;
    background: #f8fafc;
    padding: 10px;
    border-radius: 12px;
}

.spam-hint b {
    color: #475569;
}

.timer-container .auth-link {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 700;
}

.auth-switch-top {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 20px;
    text-align: center;
}

.auth-switch-top a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #000;
}

.auth-divider:not(:empty)::before {
    margin-right: .5em;
}

.auth-divider:not(:empty)::after {
    margin-left: .5em;
}

.divider-text {
    font-size: 0.8rem;
    color: #000;
    text-transform: lowercase;
    font-weight: 500;
}

.social-auth-container {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.google-circle-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.google-circle-btn:hover {
    background: #f8fafc;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.google-circle-btn img {
    width: 24px;
    height: 24px;
}

@media (max-width: 600px) {
    .auth-overlay {
        align-items: flex-end;
        padding: 0;
        background: rgba(0, 0, 0, 0.5);
    }

    .auth-card {
        max-width: 100%;
        padding: 32px 20px 40px 20px;
        border-radius: 24px 24px 0 0;
        animation: slideUp 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        box-shadow: 0 -10px 25px rgba(0,0,0,0.1);
    }

    .auth-card::before {
        content: '';
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #e2e8f0;
        border-radius: 2px;
    }

    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .auth-input {
        padding: 18px 20px;
        font-size: 16px;
        border-radius: 14px;
    }

    .auth-btn {
        padding: 18px;
        border-radius: 16px;
        font-size: 1.1rem;
    }

    .auth-close {
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
        background: #f8fafc !important;
    }

    .auth-card h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .google-circle-btn {
        width: 60px;
        height: 60px;
    }

    .google-circle-btn img {
        width: 28px;
        height: 28px;
    }

    .auth-divider {
        margin: 30px 0 20px 0;
    }

    .auth-footer {
        margin-top: 25px;
        padding: 0 10px;
    }
}