:root {
    --gold-l: #f9e29c; 
    --gold: #d4af37; 
    --gold-d: #b8860b;
    --dark: #020617; 
    --card: rgba(15, 23, 42, 0.9);
    --border: rgba(212, 175, 55, 0.3);
    --green: #10b981; 
    --red: #ef4444;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top right, #1e293b, #020617);
    background-attachment: fixed;
    color: #f8fafc;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.5;
}

.auth-container {
    max-width: 500px;
    width: 100%;
    line-height: normal;
}

/* ============================================
   CONCEPT 4: 3D DEPTH CARD LOGO SECTION
   ============================================ */
.logo-section {
    position: relative;
    text-align: center;
    padding: 50px 30px;
    background: 
        linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.95));
    border-radius: 20px;
    border: 1px solid var(--border);
    margin-bottom: 30px;
    transition: transform 0.6s ease, box-shadow 0.6s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(212, 175, 55, 0.1) inset;
}

.logo-section:hover {
    transform: rotateY(5deg) rotateX(-5deg);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(212, 175, 55, 0.3),
        0 0 0 1px rgba(212, 175, 55, 0.3) inset;
}

/* 3D shine effect */
.logo-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(212, 175, 55, 0.1) 0%,
        transparent 70%
    );
    transform: translateZ(-20px);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.logo-section:hover::before {
    opacity: 1;
}

.logo-img {
    width: 450px;
    max-width: 90%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 10px 30px rgba(212, 175, 55, 0.4));
    transform: translateZ(30px);
    transition: transform 0.6s ease, filter 0.6s ease;
    position: relative;
    z-index: 2;
}

.logo-section:hover .logo-img {
    transform: translateZ(50px) scale(1.05);
    filter: drop-shadow(0 20px 60px rgba(212, 175, 55, 0.6));
}

.subtitle {
    color: var(--gold);
    font-size: 0.95rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-top: 15px;
    padding: 0;
    line-height: 1.2;
    display: block;
    transform: translateZ(20px);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.6s ease;
    position: relative;
    z-index: 2;
}

.logo-section:hover .subtitle {
    transform: translateZ(40px);
}

/* Tablet optimization */
@media (max-width: 768px) {
    .logo-section {
        padding: 40px 25px;
    }
    
    .logo-img {
        width: 400px;
    }
    
    .subtitle {
        font-size: 0.85rem;
        letter-spacing: 4px;
    }
}

/* Mobile optimization */
@media (max-width: 480px) {
    .logo-section {
        padding: 35px 20px;
    }
    
    .logo-img {
        width: 300px;
    }
    
    .subtitle {
        font-size: 0.75rem;
        letter-spacing: 3px;
        margin-top: 10px;
    }
}

.gold-text {
    background: linear-gradient(to bottom, var(--gold-l), var(--gold), var(--gold-d));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 8px;
}

.auth-card {
    background: var(--card);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    max-height: 85vh;
    overflow-y: auto;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: #94a3b8;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-d));
    color: #000;
    border-color: var(--gold);
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

.form-group {
    margin-bottom: 18px;
    position: relative;
}

label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold-l);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

input, select {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: rgba(0,0,0,0.4);
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

select {
    cursor: pointer;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-transform: none;
    color: var(--gold);
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #334155;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    position: relative;
    margin-right: 10px;
    outline: none;
    transition: all 0.2s ease;
    padding: 0;
}

.checkbox-label input[type="checkbox"]:hover {
    border-color: var(--gold);
}

.checkbox-label input[type="checkbox"]:checked {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--gold);
    font-size: 12px;
    font-weight: bold;
}

.forgot-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.forgot-link:hover {
    color: var(--gold-l);
    text-decoration: underline;
}

/* Security Questions Section */
.security-questions-section {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: 20px;
}

.section-label {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.security-info {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--gold-l);
    text-align: center;
}

.question-display {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold), var(--gold-d));
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #334155;
    color: white;
    margin-top: 10px;
    box-shadow: none;
}

.btn-secondary:hover {
    background: #475569;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    display: none;
}

.alert.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--red);
    color: var(--red);
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--green);
    color: var(--green);
}

.alert-info {
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid var(--gold);
    color: var(--gold);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group .icon {
    position: absolute;
    left: 12px;
    top: 34px;
    width: 18px;
    height: 18px;
    color: var(--gold);
    pointer-events: none;
    opacity: 0.6;
    transition: all 0.3s;
}

input:focus + .icon,
input:focus ~ .icon {
    opacity: 1;
    color: var(--gold-l);
}

.info-text {
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 20px;
}

/* ENHANCED MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .auth-card {
        padding: 30px 25px;
        max-height: 90vh;
    }

    .gold-text {
        font-size: 1.6rem;
    }

    .tab-btn {
        font-size: 0.85rem;
        padding: 10px;
    }

    input, select {
        font-size: 16px;
    }
}

@media (max-width: 500px) {
    body {
        padding: 10px;
    }

    .auth-card {
        padding: 25px 20px;
        border-radius: 15px;
    }

    .gold-text {
        font-size: 1.4rem;
    }

    .tab-buttons {
        gap: 8px;
        margin-bottom: 20px;
    }

    .tab-btn {
        font-size: 0.75rem;
        padding: 10px 8px;
        letter-spacing: 0.5px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    label {
        font-size: 0.7rem;
    }

    input, select {
        padding: 10px 10px 10px 36px;
        font-size: 16px;
    }

    .form-options {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        font-size: 0.8rem;
    }

    .btn {
        padding: 12px;
        font-size: 0.85rem;
    }

    .security-questions-section {
        padding-top: 15px;
        margin-top: 15px;
    }

    .section-label {
        font-size: 0.75rem;
    }

    .question-display {
        font-size: 0.85rem;
        padding: 10px;
    }
}

/* Landscape mobile optimization */
@media (max-width: 900px) and (orientation: landscape) {
    .auth-card {
        max-height: 95vh;
        overflow-y: auto;
    }

    .logo-section {
        padding: 25px 20px;
    }
    
    .logo-img {
        width: 250px;
    }
}

/* Improve touch targets on mobile */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .tab-btn,
    .checkbox-label,
    .forgot-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .checkbox-label input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }
    
    /* Disable 3D hover on touch devices */
    .logo-section:hover {
        transform: none;
    }
}

/* Smooth scrolling for auth card on mobile */
.auth-card::-webkit-scrollbar {
    width: 6px;
}

.auth-card::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.auth-card::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 3px;
}

.auth-card::-webkit-scrollbar-thumb:hover {
    background: var(--gold-l);
}