:root {
    --color-primary: #7F00FF;
    /* Neon Violet */
    --color-background: #121212;
    /* Deep Charcoal */
    --color-surface: #1E1E1E;
    /* Lighter Grey */
    --color-text: #FFFFFF;
    --color-text-muted: #B0B0B0;
    --font-main: 'Inter', sans-serif;
    --spacing-container: 1200px;
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

.container {
    max-width: var(--spacing-container);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--color-text-muted);
    font-size: 1.125rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #FF0055 0%, var(--color-primary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(127, 0, 255, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(127, 0, 255, 0.6);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

/* Utility */
.text-gradient {
    background: linear-gradient(to right, #fff, #b0b0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.accent-text {
    color: var(--color-primary);
}

.hidden {
    display: none !important;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--color-surface);
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(127, 0, 255, 0.2);
    box-shadow: 0 0 30px rgba(127, 0, 255, 0.1);
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Navbar */
.navbar {
    padding: 5px 0;
    position: absolute;
    width: 100%;
    top: 0;
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Tomorrow', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0;
}

.logo .accent-text {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 2.2rem;
    /* Make X slightly larger for impact */
    margin: 0 2px;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Hero */
.hero {
    padding-top: 140px;
    padding-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-visual img,
.hero-visual video {
    width: 100%;
    max-width: 350px;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 50px rgba(127, 0, 255, 0.2));
    animation: float 6s ease-in-out infinite;
    border-radius: var(--border-radius);
    /* Ensure sharp corners don't poke out if video is rectangular */
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hero-content h1 {
    margin-bottom: 20px;
}

.hero-subtitle {
    margin-bottom: 40px;
    font-size: 1.25rem;
    max-width: 500px;
}

.micro-copy {
    display: block;
    margin-top: 15px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* How It Works */
.how-it-works {
    padding: 35px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 25px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.step-card {
    background: var(--color-surface);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s;
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: rgba(127, 0, 255, 0.3);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.step-header h3 {
    margin-bottom: 0;
    font-size: 1.10rem;
}

.step-icon {
    width: 40px;
    height: 40px;
    background: rgba(127, 0, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-icon img {
    width: 24px;
    height: 24px;
}

/* Features */
.features {
    padding: 100px 0;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 120px;
}

.feature-row.reverse {
    direction: rtl;
}

.feature-row.reverse .feature-content {
    direction: ltr;
}

.feature-visual img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Privacy */
.privacy-section {
    background: var(--color-surface);
    padding: 40px 0;
}

.privacy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.privacy-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.check-icon {
    color: var(--color-primary);
    font-size: 1.2rem;
}

/* Footer */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    margin-bottom: 60px;
}

.age-warning {
    border: 1px solid rgba(255, 50, 50, 0.3);
    padding: 20px;
    border-radius: 8px;
    background: rgba(255, 0, 0, 0.05);
    margin-bottom: 40px;
}

.warning-title {
    color: #ff4444;
    font-weight: 700;
    margin-bottom: 10px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.3);
}

.footer-bottom p,
.footer-bottom a {
    font-size: 0.75rem;
}

.footer-links {
    display: flex;
    gap: 20px;
}

/* Responsive */
@media (max-width: 1024px) {

    .hero-grid,
    .steps-grid,
    .feature-row,
    .privacy-grid,
    .footer-content {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        /*display: none;*/
        /* Hide mockup on mobile/tablet as requested */
    }

    .feature-row {
        gap: 40px;
        margin-bottom: 80px;
    }

    .feature-row.reverse {
        direction: ltr;
    }

    .hero {
        padding-top: 100px;
        text-align: center;
    }

    .hero-content {
        max-width: 600px;
        margin: 0 auto;
    }

    h1 {
        font-size: 2.5rem;
    }

    .logo {
        position: relative;
        z-index: 101;
    }
}

@media (max-width: 768px) {

    /* Hide nav links on mobile to save space */
    .nav-link {
        display: none;
    }

    /* Adjust navbar spacing */
    .nav-links {
        gap: 15px;
    }

    /* Make logo slightly smaller */
    .logo {
        font-size: 1.5rem;
    }

    .logo .accent-text {
        font-size: 1.6rem;
    }

    /* Make CTA button slightly smaller */
    .navbar .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /* Stack footer bottom on mobile */
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }

    .btn-outline {
        padding: 6px 8px;
        font-size: 0.9rem;
    }
}

/* Auth Modal Enhancements */
.input-row {
    display: flex;
    gap: 10px;
}

.input-row .input-group {
    flex: 1;
}

select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: #222;
    font-family: var(--font-main);
    color: white;
}

select option {
    background: #222;
    color: white;
}

/* User Badge in Header */
.user-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    gap: 10px;
    margin-right: 15px;
    color: white;
    /* Default fallback */
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.level-basic {
    background: #333;
    border-color: #555;
    color: #e0e0e0;
}

.level-gold {
    background: linear-gradient(135deg, #FFD700 0%, #B8860B 100%);
    border-color: #FFD700;
    color: #000;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.level-platinum {
    background: linear-gradient(135deg, #E5E4E2 0%, #B0B0B0 100%);
    border-color: #E5E4E2;
    color: #000;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.token-display {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 2px solid white;
    padding: 2px 8px;
    border-radius: 18px;
    color: white;
}

.token-icon {
    font-size: 0.9rem;
}

.token-count {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Gender Selection */
.gender-selection {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: space-between;
}

.gender-option {
    flex: 1;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 5px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--color-text-muted);
}

.gender-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.gender-option.selected {
    border-color: var(--color-primary);
    background: rgba(127, 0, 255, 0.1);
    color: white;
}

.gender-icon {
    font-size: 1.2rem;
}

.gender-icon img {
    width: 45px;
    height: 45px;
    border-radius: 0%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .gender-icon img {
        width: 35px;
        height: 35px;
    }
}


/* Story Form Enhancements */
.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.form-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-badge {
    background: var(--color-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Orientation Grid (reusing gender-selection somewhat) */
.orientation-grid {
    display: flex;
    gap: 15px;
}

/* Characters Grid */
.characters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.character-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: border-color 0.2s;
}

.character-card:hover {
    border-color: rgba(127, 0, 255, 0.2);
}

.char-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.char-icon {
    font-size: 1.5rem;
}

.char-mode-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.char-mode-selector label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.customize-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeIn 0.3s ease-in-out;
}

.form-input {
    width: 100%;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0 5px;
    color: white;
    font-family: var(--font-main);
    font-size: 0.9rem;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.row-2 {
    display: flex;
    gap: 10px;
}

.row-2>* {
    flex: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .characters-grid {
        grid-template-columns: 1fr;
    }

    .orientation-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

input[type=range] {
    width: 100%;
    margin: 10px 0;
    cursor: pointer;
}

/* Incognito Mode */
.incognito-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.incognito-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.incognito-btn.active {
    background: rgba(127, 0, 255, 0.3);
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(127, 0, 255, 0.4);
}

/* Blur images in incognito mode */
body.incognito-mode .story-image,
body.incognito-mode .card-image img,
body.incognito-mode .fullscreen-image {
    filter: blur(25px) brightness(0.5);
    transition: filter 0.3s ease;
}

/* Reduce title visibility in incognito mode */
body.incognito-mode .cover-title,
body.incognito-mode .card-content h3 {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    .incognito-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        margin-right: 10px;
    }
}

/* Welcome Bonus Section */
.welcome-section {
    padding: 60px 0;
    background: var(--color-surface);
    text-align: center;
}

.bonus-card {
    background: linear-gradient(135deg, rgba(127, 0, 255, 0.2) 0%, rgba(255, 0, 85, 0.2) 100%);
    border: 2px solid var(--color-primary);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(127, 0, 255, 0.3);
}

.bonus-amount {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bonus-label {
    font-size: 1.5rem;
    color: white;
    margin-top: 10px;
}

.bonus-description {
    color: var(--color-text-muted);
    margin-top: 15px;
}

.learn-more-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--color-primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.learn-more-link:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .bonus-amount {
        font-size: 3rem;
    }

    .welcome-section {
        padding: 40px 0;
    }
}

/* Learn More Link */
.learn-more-link {
    color: var(--color-primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.learn-more-link:hover {
    opacity: 0.8;
}

/* Language Selector */
.language-selector {
    position: relative;
    display: inline-block;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-main);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
}

.current-lang {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-arrow {
    font-size: 0.65rem;
    transition: transform 0.2s;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    min-width: 160px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 200;
    overflow: hidden;
    display: none;
}

.lang-dropdown.open {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text);
    transition: background 0.2s;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.lang-option.active {
    background: rgba(127, 0, 255, 0.1);
    color: var(--color-primary);
}

.lang-option.active::after {
    content: "✓";
    margin-left: auto;
    font-size: 0.8rem;
}

/* Navbar language selector - compact mode */
.nav-links .language-selector .lang-btn {
    padding: 4px 10px;
    font-size: 0.8rem;
}

.nav-links .language-selector .current-lang {
    font-size: 0.8rem;
}

/* Consistent flag sizing */
.lang-flag {
    display: inline-block;
    min-width: 1.2em;
    text-align: center;
    font-size: 0.9em;
}

/* Footer language selector */
.footer .language-selector {
    margin-top: 15px;
}

/* Hide mobile logo on desktop (default) */
.logo-mobile {
    display: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .lang-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .lang-btn .lang-name {
        display: none;
        /* Hide language name, show only flag on mobile */
    }

    .lang-dropdown {
        min-width: 140px;
        right: auto;
        left: 0;
    }

    .lang-option {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .nav-links .language-selector .lang-btn {
        padding: 4px 8px;
    }

    /* Hide username on mobile to save space */
    .user-badge {
        display: none;
    }

    /* Hide regular logo on mobile */
    .logo-desktop {
        display: none;
    }

    /* Show stacked logo on mobile */
    .logo-mobile {
        display: flex;
        align-items: center;
        gap: 2px;
        text-decoration: none;
    }

    .logo-mobile .logo-text {
        display: flex;
        flex-direction: column;
        line-height: 1;
        font-family: 'Tomorrow', sans-serif;
        font-size: 1.1rem;
        color: white;
    }

    .logo-mobile .logo-text .logo-story {
        margin-bottom: -2px;
    }

    .logo-mobile .logo-x {
        font-family: 'Inter', sans-serif;
        font-weight: 700;
        font-size: 2.2rem;
        color: var(--color-primary);
        line-height: 1;
        margin-left: 2px;
    }
}