/* ============================================
   Authentication Page Styles
   Ultra Luxe VIP 3D Design
   ============================================ */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    perspective: 1500px;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    background: rgba(15, 15, 30, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 48px 40px 40px;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(255, 78, 80, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    transform-style: preserve-3d;
    animation: containerFloat 8s ease-in-out infinite;
}

@keyframes containerFloat {
    0%, 100% { transform: translateY(0) rotateX(0deg); }
    50% { transform: translateY(-10px) rotateX(1deg); }
}

.auth-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 32px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255,78,80,0.4), rgba(249,212,35,0.4), rgba(255,138,0,0.4));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.6;
    animation: borderGlow 4s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* ============================================
   Logo Section
   ============================================ */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-3d {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoFloat 4s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) rotateY(0deg); }
    50% { transform: translateY(-8px) rotateY(180deg); }
}

.logo-icon {
    font-size: 5rem;
    filter: drop-shadow(0 10px 30px rgba(255, 78, 80, 0.6));
    z-index: 2;
    position: relative;
}

.logo-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 78, 80, 0.5) 0%, transparent 70%);
    filter: blur(30px);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
}

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, #ffd700 50%, #ff8a00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    margin-bottom: 8px;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
}

.brand-tld {
    font-size: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ============================================
   Tab Buttons
   ============================================ */
.tab-buttons {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 6px;
    margin-bottom: 32px;
    position: relative;
}

.tab-btn {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 12px;
    transition: color 0.3s var(--ease);
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn.active {
    color: white;
}

.tab-indicator {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: var(--gradient-1);
    border-radius: 12px;
    transition: transform 0.4s var(--ease-bounce);
    box-shadow: 0 4px 20px rgba(255, 78, 80, 0.4);
    z-index: 1;
}

.tab-btn[data-tab="register"].active ~ .tab-indicator,
.tab-indicator.register {
    transform: translateX(100%);
}

/* ============================================
   Form Elements
   ============================================ */
.auth-form {
    display: none;
    animation: formFadeIn 0.5s var(--ease);
}

.auth-form.active {
    display: block;
}

@keyframes formFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 20px 20px 20px 55px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s var(--ease);
}

.input-group input:focus {
    border-color: var(--primary);
    background: rgba(255, 78, 80, 0.05);
    box-shadow: 0 0 0 4px rgba(255, 78, 80, 0.15);
    transform: translateY(-2px);
}

.input-group input::placeholder {
    color: var(--text-dim);
}

.input-group label {
    position: absolute;
    top: 50%;
    left: 55px;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    transition: all 0.3s var(--ease);
    background: transparent;
    padding: 0 6px;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: 0;
    left: 20px;
    font-size: 0.75rem;
    color: var(--primary);
    background: #0f0f1e;
    font-weight: 600;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-size: 1.2rem;
    z-index: 1;
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
}

/* ============================================
   Alert Messages
   ============================================ */
.alert {
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: none;
    animation: alertIn 0.4s var(--ease-bounce);
}

.alert.show { display: block; }

.alert.error {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #fca5a5;
}

.alert.success {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #86efac;
}

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

/* ============================================
   Switch Text
   ============================================ */
.switch-text {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.switch-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    margin-left: 5px;
    transition: color 0.3s;
}

.switch-link:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* ============================================
   Loading Overlay
   ============================================ */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 30, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 32px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-overlay.active {
    display: flex;
}

.loader-3d {
    perspective: 800px;
    width: 100px;
    height: 100px;
}

.loader-cube {
    position: relative;
    width: 100px;
    height: 100px;
    transform-style: preserve-3d;
    animation: cubeSpin 3s infinite linear;
}

.loader-cube .face {
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255, 78, 80, 0.2);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 0 30px rgba(255, 78, 80, 0.5);
}

.face.front { transform: translateZ(50px); }
.face.back { transform: rotateY(180deg) translateZ(50px); }
.face.right { transform: rotateY(90deg) translateZ(50px); }
.face.left { transform: rotateY(-90deg) translateZ(50px); }
.face.top { transform: rotateX(90deg) translateZ(50px); }
.face.bottom { transform: rotateX(-90deg) translateZ(50px); }

@keyframes cubeSpin {
    0% { transform: rotateX(0) rotateY(0) rotateZ(0); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

/* ============================================
   Features Section
   ============================================ */
.features-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
    max-width: 480px;
    width: 100%;
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.4s var(--ease);
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-5px) rotateY(5deg);
    background: rgba(255, 78, 80, 0.08);
    border-color: rgba(255, 78, 80, 0.3);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 5px 15px rgba(255, 78, 80, 0.4));
}

.feature-card h3 {
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: white;
    font-weight: 600;
}

.feature-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 640px) {
    .auth-container {
        padding: 32px 24px;
        margin: 20px 0;
    }

    .brand-name { font-size: 2rem; }
    .logo-3d { width: 80px; height: 80px; }
    .logo-icon { font-size: 4rem; }

    .features-section {
        position: static;
        transform: none;
        margin-top: 30px;
    }

    .feature-card {
        padding: 15px 10px;
    }

    .feature-card h3 { font-size: 0.75rem; }
    .feature-card p { font-size: 0.7rem; }
}

@media (max-height: 800px) {
    .features-section {
        display: none;
    }
}
