/* Force auth-container 5px below header */
.auth-page #header-placeholder + .auth-container {
    margin-top: 5px !important;
}
@media (max-width: 400px) {
    header {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100vw !important;
        min-width: 0 !important;
        max-width: 100vw !important;
        box-sizing: border-box;
    }
    
    .auth-logo {
        text-align: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .logo-icon {
        width: 48px !important;
        height: 48px !important;
        margin-bottom: 10px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .icon-3d-layer, .layer-1, .layer-2, .layer-3 {
        font-size: 1.2rem !important;
    }
    
    /* User type selector for ultra-small screens - sizing only */
    .user-type-selector {
        margin-bottom: 1rem;
        gap: 0.6rem;
        padding: 0.5rem;
    }
    
    .type-option {
        padding: 0.8rem 0.6rem;
        gap: 0.8rem;
    }
    
    .type-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    
    .type-option span {
        font-size: 0.85rem;
        font-weight: 500;
        line-height: 1.2;
    }
    
    .auth-logo h2 {
        font-size: 1.1rem !important;
        margin-bottom: 0.3rem !important;
        text-align: center !important;
    }
    .auth-logo p {
        font-size: 0.8rem !important;
        text-align: center !important;
    }
    
    /* Fix white space - connect auth container directly to header */
    .auth-container {
        min-height: calc(100vh - 70px) !important;
        margin-top: 5px !important;
        padding-top: 0 !important;
        align-items: flex-start !important;
    }
    
    .auth-card {
        margin-top: 0 !important;
        border-radius: 0 0 16px 16px !important;
    }
    
    .step-progress {
        top: -20px !important;
        border-radius: 6px 6px 0 0 !important;
        padding: 6px 12px !important;
    }
}
/* Authentication Styles - Modern Vibrant Theme */
/* Uses standardized color variables from main.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3a 50%, #2d1b69 100%);
    color: #ffffff; /* fallback for var(--text-light) */
    color: var(--text-light, #ffffff);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 1rem 1rem 1rem;
    position: relative;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-robot,
.floating-chip,
.floating-gear,
.floating-circuit {
    position: absolute;
    font-size: 3rem;
    color: rgba(139, 92, 246, 0.15);
    animation: float 8s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.3));
}

.floating-robot {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-chip {
    top: 20%;
    right: 15%;
    animation-delay: 1.5s;
}

.floating-gear {
    bottom: 15%;
    left: 15%;
    animation-delay: 3s;
}

.floating-circuit {
    bottom: 25%;
    right: 10%;
    animation-delay: 4.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* Auth Card */
.auth-card {
    background: linear-gradient(135deg, rgba(26, 26, 58, 0.95) 0%, rgba(45, 27, 105, 0.9) 100%);
    border-radius: 0 0 24px 24px;
    padding: 0.5rem;
    padding-top: 0.5rem;
    width: 100%;
    max-width: 520px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-top: none;
    /* Browser compatibility for backdrop-filter */
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    /* Fallback for browsers without backdrop-filter support */
    background: linear-gradient(135deg, rgba(26, 26, 58, 0.98) 0%, rgba(45, 27, 105, 0.95) 100%);
    position: relative;
    overflow: hidden;
}

/* Mobile performance overrides: reduce blur/shadows on coarse pointers */
@media (max-width: 768px), (pointer: coarse) {
  .auth-card {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .mobile-menu {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
  }
  .auth-brand img { filter: none !important; }
}

.auth-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 70%),
        radial-gradient(circle at 70% 70%, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: 0;
}

/* Logo Section */
.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    color: white;
    box-shadow:
        0 15px 35px rgba(139, 92, 246, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: pulse 3s ease-in-out infinite;
    position: relative;
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8b5cf6, #06b6d4, #f59e0b, #ec4899);
    border-radius: 50%;
    z-index: -1;
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
    }
}

.auth-logo h2 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.auth-logo p {
    color: #94a3b8;
    font-size: 0.95rem;
}

/* User Type Selector - Mobile First */
.user-type-selector {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, rgba(26, 26, 58, 0.8) 0%, rgba(45, 27, 105, 0.6) 100%);
    padding: 0.8rem;
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Desktop: 3-column layout only on large screens */
@media (min-width: 769px) {
    .user-type-selector {
        grid-template-columns: repeat(3, 1fr);
    }
}

.type-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem;
    gap: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    background: rgba(30, 41, 59, 0.5);
}

/* Desktop: vertical layout for cards only on large screens */
@media (min-width: 769px) {
    .type-option {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 1rem 0.5rem;
        gap: 0.5rem;
    }
}

.type-option:hover {
    background: rgba(59, 130, 246, 0.1);
}

.type-option.active {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    box-shadow:
        0 8px 25px rgba(139, 92, 246, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.type-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* Desktop: add margin-bottom only on large screens */
@media (min-width: 769px) {
    .type-icon {
        margin-bottom: 0.5rem;
    }
}

.type-option.active .type-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.type-option span {
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
}

/* Desktop: smaller centered text only on large screens */
@media (min-width: 769px) {
    .type-option span {
        font-size: 0.8rem;
        text-align: center;
    }
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

/* Reduce spacing for register page specifically */
.register-page .auth-form {
    gap: 0.8rem;
    padding: 0.8rem;
}

.register-page .form-group {
    margin-bottom: 0.3rem;
}

/* Reduce spacing for login page specifically */
.login-page .auth-form {
    gap: 0.8rem;
    padding: 0.8rem;
}

.login-page .form-group {
    margin-bottom: 0.3rem;
}

/* Mobile adjustments for better spacing */
@media (max-width: 768px) {
    .auth-container {
        padding: 15px 0.5rem 0.5rem 0.5rem;
    }
    
    .register-page .auth-form,
    .login-page .auth-form {
        gap: 0.6rem;
        padding: 0.6rem;
    }
    
    .register-page .form-group,
    .login-page .form-group {
        margin-bottom: 0.2rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 10px 0.25rem 0.25rem 0.25rem;
    }
    
    .register-page .auth-form,
    .login-page .auth-form {
        gap: 0.5rem;
        padding: 0.5rem;
    }
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    position: relative;
    margin-bottom: 0.5rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    z-index: 2;
    transition: all 0.3s ease;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1.2rem 1.2rem 1.2rem 3.2rem;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(26, 26, 58, 0.9) 0%, rgba(45, 27, 105, 0.8) 100%);
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
    /* Browser compatibility for backdrop-filter */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.form-group input::placeholder,
.form-group select::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #3b82f6;
    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.3),
        0 8px 25px rgba(59, 130, 246, 0.2);
    outline: none;
    background: linear-gradient(135deg, rgba(26, 26, 58, 0.95) 0%, rgba(45, 27, 105, 0.9) 100%);
    transform: translateY(-2px);
    color: #ffffff;
}

.form-group input:focus + label,
.form-group select:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group select:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 0.8rem;
    font-size: 0.75rem;
    background: #1a1a3a;
    padding: 0 0.5rem;
    color: #1e3a8a;
    z-index: 3;
    /* Improve browser compatibility */
    -webkit-transform: none;
    -moz-transform: none;
    transform: none;
}

.form-group label {
    position: absolute;
    left: 3.2rem;
    top: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 2;
    font-weight: 500;
    background: transparent;
    padding: 0 0.3rem;
    font-size: 0.9rem;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    z-index: 2;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

/* Forgot Password: page-specific helpers */
.auth-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0.75rem 1rem 0.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    margin: 0 1rem 1rem 1rem;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.5rem 1rem 1rem 1rem;
}

.radio-group {
    display: inline-flex;
    gap: 1rem;
    align-items: center;
}
.radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
}

.otp-row,
.password-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
    align-items: center;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.btn-primary {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
}
.btn-secondary {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}
.btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
}

.help-text {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.timer-text {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: #f59e0b;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.link-muted {
    color: #94a3b8;
    text-decoration: none;
}
.link-muted:hover {
    color: #e2e8f0;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .otp-row,
    .password-row {
        grid-template-columns: 1fr;
    }
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input:checked + .checkmark {
    background: #1e3a8a;
    border-color: #1e3a8a;
}

.checkbox-container input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 0.8rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-link {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #1e3a8a;
}

/* Auth Button */
.auth-btn {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow:
        0 8px 25px rgba(139, 92, 246, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.auth-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 15px 35px rgba(139, 92, 246, 0.4),
        0 5px 15px rgba(6, 182, 212, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.auth-btn:active {
    transform: translateY(0);
}

.btn-loader {
    display: none;
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.auth-btn.loading .btn-loader {
    display: block;
}

.auth-btn.ready {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow:
        0 8px 25px rgba(16, 185, 129, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    animation: pulse-ready 2s ease-in-out infinite;
}

@keyframes pulse-ready {
    0%, 100% {
        box-shadow:
            0 8px 25px rgba(16, 185, 129, 0.4),
            0 0 0 1px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow:
            0 12px 35px rgba(16, 185, 129, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.3);
    }
}

/* Auth Divider */
.auth-divider {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    background: #1a1a3a;
    padding: 0 1rem;
    color: #8fff00;
    font-size: 0.9rem;
}

/* Auth Switch */
.auth-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.5);
}

.auth-switch:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--secondary);
    transform: translateY(-2px);
}

/* User Fields */
.user-fields {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Select Dropdown Styles */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.form-group select option {
    background: #1a1a3a;
    color: #ffffff;
}

/* Checkbox Links */
.checkbox-container a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.checkbox-container a:hover {
    color: #1e3a8a;
    text-decoration: underline;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}

.toast.warning {
    background: #f59e0b;
}

/* Field Error Styles */
.field-error {
    color: #ef4444 !important;
    font-size: 0.8rem !important;
    margin-top: 0.25rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.form-group input.error,
.form-group select.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 0.5rem;
        min-height: 100vh;
        min-height: 100svh; /* Modern viewport height */
        /* Ensure proper scrolling on mobile */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Hide animated background elements on mobile for better card visibility */
    .animated-bg {
        opacity: 0.3;
    }

    .floating-robot,
    .floating-chip,
    .floating-gear,
    .floating-circuit {
        display: none; /* Completely hide floating elements on mobile */
    }

    /* Fix mobile card sizing */
    .auth-card {
        width: calc(100vw - 1rem);
        max-width: calc(100vw - 1rem);
        margin: 0.5rem auto;
        box-sizing: border-box;
    }

    .auth-card {
        padding: 2rem 1.5rem;
        margin: 0.5rem;
        width: 100%;
        max-width: none;
        border-radius: 20px;
        /* Make card more prominent on mobile */
        background: linear-gradient(135deg, rgba(26, 26, 58, 0.98) 0%, rgba(45, 27, 105, 0.95) 100%);
        box-shadow:
            0 20px 40px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(139, 92, 246, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Mobile styles are already default, no overrides needed */

    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    /* Improve form visibility on mobile */
    .form-group input,
    .form-group select {
        font-size: 1.1rem; /* Prevent zoom on iOS */
        padding: 1.4rem 1.4rem 1.4rem 3.4rem;
    }

    .form-group label {
        left: 3.2rem;
        font-size: 0.9rem;
    }

    /* Make buttons more touch-friendly */
    .auth-btn {
        min-height: 60px;
        font-size: 1.2rem;
    }

    .otp-btn {
        min-height: 40px;
        font-size: 0.9rem;
    }

    /* Center auth logo on mobile */
    .auth-logo {
        text-align: center !important;
    }

    .logo-icon {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .auth-logo h2,
    .auth-logo p {
        text-align: center !important;
    }
}

/* OnePlus 12R and similar modern smartphones (393x852) */
@media (max-width: 420px) and (min-height: 800px) {
    .auth-container {
        padding: 0.5rem;
        min-height: 100vh;
    }

    .auth-card {
        padding: 1.8rem 1.2rem;
        margin: 0.3rem;
        border-radius: 18px;
        width: calc(100vw - 1rem);
        max-width: calc(100vw - 1rem);
        /* Optimized for tall screens */
        background: linear-gradient(135deg, rgba(26, 26, 58, 0.98) 0%, rgba(45, 27, 105, 0.96) 100%);
        box-shadow:
            0 18px 40px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(139, 92, 246, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }

    .logo-icon {
        width: 65px;
        height: 65px;
        font-size: 2.2rem;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .auth-logo {
        text-align: center !important;
    }

    .auth-logo h2 {
        font-size: 1.4rem;
        line-height: 1.2;
        text-align: center !important;
    }

    .auth-logo p {
        text-align: center !important;
    }

    /* Optimized form elements for OnePlus 12R */
    .form-group input,
    .form-group select {
        font-size: 1rem; /* Prevents zoom but comfortable reading */
        padding: 1.3rem 1.3rem 1.3rem 3.3rem;
        border-radius: 12px;
    }

    .form-group label {
        left: 3.1rem;
        font-size: 0.88rem;
        top: 0.9rem;
    }

    .auth-btn {
        min-height: 58px;
        font-size: 1.15rem;
        padding: 1.3rem 2.2rem;
        border-radius: 12px;
    }

    /* Better spacing for tall screens */
    .auth-form {
        gap: 1.3rem;
    }

    /* OnePlus 12R: Slightly smaller sizing */
    .user-type-selector {
        margin-bottom: 1.6rem;
        gap: 0.7rem;
        padding: 0.7rem;
    }

    .type-option {
        padding: 0.9rem 0.8rem;
        gap: 0.9rem;
    }

    .type-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .type-option span {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 0.25rem;
    }

    .auth-card {
        padding: 1.5rem 1rem;
        margin: 0.25rem;
        border-radius: 16px;
        /* Maximum prominence on small screens */
        background: linear-gradient(135deg, rgba(26, 26, 58, 0.99) 0%, rgba(45, 27, 105, 0.97) 100%);
        box-shadow:
            0 15px 35px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(139, 92, 246, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .auth-logo h2 {
        font-size: 1.5rem;
    }

    /* Further improve touch targets on small screens */
    .form-group input,
    .form-group select {
        font-size: 1.2rem; /* Larger font to prevent zoom */
        padding: 1.5rem 1.5rem 1.5rem 3.5rem;
    }

    .form-group label {
        left: 3.3rem;
        font-size: 0.85rem;
    }

    .auth-btn {
        min-height: 65px;
        font-size: 1.3rem;
        padding: 1.5rem 2rem;
    }

    /* Small screens: Slightly smaller sizing */
    .user-type-selector {
        margin-bottom: 1.5rem;
        gap: 0.7rem;
        padding: 0.6rem;
    }

    .type-option {
        padding: 0.85rem 0.7rem;
        gap: 0.85rem;
    }

    .type-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .type-option span {
        font-size: 0.9rem;
    }

    /* Reduce logo size on very small screens */
    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .auth-logo {
        text-align: center !important;
    }

    .auth-logo h2 {
        font-size: 1.3rem;
        text-align: center !important;
    }

    .auth-logo p {
        text-align: center !important;
    }
}

/* Custom SVG Icon Styles */
.icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

/* SVG Icon Hover Effects */
.icon:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Enhanced Button Ripple Effect */
.auth-btn {
    position: relative;
    overflow: hidden;
}

.auth-btn::after {
    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::after {
    width: 300px;
    height: 300px;
}

/* Floating Animation Enhancements */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-20px) rotate(3deg);
        opacity: 1;
    }
}

/* Performance Optimizations for Animations */
@media (prefers-reduced-motion: reduce) {
    .floating-robot,
    .floating-chip,
    .floating-gear,
    .floating-circuit {
        animation: none;
    }

    .logo-icon {
        animation: none;
    }

    .auth-btn::after {
        display: none;
    }

    .auth-btn:hover {
        transform: translateY(-2px) scale(1.01);
    }

    .type-option:hover {
        transform: none;
    }
}

/* Hardware acceleration for better performance */
.floating-robot,
.floating-chip,
.floating-gear,
.floating-circuit,
.logo-icon,
.auth-btn {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Enhanced Gradient Backgrounds */
.auth-card {
    position: relative;
    z-index: 2;
    /* Improve performance on mobile devices */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

/* Add this to your existing auth.css */

/* Form Note Styles */
.form-note {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.form-note i {
    color: #3b82f6;
    font-size: 1.2rem;
    margin-top: 0.1rem;
}

.form-note p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Age validation styles */
.age-validation {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    padding: 0.5rem;
    border-radius: 6px;
}

.age-valid {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.age-invalid {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* OTP Verification Styles */
.otp-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--accent), #f97316);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.otp-btn:hover:not(:disabled) {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.otp-btn:disabled {
    background: #e2e8f0;
    color: var(--text-muted);
    cursor: not-allowed;
    transform: translateY(-50%);
}

/* OTP Button Loading Animation */
.otp-btn.loading {
    position: relative;
}

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

.otp-btn.loading .btn-loader {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.otp-btn .btn-loader {
    display: none;
}

.otp-btn .loader {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.otp-section {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    animation: slideDown 0.3s ease;
}

.otp-timer {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #f59e0b;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 2;
}

.otp-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.otp-actions .btn {
    flex: 1;
    min-height: 44px;
}

/* Email and Mobile Verification States */
.email-verified, .mobile-verified {
    border-color: var(--success) !important;
    background: rgba(16, 185, 129, 0.05) !important;
}

.email-verified .input-icon, .mobile-verified .input-icon {
    color: var(--success) !important;
}

.email-pending, .mobile-pending {
    border-color: var(--accent) !important;
    background: rgba(245, 158, 11, 0.05) !important;
}

/* OTP Input Styles */
#otp, #mobileOtp {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5rem;
    padding-left: 2.5rem !important;
}

/* Verification Badge */
.verification-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 1rem;
}

.verification-badge.verified {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.verification-badge.pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent);
}

/* Real-time Validation Styles */
.validation-message {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.validation-valid {
    color: var(--success);
}

.validation-invalid {
    color: var(--error);
}

.validation-loading {
    color: var(--accent);
}

/* Mobile Input with Country Code */
.mobile-input-container {
    position: relative;
}

.country-code {
    position: absolute;
    left: 3rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 500;
    z-index: 2;
}

#mobile {
    padding-left: 5rem !important;
}

/* Enhanced Form Group for OTP */
.form-group.with-otp {
    position: relative;
}

.form-group.with-otp input {
    padding-right: 100px !important;
}

/* Resend OTP Button States */
#resendOtpBtn:disabled, #resendMobileOtpBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Progress Indicator */
.verification-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.step-pending .step-icon {
    background: #e2e8f0;
    color: var(--text-muted);
}

.step-active .step-icon {
    background: linear-gradient(135deg, #1e3a8a, #f59e0b);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.step-completed .step-icon {
    background: #10b981;
    color: white;
}

.step-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.step-active .step-label {
    color: #1e3a8a;
    font-weight: 600;
}

.step-completed .step-label {
    color: var(--success);
}

.progress-connector {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 1rem;
    position: relative;
    top: -10px;
}

.step-completed + .progress-connector {
    background: #10b981;
}

/* Responsive OTP Styles */
@media (max-width: 768px) {
    .otp-btn {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: center;
    }
    
    .form-group.with-otp input {
        padding-right: 1rem !important;
    }
    
    .otp-timer {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-top: 0.5rem;
        text-align: center;
    }
    
    .otp-actions {
        flex-direction: column;
    }
    
    .verification-progress {
        flex-direction: column;
        gap: 1rem;
    }
    
    .progress-connector {
        display: none;
    }
    
    .country-code {
        left: 1rem;
        font-size: 0.9rem;
    }
    
    #mobile {
        padding-left: 3.5rem !important;
    }
}

/* Animation for OTP Section */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
}

.otp-section.show {
    animation: slideDown 0.3s ease forwards;
}

.otp-section.verified {
    background: rgba(16, 185, 129, 0.05);
    border-color: var(--success);
    opacity: 0.8;
}

.otp-section.verified::after {
    content: '✓ Verified';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--success);
    font-weight: 600;
    font-size: 1rem;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--success);
}

/* Shake animation for invalid OTP */
@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.otp-error {
    animation: shakeError 0.5s ease-in-out;
    border-color: var(--error) !important;
}

/* Demo Credentials Section */
.demo-credentials {
    background: linear-gradient(135deg, rgba(26, 26, 58, 0.9) 0%, rgba(45, 27, 105, 0.8) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.demo-credentials::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    border-radius: 16px 16px 0 0;
}

.demo-credentials h4 {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.demo-credentials h4::after {
    content: '🔑';
    font-size: 0.9rem;
}

.credential-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.credential-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    transition: all 0.3s ease;
}

.credential-item:last-child {
    margin-bottom: 0;
}

.credential-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateX(5px);
}

.credential-item strong {
    color: var(--secondary);
    font-weight: 600;
    display: inline-block;
    min-width: 80px;
}

.credential-item:hover::before {
    background: linear-gradient(135deg, var(--accent), var(--secondary));
}

/* Responsive Demo Credentials */
@media (max-width: 768px) {
    .demo-credentials {
        padding: 1.5rem 1rem;
        margin-top: 1.5rem;
        border-radius: 12px;
    }

    .credential-item {
        padding: 0.7rem 0.8rem;
        font-size: 0.8rem;
    }

    .credential-item strong {
        min-width: 70px;
        display: block;
        margin-bottom: 0.3rem;
    }
}

@media (max-width: 480px) {
    .demo-credentials {
        padding: 1.2rem 0.8rem;
        margin-top: 1rem;
    }

    .demo-credentials h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .credential-item {
        padding: 0.6rem 0.7rem;
        font-size: 0.75rem;
        text-align: center;
    }

    .credential-item strong {
        min-width: auto;
        display: inline;
        margin-bottom: 0;
        margin-right: 0.5rem;
    }
}

/* Header spacing adjustments for connected progress */
@media (max-width: 768px) {
    .auth-container {
        padding-top: 85px; /* Reduced for tablet */
    }
    
    .auth-card {
        border-radius: 0 0 20px 20px;
        padding-top: 3rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding-top: 75px !important; /* Further reduced for mobile */
    }
    
    .auth-card {
        border-radius: 0 0 16px 16px;
        padding: 2rem 1.5rem;
        padding-top: 2.5rem;
    }
    
    .step-progress {
        top: -18px !important;
        border-radius: 8px 8px 0 0 !important;
        padding: 8px 15px !important;
    }
}

/* Ultra-small screens - 350px onwards priority */
@media (max-width: 400px) and (min-width: 350px) {
    .auth-container {
        padding-top: 70px !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .auth-card {
        border-radius: 0 0 12px 12px !important;
        margin: 0 !important;
    }
    
    .step-progress {
        top: -15px !important;
        margin-left: 0 !important;
        border-radius: 4px 4px 0 0 !important;
        padding: 6px 10px !important;
    }

    /* User type selector for ultra-small screens */
    .user-type-selector {
        margin-bottom: 1.2rem;
        gap: 0.6rem;
        padding: 0.5rem;
    }

    .type-option {
        padding: 0.75rem 0.6rem;
        gap: 0.75rem;
    }

    .type-icon {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }

    .type-option span {
        font-size: 0.85rem;
    }
}

/* Extremely small screens - below 350px */
@media (max-width: 349px) {
    .auth-container {
        padding-top: 65px !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
        min-height: calc(100vh - 65px) !important;
    }
    
    .auth-card {
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 1.5rem 1rem !important;
        padding-top: 2rem !important;
    }
    
    .step-progress {
        top: -12px !important;
        border-radius: 0 !important;
        padding: 4px 8px !important;
        width: calc(100% + 0.5rem) !important;
        margin-left: -0.25rem !important;
    }

    /* User type selector for extremely small screens */
    .user-type-selector {
        margin-bottom: 1rem;
        gap: 0.5rem;
        padding: 0.4rem;
    }

    .type-option {
        padding: 0.7rem 0.5rem;
        gap: 0.7rem;
    }

    .type-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .type-option span {
        font-size: 0.8rem;
        line-height: 1.2;
    }
}

/* ===== Auth Pages: Minimal Header/Footer ===== */
.auth-header {
    background: linear-gradient(135deg, rgba(26, 26, 58, 0.9) 0%, rgba(45, 27, 105, 0.85) 100%);
    color: #fff;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    position: sticky;
    top: 0;
    z-index: 100;
}
.auth-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
}
.auth-brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 50%; }
.auth-brand span { letter-spacing: 0.08em; font-size: 1rem; }

.auth-header-actions { display: inline-flex; align-items: center; gap: 0.75rem; }

/* Mobile Menu Styles */
.mobile-menu-wrapper {
    position: relative;
    display: none;
    z-index: 1002;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    color: #e5e7eb;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1002;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(26, 26, 58, 0.95) 0%, rgba(45, 27, 105, 0.95) 100%);
    backdrop-filter: blur(20px);
    z-index: 999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.mobile-menu-header span {
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #e5e7eb;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.mobile-menu-content {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: #e5e7eb;
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-family: inherit;
}

.mobile-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding-left: 2rem;
}

.mobile-menu-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.mobile-menu-item span {
    font-weight: 500;
}
.auth-home-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #e5e7eb;
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
}
.auth-home-link:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.3);
}
.auth-theme-toggle {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    width: 36px; height: 36px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
}
.auth-theme-toggle:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.3); }

.auth-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #fff;
    text-decoration: none;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border: 1px solid rgba(255,255,255,0.15);
}
.auth-cta-link:hover { filter: brightness(1.05); box-shadow: 0 6px 16px rgba(0,0,0,0.25); }

.auth-footer {
    background: linear-gradient(135deg, rgba(26, 26, 58, 0.9) 0%, rgba(45, 27, 105, 0.85) 100%);
    color: #cbd5e1;
    border-top: 1px solid rgba(139, 92, 246, 0.3);
    margin-top: 2rem;
}
.auth-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    text-align: center;
}
.auth-footer a { color: #93c5fd; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; color: #bfdbfe; }
.auth-footer .separator { opacity: 0.5; margin: 0 0.5rem; }

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .desktop-actions {
        display: none !important;
    }
    
    .mobile-menu-wrapper {
        display: block;
    }
    
    .auth-header-container {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .auth-header-container { 
        padding: 0.6rem 0.75rem; 
    }
    
    .auth-brand img { 
        width: 30px; 
        height: 30px; 
    }
    
    .auth-brand span { 
        font-size: 0.95rem; 
    }
    
    .mobile-menu {
        width: 100%;
        right: -100%;
    }
    
    .mobile-menu.active {
        right: 0;
    }
}

/* Extra small devices (342px and below) */
@media (max-width: 342px) {
    .auth-header-container {
        padding: 0.5rem 0.6rem;
        gap: 0.5rem;
    }
    
    .auth-brand {
        gap: 0.4rem;
    }
    
    .auth-brand img {
        width: 28px;
        height: 28px;
    }
    
    .auth-brand span {
        font-size: 0.9rem;
    }
    
    .mobile-menu-toggle {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}
