/**
 * Surreal Landing Page Styles
 * Shared between landing.php and auth pages
 */

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

:root {
    --color-bg: #050a12;
    --color-primary: #60a5fa;
    --color-primary-dark: #1e3a5f;
    --color-accent: #f59e0b;
    --color-text: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.5);
    --color-border: rgba(255, 255, 255, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        "Rubik",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== ANIMATED BACKGROUND ===== */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.ambient-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(
            ellipse 40% 35% at 30% 30%,
            rgba(61, 142, 248, 0.15) 0%,
            transparent 50%
        ),
        radial-gradient(
            ellipse 35% 40% at 70% 60%,
            rgba(139, 92, 246, 0.12) 0%,
            transparent 50%
        ),
        radial-gradient(
            ellipse 45% 35% at 60% 20%,
            rgba(96, 165, 250, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            ellipse 30% 45% at 20% 70%,
            rgba(167, 139, 250, 0.08) 0%,
            transparent 50%
        );
    animation: glow-drift 30s ease-in-out infinite alternate;
}

@keyframes glow-drift {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(5%, 3%) rotate(1deg);
    }
    66% {
        transform: translate(-3%, 5%) rotate(-1deg);
    }
    100% {
        transform: translate(4%, -2%) rotate(0.5deg);
    }
}

/* Stars layer */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

.star.large {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 8px 2px rgba(150, 180, 255, 0.5);
}

.star.bright {
    width: 4px;
    height: 4px;
    background: radial-gradient(
        circle,
        white 0%,
        rgba(150, 180, 255, 0.8) 50%,
        transparent 100%
    );
    box-shadow:
        0 0 15px 4px rgba(100, 150, 255, 0.6),
        0 0 30px 8px rgba(100, 150, 255, 0.3),
        0 0 45px 12px rgba(100, 150, 255, 0.1);
}

/* Container styles */
.nebulas,
.dust-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

@keyframes twinkle {
    0%,
    100% {
        opacity: 0.1;
        transform: scale(0.8);
    }
    50% {
        opacity: var(--max-opacity, 0.7);
        transform: scale(1);
    }
}

/* Aurora wave effect */
.aurora {
    position: absolute;
    bottom: 0;
    left: -50%;
    width: 200%;
    height: 40%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(61, 142, 248, 0.03) 30%,
        rgba(139, 92, 246, 0.05) 50%,
        rgba(61, 142, 248, 0.03) 70%,
        transparent 100%
    );
    filter: blur(30px);
    animation: aurora-wave 20s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes aurora-wave {
    0%,
    100% {
        transform: translateX(0) skewX(-5deg);
    }
    50% {
        transform: translateX(10%) skewX(5deg);
    }
}

/* Nebula clouds */
.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0;
    animation: nebula-pulse var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
    mix-blend-mode: screen;
}

@keyframes nebula-pulse {
    0%,
    100% {
        opacity: 0.15;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.25;
        transform: scale(1.1) rotate(5deg);
    }
}

/* Particle dust */
.dust {
    position: absolute;
    width: 1px;
    height: 1px;
    background: rgba(200, 210, 255, 0.6);
    border-radius: 50%;
    animation: drift var(--duration) linear infinite;
    animation-delay: var(--delay);
}

@keyframes drift {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0);
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) translateX(var(--drift-x, 20px));
    }
}

/* Floating orbs */
.orbs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
    animation: float-orb var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes float-orb {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -20px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 30px) scale(0.95);
    }
    75% {
        transform: translate(20px, 20px) scale(1.05);
    }
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, var(--color-bg) 0%, transparent 100%);
}

.nav-logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-primary);
    text-decoration: none;
    text-shadow:
        1px 0 0 var(--color-primary-dark),
        2px 1px 0 var(--color-primary-dark),
        3px 2px 0 var(--color-primary-dark);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link--active {
    color: var(--color-text);
}

.nav-cta {
    background: var(--color-primary);
    color: var(--color-bg);
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: #7bb8fc;
    transform: translateY(-2px);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-bg);
}

.btn-primary:hover {
    background: #7bb8fc;
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(96, 165, 250, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ===== CTA SECTION ===== */
.cta-section {
    position: relative;
    z-index: 1;
    padding: 100px 40px;
    text-align: center;
}

.cta-box {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 80px 60px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

.cta-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-subtitle {
    font-size: 18px;
    color: var(--color-text-muted);
    margin-bottom: 40px;
}

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 1;
    padding: 40px;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.footer-text {
    font-size: 14px;
    color: var(--color-text-muted);
}

.footer-links {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 20px;
}

.footer-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--color-text);
}

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== AUTH CARD STYLES ===== */
.auth-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Dim background for auth pages */
.bg-container.dimmed {
    opacity: 0.4;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.02) 50%,
        rgba(0, 0, 0, 0.15) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
}

/* S Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.s-logo {
    display: inline-block;
}

.s-text {
    font-family: "Rubik", sans-serif;
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
    color: #60a5fa;
    user-select: none;
    text-shadow:
        2px 0 0 #1e3a5f,
        3px 1px 0 #1e3a5f,
        4px 2px 0 #1e3a5f,
        5px 3px 0 #1e3a5f,
        6px 4px 0 #1e3a5f,
        10px 8px 15px rgba(0, 0, 0, 0.4);
}

.auth-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}

.auth-subtitle {
    text-align: center;
    font-size: 15px;
    color: var(--color-text-muted);
    margin-bottom: 32px;
}

/* Form styles */
.auth-card .form-group {
    margin-bottom: 20px;
}

.auth-card .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.auth-card .form-group input[type="text"],
.auth-card .form-group input[type="email"],
.auth-card .form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--color-text);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.auth-card .form-group input:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.6);
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 0 3px rgba(96, 165, 250, 0.15),
        0 0 20px rgba(96, 165, 250, 0.2),
        0 0 40px rgba(139, 92, 246, 0.1);
}

/* Subtle glow on the card when a text input is focused */
.auth-card:has(input[type="text"]:focus),
.auth-card:has(input[type="email"]:focus),
.auth-card:has(input[type="password"]:focus) {
    box-shadow:
        0 0 60px rgba(96, 165, 250, 0.1),
        0 0 100px rgba(139, 92, 246, 0.05);
}

.auth-card .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-card .form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--color-text-muted);
}

/* Checkbox */
.auth-card .form-check {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.auth-card .form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.auth-card .form-check label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    cursor: pointer;
}

/* Submit button */
.auth-card .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    justify-content: center;
}

/* Turnstile widget */
.auth-card .turnstile-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.auth-card .turnstile-wrapper:hover {
    opacity: 1;
}

.auth-card .turnstile-wrapper .cf-turnstile {
    transform: scale(0.95);
    transform-origin: center;
}

/* Alerts */
.auth-card .alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
}

.auth-card .alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.auth-card .alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Links inside auth card (but not buttons) */
.auth-card a:not(.btn) {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-card a:not(.btn):hover {
    color: #7bb8fc;
    text-decoration: underline;
}

/* Forgot password link */
.forgot-password {
    text-align: right;
    margin-top: 8px;
}

.forgot-password a {
    font-size: 13px;
    opacity: 0.7;
}

.forgot-password a:hover {
    opacity: 1;
}

/* Footer links */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.auth-footer a {
    opacity: 0.8;
}

.auth-footer a:hover {
    opacity: 1;
}

.auth-footer .back-link {
    display: inline-block;
    margin-top: 12px;
    opacity: 0.6;
}

/* Auth card headings and text */
.auth-card h2 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.auth-card .subtitle {
    text-align: center;
    margin-bottom: 24px;
    font-size: 14px;
    opacity: 0.7;
}

.auth-card .hint {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 8px;
}

.auth-card .small-text {
    font-size: 13px;
    opacity: 0.5;
    margin-top: 16px;
}

/* Password requirements */
.password-requirements {
    margin-top: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.password-requirements strong {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.password-requirements ul {
    margin: 6px 0 0 16px;
    padding: 0;
}

.password-requirements li {
    margin: 3px 0;
}

/* Invite required state */
.invite-required {
    text-align: center;
    padding: 20px 0;
}

.invite-required h3 {
    color: var(--color-primary);
    margin-bottom: 12px;
    font-size: 20px;
}

.invite-required p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    line-height: 1.6;
}

.gnome-child {
    width: 100px;
    height: auto;
    opacity: 0.8;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 15px rgba(96, 165, 250, 0.3));
}

/* Registration success */
.registration-success {
    text-align: center;
    padding: 20px 0;
}

.registration-success .success-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: white;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.registration-success h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.registration-success p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.registration-success .redirect-notice {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 20px;
}

/* ===== SHARED RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav {
        padding: 15px 20px;
    }

    .nav-links {
        display: none;
    }

    .cta-box {
        padding: 50px 30px;
    }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 36px 24px;
        border-radius: 20px;
    }

    .s-text {
        font-size: 56px;
    }

    .auth-title {
        font-size: 20px;
    }
}
