:root {
    --bg-dark: #07070b;
    --card-bg: rgba(20, 20, 27, 0.75);
    --primary: #5eff00;
    --primary-glow: rgba(94, 255, 0, 0.4);
    --accent: #bc13fe;
    --text-main: #ffffff;
    --text-muted: #8b8b9e;
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-stack: 'Outfit', sans-serif;
    --transition-speed: 0.6s;
    --cubic-bezier: cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-stack);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    perspective: 2500px;
    perspective-origin: 50% 50%;
    background: radial-gradient(circle at center, #1a1a24 0%, #000 100%);
}

body::before,
body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

body::before {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(94, 255, 0, 0.15) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    transform: translateZ(-300px);
    animation: float-depth 15s ease-in-out infinite;
}

body::after {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(188, 19, 254, 0.15) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    transform: translateZ(-200px);
    animation: float-depth 12s ease-in-out infinite reverse;
}

@keyframes float-depth {
    0%, 100% { transform: translateZ(-300px) translateY(0); }
    50% { transform: translateZ(-250px) translateY(-30px); }
}

/* Ambient Background */
.ambient-light {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.15;
    filter: blur(80px);
    z-index: -1;
    transform: translateZ(-150px);
    animation: pulse 10s infinite alternate, rotate-3d 20s linear infinite;
}

@keyframes pulse {
    0% { transform: translateZ(-150px) scale(0.8); opacity: 0.1; }
    100% { transform: translateZ(-150px) scale(1.2); opacity: 0.2; }
}

@keyframes rotate-3d {
    0% { transform: translateZ(-150px) rotateZ(0deg); }
    100% { transform: translateZ(-150px) rotateZ(360deg); }
}

/* 3D Scene */
.scene {
    width: 90%;
    max-width: 480px;
    height: auto;
    perspective: 1500px;
    position: relative;
    z-index: 10;
    transform-style: preserve-3d;
}

/* Auth Card */
.auth-card {
    width: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s var(--cubic-bezier);
    transform-origin: center center;
}

.auth-card.is-flipped {
    transform: rotateY(180deg);
}

.scene:hover .auth-card:not(.is-flipped) {
    transition: transform 0.1s ease-out;
}

/* Card Faces */
.auth-card__face {
    backface-visibility: hidden;
    border-radius: 24px;
    padding: 3rem 2.5rem;
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: 
        0 30px 80px rgba(0,0,0,0.6),
        0 0 0 1px rgba(255,255,255,0.05) inset,
        0 10px 30px rgba(94, 255, 0, 0.1);
    overflow: hidden;
    transform: translateZ(50px);
    transition: transform 0.6s var(--cubic-bezier), box-shadow 0.6s ease;
    position: relative;
}

.auth-card__face:hover {
    transform: translateZ(70px);
    box-shadow: 
        0 40px 100px rgba(0,0,0,0.7),
        0 0 0 1px rgba(255,255,255,0.1) inset,
        0 15px 40px rgba(94, 255, 0, 0.2);
}

.auth-card__face--signup {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform: rotateY(180deg) translateZ(50px);
}

.auth-card__face--signup:hover {
    transform: rotateY(180deg) translateZ(70px);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    transform: translateZ(10px);
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: rgba(94, 255, 0, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    border: 1px solid rgba(94, 255, 0, 0.2);
    box-shadow: 0 0 20px rgba(94, 255, 0, 0.2);
}

.logo h1 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Headings */
h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    transform: translateZ(8px);
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    transform: translateZ(6px);
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transform: translateZ(5px);
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.9rem 1.2rem;
    color: var(--text-main);
    font-family: var(--font-stack);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(94, 255, 0, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    transform: translateZ(5px);
}

/* Checkbox */
.checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    position: relative;
}

.checkbox input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    position: relative;
    transition: 0.3s;
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox input:checked + .checkmark {
    background: rgba(94, 255, 0, 0.2);
    border-color: var(--primary);
}

.checkbox input:checked + .checkmark::after {
    display: block;
}

.label-text {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Link */
.link {
    color: var(--primary);
    text-decoration: none;
    transition: 0.3s;
}

.link:hover {
    text-decoration: underline;
    color: #7fff2a;
}

/* Buttons */
.glow-btn {
    background: var(--primary);
    color: #000;
    font-family: var(--font-stack);
    font-weight: 700;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    transform: translateZ(15px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.glow-btn:hover {
    box-shadow: 
        0 0 25px var(--primary-glow),
        0 10px 30px rgba(94, 255, 0, 0.3);
    transform: translateZ(25px) translateY(-2px);
}

.glow-btn:active {
    transform: translateZ(15px) translateY(0);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    transform: translateZ(3px);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

/* Switch Button */
.switch-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-family: var(--font-stack);
    font-weight: 600;
    padding: 0.9rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    transform: translateZ(10px);
}

.switch-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(94, 255, 0, 0.05);
    transform: translateZ(20px);
}

/* Background Decor */
.background-decor-1,
.background-decor-2 {
    position: absolute;
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.background-decor-1 {
    bottom: -80px;
    right: -80px;
    width: 250px;
    height: 250px;
    border: 2px solid rgba(255, 255, 255, 0.03);
    transform: translateZ(-30px);
    animation: orbit 20s linear infinite;
}

.background-decor-2 {
    top: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
    opacity: 0.1;
    transform: translateZ(-50px);
    animation: orbit 25s linear infinite reverse;
}

@keyframes orbit {
    0% { transform: translateZ(-30px) rotate(0deg); }
    100% { transform: translateZ(-30px) rotate(360deg); }
}

/* Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    20% { opacity: 0.5; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .auth-card__face {
        padding: 2rem 1.5rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .logo h1 {
        font-size: 1rem;
    }
}
