/* Mobile-specific styles - completely separate from desktop */

/* Mobile container */
.container {
    padding: 0 1rem;
}

/* Mobile Landing Section */
.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    padding: 2rem 0;
    overflow: hidden; /* Important for slide-in effect */
}

.landing-content {
    text-align: center;
    animation: fadeInUp 1s ease;
}

.logo-main {
    width: 200px;
    max-width: 70vw;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 15px 30px rgba(99, 102, 241, 0.3));
}

.tagline {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    position: relative;
    transition: transform 0.1s ease;
}

.tagline.jittering {
    animation: jitter 0.1s infinite;
}

.subtitle {
    font-size: 1rem;
    font-style: italic;
    font-family: 'EB Garamond', 'Noto Serif SC', serif;
    color: var(--light-text);
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Mobile Character Portraits for Landing */
.mobile-character-left,
.mobile-character-right {
    position: absolute;
    top: 0;
    height: 100vh;
    z-index: 5; /* Behind main content */
    pointer-events: none;
}

.mobile-character-left {
    left: 0;
    transform: translateX(-100%); /* Start completely off-screen */
}

.mobile-character-right {
    right: 0;
    transform: translateX(100%); /* Start completely off-screen */
}

.mobile-character-left img,
.mobile-character-right img {
    height: 100vh;
    width: auto;
    min-width: 100%;
    object-fit: cover;
    opacity: 0.3; /* Subtle presence */
    filter: brightness(0.8) contrast(1.1);
}

/* Calculate slide distance based on landing content width */
.landing-content {
    position: relative;
    z-index: 10;
    background: rgba(15, 15, 26, 0.8); /* Dark background with 80% opacity */
    /* backdrop-filter: blur(10px); removed blur effect */
    border-radius: 30px;
    padding: 3rem 2rem;
    margin: 0 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                inset 0 0 60px rgba(99, 102, 241, 0.1); /* Subtle inner glow */
    border: 1px solid rgba(99, 102, 241, 0.2); /* Subtle border matching primary color */
}

/* Animation states - will be calculated via JS for precise positioning */
.mobile-character-left.slide-in {
    animation: slideInLeft 1s ease-out 0.3s forwards;
}

.mobile-character-right.slide-in {
    animation: slideInRight 1s ease-out 0.5s forwards;
}

/* Keyframes are dynamically generated in JavaScript based on content width */

/* Mobile Characters - Show floating sprites at bottom */
.characters-container {
    position: fixed;
    bottom: 60px; /* Above floating bar */
    left: 0;
    right: 0;
    height: 120px;
    pointer-events: none;
    z-index: 500;
}

.characters-left, .characters-right {
    display: none; /* Hide main characters on mobile */
}

.character-floating {
    position: absolute;
    opacity: 0.8;
    pointer-events: none;
}

#char-sprite {
    width: 60px;
    height: auto;
    left: 10px;
    bottom: 10px;
}

#char-six {
    width: 50px;
    height: auto;
    right: 10px;
    bottom: 10px;
}

/* Mobile Character Staircase Section */
.mobile-staircase-section {
    height: 60vh;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
}

.staircase-characters-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: visible;
}

.staircase-left,
.staircase-right {
    position: absolute;
    bottom: 0;
    width: 50%;
    height: 100%;
}

.staircase-left {
    left: 0;
}

.staircase-right {
    right: 0;
}

.staircase-char {
    width: 160px; /* Scaled down from desktop's 320px */
    height: auto;
    opacity: 0;
    position: absolute;
    transition: all 0.5s ease;
    mask: linear-gradient(to bottom, white 0%, white 70%, transparent 100%);
    -webkit-mask: linear-gradient(to bottom, white 0%, white 70%, transparent 100%);
    transform: translateX(-200px); /* Start off-screen by default */
}

/* Right side characters start off-screen right */
.staircase-right .staircase-char {
    transform: translateX(200px); /* Start off-screen right */
}

/* Direct copy of desktop positioning, scaled for mobile, pushed further outward */
#stair-basil {
    bottom: 45%;
    left: -10%; /* 5% - 15% = -10% */
    z-index: 1;
}

#stair-dimitri {
    bottom: 25%;
    left: 15%; /* 30% - 15% = 15% */
    z-index: 2;
}

#stair-kat {
    bottom: 5%;
    left: -15%; /* 15% - 15% - 15% = -15% (shifted further left) */
    z-index: 3;
}

#stair-mari {
    bottom: 45%;
    right: -10%; /* 5% - 15% = -10% */
    z-index: 1;
    width: 130px; /* Smaller like desktop */
}

#stair-random-1 {
    bottom: 25%;
    right: 15%; /* 30% - 15% = 15% */
    z-index: 2;
}

#stair-random-2 {
    bottom: 5%;
    right: -15%; /* 15% - 15% - 15% = -15% (shifted further right) */
    z-index: 3;
}

/* Slide-in animations for staircase */
.staircase-char.slide-in-left {
    opacity: 1;
    animation: staircaseSlideInLeft 0.8s ease forwards;
}

.staircase-char.slide-in-right {
    opacity: 1;
    animation: staircaseSlideInRight 0.8s ease forwards;
}

@keyframes staircaseSlideInLeft {
    from {
        transform: translateX(-200px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes staircaseSlideInRight {
    from {
        transform: translateX(200px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Demo Section */
.demo-section {
    padding: 3rem 0;
    background: rgba(0, 0, 0, 0.3);
}

.demo-section h2 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 0 auto;
    max-width: 100%;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* Mobile Synopsis Section */
.hero-section {
    padding: 3.5rem 0 3rem;
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.05) 100%);
}

.hero-description {
    font-family: 'EB Garamond', 'Noto Serif SC', serif;
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 1.9;
    color: var(--light-text);
    text-align: center;
    opacity: 0.95;
    letter-spacing: 0.01em;
}

.hero-description em {
    font-style: italic;
}

/* Mobile Character Section */
.character-section {
    padding: 3rem 0;
    background: rgba(0, 0, 0, 0.2);
}

.character-showcase {
    max-width: 500px;
    margin: 0 auto;
}

.character-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.character-image {
    position: relative;
    border-radius: 20px;
    overflow: visible; /* Keep visible for Chinese names */
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 250px; /* Fixed width for container */
    height: 365px; /* Height maintaining 500:731 aspect ratio */
}

.character-image img {
    width: auto;
    height: 100%; /* Force height to match container */
    min-width: 100%; /* Ensure full coverage */
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the image */
    object-fit: cover; /* Maintain aspect ratio while filling height */
    border-radius: 20px; /* Match container radius */
}

/* Width-based scaling for specific characters like Six app */
.character-image.width-based img {
    width: 100%; /* Force width to match container */
    height: auto !important; /* Let height adjust */
    min-width: 100%; /* Keep full width coverage */
    min-height: unset; /* Remove height constraint */
    object-fit: contain; /* Show full image within bounds */
}

.vertical-chinese-name {
    position: absolute;
    left: -35px;
    top: 50%;
    transform: translateY(-50%);
    height: auto;
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--char-accent, var(--accent-color));
    text-shadow: 0 0 20px color-mix(in srgb, var(--char-accent, var(--accent-color)) 50%, transparent);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    z-index: 20;
    letter-spacing: 0.2em;
    white-space: nowrap; /* Prevent text wrapping */
    word-break: keep-all; /* Keep characters together */
    line-height: 1; /* Tighter line height */
}

.character-info {
    width: 100%;
    text-align: center;
}

.character-name h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Playfair Display', serif;
}

.character-name h4 {
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0.3rem 0 0.5rem 0;
    color: var(--secondary-color);
    opacity: 0.9;
    font-family: 'Noto Sans SC', sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--char-accent, var(--accent-color)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.character-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
    font-family: 'Noto Sans SC', sans-serif;
    letter-spacing: 0.1em;
    justify-content: center;
}

.character-stats span:not(:last-child)::after {
    content: "•";
    margin-left: 0.5rem;
    opacity: 0.5;
}

.character-stats span:last-child {
    font-weight: 600;
    color: var(--char-accent, var(--accent-color));
}

#char-description {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    opacity: 0.9;
}

.char-quotes-container {
    margin-bottom: 1.5rem;
}

.char-quote {
    font-family: 'Inter', sans-serif;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--char-accent, var(--accent-color));
    border-left: 2px solid var(--char-accent, var(--accent-color));
    padding-left: 0.75rem;
    margin: 0 0 0.75rem 0;
    opacity: 0.95;
    text-align: left;
}

.char-quote:last-child {
    margin-bottom: 0;
}

.character-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.trait {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Mobile Character Navigation */
.character-navigation-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.gradient-left {
    left: 0;
    background: linear-gradient(to right, rgba(15, 15, 26, 1) 0%, rgba(15, 15, 26, 0.8) 50%, transparent 100%);
}

.gradient-right {
    right: 0;
    background: linear-gradient(to left, rgba(15, 15, 26, 1) 0%, rgba(15, 15, 26, 0.8) 50%, transparent 100%);
}

.character-navigation {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.character-navigation::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.char-nav-btn {
    width: 60px;
    height: 60px;
    min-width: 60px; /* Prevent shrinking */
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    padding: 0;
    flex-shrink: 0; /* Prevent flex shrinking */
}

/* Inner frame: clips the portrait independently of the border, so the
   outline stays put while the portrait moves beneath it. */
.char-nav-thumb {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 8px; /* tile radius minus border */
    overflow: hidden;
    clip-path: inset(0 round 8px);
}

.char-nav-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Portraits are tall: keep the face, let the body crop. */
    object-position: 50% 0;
    transform-origin: 50% 20%;
    transition: transform 0.3s ease;
    display: block;
}

.char-nav-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.char-nav-btn:hover img {
    transform: translateY(-4px) scale(1.08);
}

.char-nav-btn.active {
    border-color: var(--char-accent, var(--accent-color));
    background: color-mix(in srgb, var(--char-accent, var(--accent-color)) 12%, transparent);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--char-accent, var(--accent-color)) 30%, transparent);
}

/* Mobile Screenshots Section */
.screenshots-section {
    padding: 3rem 0;
    background: rgba(0, 0, 0, 0.3);
}

.screenshots-carousel {
    width: 100%;
}

.screenshot-container {
    position: relative;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.screenshot {
    width: 100%;
    height: auto;
    display: none;
}

.screenshot.active {
    display: block;
}

.screenshot-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* Mobile Signup Section */
.signup-section {
    padding: 3rem 0;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
}

.signup-section h2 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.signup-description {
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

.email-input {
    padding: 1rem;
    border-radius: 10px;
    font-size: 1rem;
}

.signup-button {
    background: var(--gradient-1);
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.signup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.signup-note {
    font-size: 0.9rem;
    text-align: center;
    opacity: 0.8;
    line-height: 1.5;
}

/* Mobile Footer */
.footer {
    padding: 2rem 0;
    background: rgba(0, 0, 0, 0.5);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1) !important;
    -webkit-text-fill-color: initial !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color) !important;
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.footer-text {
    opacity: 0.7;
    text-align: center;
    font-size: 0.9rem;
}
/* Six App Store Card — mobile sizing */
.six-section {
    padding: 0.5rem 0 1rem;
}

.six-store-card {
    padding: 1.5rem 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    border-radius: 18px;
}

.six-header {
    gap: 0.9rem;
    flex-wrap: wrap;
}

.six-icon {
    width: 76px;
    height: 76px;
}

.six-title {
    font-size: 1.5rem;
}

.six-subtitle {
    font-size: 0.9rem;
}

.six-rating-line {
    font-size: 0.78rem;
    flex-wrap: wrap;
}

.six-get-btn {
    margin-left: auto;
}

.six-stats {
    grid-template-columns: repeat(2, 1fr);
}

.six-stat:nth-child(3) {
    border-left: none;
}

.six-stat:nth-child(n+3) {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.six-pitch {
    font-size: 1.15rem;
}

.six-reviews-head {
    padding-top: 1.15rem;
}

.six-rating-summary {
    gap: 0.9rem;
}

.six-rating-big-number {
    font-size: 2.1rem;
}

.signup-icon {
    width: 96px;
    height: 96px;
    margin-bottom: 1.5rem;
}

.character-navigation-row {
    gap: 0.5rem;
}

.character-navigation-row .character-navigation-wrapper {
    flex: 1 1 auto;
}

.char-nav-arrow {
    width: 36px;
    height: 36px;
}
