/* ========================================
   AUTH LIBRARY - Unified Auth Styles
   ======================================== */

/* --- Welcome Page Specific --- */
.welcome-container {
    text-align: center;
}

.welcome-logo {
    margin: 0 auto 30px;
}

.welcome-logo img {
    height: 64px;
    transition: transform 0.3s ease;
}

.welcome-logo img:hover {
    transform: scale(1.05);
}

h1 {
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 15px;
    margin-bottom: 40px;
}

/* --- Auth Buttons Container --- */
.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- Base Auth Button Styles --- */
.auth-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

/* Ripple effect for auth buttons */
.auth-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-btn:active::before {
    width: 300px;
    height: 300px;
}

/* --- Sign In Button (Primary Dark) --- */
.signin-btn {
    background: #1a1a1a;
    color: #fff;
}

.signin-btn:hover:not(.loading) {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.signin-btn:active:not(.loading) {
    transform: translateY(0);
}

/* --- Google Button --- */
.google-btn {
    background: #4285F4;
    color: white;
}

.google-btn:hover:not(.loading) {
    background: #357ae8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.3);
}

.google-btn:active:not(.loading) {
    transform: translateY(0);
}

.google-icon {
    width: 20px;
    height: 20px;
}

/* --- Guest Button (Secondary) --- */
.guest-btn {
    background: #f4f4f4;
    color: #666;
}

.guest-btn:hover:not(.loading) {
    background: #e5e5e5;
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.guest-btn:active:not(.loading) {
    transform: translateY(0);
}

/* --- Loading State for Auth Buttons --- */
.auth-btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    right: 20px;
}

/* --- Divider (or separator) --- */
.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #999;
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
}

.divider span {
    padding: 0 15px;
}

/* --- Footer Text & Links --- */
.footer-text {
    margin-top: 30px;
    font-size: 13px;
    color: #888;
}

.footer-text a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.footer-text a:hover {
    text-decoration: underline;
}

/* --- Form Transitions (Sign Up / Log In toggle) --- */
#name-group {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 120px;
    opacity: 1;
    overflow: hidden;
    margin-bottom: 0;
}

#name-group.hidden {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    pointer-events: none;
}

.transitioning {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-state {
    opacity: 0;
    transform: translateY(-5px);
}

/* --- Verify Page Specific --- */
.verify-container {
    text-align: center;
}

.code-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 30px 0;
}

.code-input {
    width: 50px;
    height: 60px;
    font-size: 24px;
    text-align: center;
    border: 2px solid #eee;
    border-radius: 10px;
    transition: all 0.2s;
    font-weight: 500;
    background: #fcfcfc;
}

.code-input:focus {
    outline: none;
    border-color: #1a1a1a;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.code-input.filled {
    border-color: #1a1a1a;
    background: white;
}

.code-input.error {
    border-color: #f44336;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.resend-section {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.resend-link {
    color: #1a1a1a;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    transition: all 0.2s ease;
}

.resend-link:hover {
    color: #007bff;
}

.resend-link.disabled {
    color: #999;
    text-decoration: none;
    cursor: not-allowed;
}

#countdown-timer {
    margin-left: 8px;
    font-weight: 500;
}

/* --- Hidden Elements --- */
#hiddenGoogleBtn {
    position: absolute;
    top: -9999px;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* --- Set Password Container --- */
.set-password-container {
    /* Uses default card styles from master.css */
}

/* --- Responsive Design --- */
@media (max-width: 480px) {
    .welcome-logo img {
        height: 48px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    .code-inputs {
        gap: 8px;
    }
    
    .code-input {
        width: 45px;
        height: 55px;
        font-size: 20px;
    }
    
    .auth-btn {
        padding: 14px;
    }
}
