/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 420px;
    animation: slideIn 0.5s ease;
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: var(--spacing-xxl);
}

.logo-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--spacing-lg);
    background: var(--surface);
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 0 2px var(--primary), 0 0 30px rgba(0, 255, 136, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.logo-section h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo-section p {
    color: var(--text-secondary);
}

/* Auth Form */
.auth-form {
    background: var(--surface);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.2);
    backdrop-filter: blur(10px);
}

/* Google Sign-In Button */
.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    width: 100%;
    padding: var(--spacing-md);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: var(--spacing-lg);
}

.google-signin-btn:hover {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    background: var(--surface-light);
    text-decoration: none;
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Apple Sign-In Button */
.apple-signin-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    width: 100%;
    padding: var(--spacing-md);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: var(--spacing-lg);
    cursor: pointer;
    font-size: 1rem;
}

.apple-signin-button:hover {
    background: var(--surface-light);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    text-decoration: none;
    color: var(--primary);
    transform: translateY(-2px);
}

.apple-logo {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Terms text styling */
.terms-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: var(--spacing-lg);
    line-height: 1.4;
}

.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.auth-form h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* Phone Input */
.phone-input-container {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.country-select {
    flex: 0 0 auto;
    width: 130px !important;
    padding-right: calc(var(--spacing-md) + 20px);
    padding-left: var(--spacing-sm);
    overflow: visible;
    text-overflow: unset;
    background-position: right var(--spacing-sm) center;
    background-size: 16px;
}

#phoneNumber {
    flex: 1;
}

/* Code Input */
.code-input-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.code-digit {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    padding: var(--spacing-md) 0;
    background: var(--background);
    border: 2px solid var(--border);
}

.code-digit:focus {
    border-color: var(--primary);
    background: var(--surface);
}

/* Resend Section */
.resend-section {
    text-align: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border);
}

.resend-section p {
    margin-bottom: var(--spacing-sm);
    font-size: 0.875rem;
}

/* Back Button */
.back-btn {
    margin-top: var(--spacing-md);
}

/* Button States */
.primary-btn .btn-text {
    transition: opacity var(--transition-base);
}

.primary-btn .loader {
    position: absolute;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.primary-btn.loading .btn-text {
    opacity: 0;
}

.primary-btn.loading .loader {
    opacity: 1;
}

/* Error Message */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-lg);
    text-align: center;
    font-size: 0.875rem;
    display: none;
    animation: slideIn 0.3s ease;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

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

/* Phone Display */
#phoneDisplay {
    color: var(--primary);
    font-weight: 600;
}

/* OAuth Styles */
.auth-content {
    text-align: center;
}

.auth-content h2 {
    margin-bottom: var(--spacing-sm);
}

.auth-content .subtitle {
    margin-bottom: var(--spacing-xl);
}

/* Google Sign In Button */
.g_id_signin {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: var(--spacing-lg) 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.divider span {
    position: relative;
    padding: 0 var(--spacing-md);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 0.875rem;
}


/* Terms Text */
.terms-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-lg);
    line-height: 1.5;
}

/* Success Message */
.success-message {
    background: rgba(34, 197, 94, 0.1);
    color: rgb(34, 197, 94);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-lg);
    text-align: center;
    font-size: 0.875rem;
    display: none;
    animation: slideIn 0.3s ease;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.success-message:not(:empty) {
    display: block;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-form {
        padding: var(--spacing-lg);
    }
    
    .logo-circle {
        width: 100px;
        height: 100px;
    }
    
    .code-digit {
        font-size: 1.25rem;
    }
    
    .country-select {
        width: 120px !important;
    }
    
    .apple-button-content {
        width: 100%;
        max-width: 300px;
    }
}