/*
 * mobile.css - Mobile-First Responsive Styles
 * 
 * BREAKPOINT REFERENCE (005-ui-overhaul):
 * ----------------------------------------
 * Base:    320px+ (mobile first - default styles)
 * sm:      480px+ (larger phones)
 * md:      720px+ (tablets)
 * lg:      860px+ (small desktops) 
 * xl:      960px+ (desktops)
 * xxl:    1200px+ (large desktops)
 *
 * Current breakpoints in use:
 *   @media (max-width: 480px)  - Extra-small phones
 *   @media (max-width: 640px)  - Small phones
 *   @media (max-width: 768px)  - Phones/small tablets
 *   @media (min-width: 720px)  - Tablets+
 *   @media (min-width: 860px)  - Small desktops+
 *
 * Touch target minimum: 44x44px (var(--touch-target-min))
 */

/* ============================================================================
   Header Full & Sticky Styles
   ============================================================================ */

/* Header Banner Image - scrolls away, not sticky */
.header-banner {
    width: 100%;
    max-width: 960px;
    margin: 0 auto 8px;
    padding: 0 16px;
    box-sizing: border-box;
}

.header-banner__content {
    --hero-banner-image-size: clamp(56px, 14vw, 120px);
    --hero-banner-gap: clamp(10px, 2vw, 20px);
    --hero-banner-font-size: calc(var(--hero-banner-image-size) * 0.55);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: var(--hero-banner-gap);
    width: 100%;
    min-height: var(--hero-banner-image-size);
}

.header-banner__thumb-frame {
    width: var(--hero-banner-image-size);
    height: var(--hero-banner-image-size);
    border-radius: clamp(12px, 2.5vw, 18px);
    background: radial-gradient(circle at 30% 30%, rgba(122, 240, 255, 0.16), rgba(68, 255, 178, 0.08)), rgba(6, 10, 22, 0.8);
    border: 1px solid rgba(122, 240, 255, 0.28);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.header-banner__thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: auto;
    transition: transform 0.2s ease;
}

.header-banner__thumb.is-flipped {
    transform: scaleX(-1);
}

.header-banner__title {
    margin: 0;
    font-family: 'Press Start 2P', cursive;
    font-size: var(--hero-banner-font-size);
    letter-spacing: 1px;
    color: #44ffb2;
    background: linear-gradient(120deg, #d7fff1 0%, #a4ffd8 30%, #44ffb2 55%, #7af0ff 72%, #2ee6a6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(68, 255, 178, 0.45), 0 0 22px rgba(122, 240, 255, 0.25);
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    justify-self: stretch;
}

/* Header container - matches content width */
.header-container {
    max-width: calc(960px + 32px); /* Content max + padding */
    margin: 0 auto;
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
}

.header-full {
    position: relative; /* Allow top row to scroll with the page */
    z-index: 2;
    background: linear-gradient(135deg, rgba(12, 13, 20, 0.98), rgba(8, 10, 18, 0.98));
    border-bottom: 1px solid rgba(122, 240, 255, 0.2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    padding: 12px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    /* Extend to page edges for full-width background */
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
}

.header-full.is-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.header-full__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
}

.header-title {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(12px, 4vw + 4px, 22px);
    letter-spacing: 1px;
    color: #44ffb2;
    text-shadow: 0 0 8px rgba(68, 255, 178, 0.3);
    text-decoration: none;
    line-height: 1.35;
    flex: 1 1 auto;
    max-width: 60vw;
}

.header-title--sticky {
    font-size: clamp(12px, 2vw + 6px, 18px);
}

.header-full__controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

.header-credits {
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(3, 6, 18, 0.8);
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid rgba(122, 240, 255, 0.25);
}

.credit-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    background: rgba(68, 255, 178, 0.1);
    border-radius: 6px;
}

.credit-icon {
    font-size: 14px;
}

.credit-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    min-width: 18px;
    text-align: center;
}

.credit-buy-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--bg);
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}

.credit-buy-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 10px rgba(68, 255, 178, 0.4);
}

.header-auth {
    display: flex;
    gap: 8px;
}

.header-auth-btn {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(11px, 2.8vw, 13px);
    font-weight: 600;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(122, 240, 255, 0.35);
    color: #f6fbff;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.header-auth-btn:hover {
    background: rgba(122, 240, 255, 0.15);
    border-color: rgba(122, 240, 255, 0.6);
}

.header-profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(68, 255, 178, 0.15), rgba(122, 240, 255, 0.12));
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
}

.header-profile-btn:hover {
    background: linear-gradient(135deg, rgba(68, 255, 178, 0.25), rgba(122, 240, 255, 0.2));
    transform: scale(1.08);
    box-shadow: 0 0 12px rgba(122, 240, 255, 0.3);
}

.header-profile-icon {
    font-size: 22px;
    line-height: 1;
}

/* Progress Bar in Full Header */
.header-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0; /* Allow shrinking */
}

.header-progress__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.header-progress__bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(122, 240, 255, 0.15);
}

.header-progress__fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #44ffb2, #7af0ff);
    border-radius: inherit;
    transition: width 0.3s ease;
}

.header-progress__steps {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
    min-width: 0; /* Allow shrinking below content size */
}

.header-progress__thumb {
    --header-thumb-size: clamp(46px, 8vw, 64px);
    width: var(--header-thumb-size);
    height: var(--header-thumb-size);
    border-radius: 12px;
    background: radial-gradient(circle at 30% 30%, rgba(122, 240, 255, 0.18), rgba(68, 255, 178, 0.08)), rgba(6, 10, 22, 0.85);
    border: 1px solid rgba(122, 240, 255, 0.3);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.header-progress__thumb-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: auto;
    transition: transform 0.2s ease;
}

.header-progress__thumb-image.is-flipped {
    transform: scaleX(-1);
}

.header-progress__step {
    flex: 1;
    min-width: 0; /* Allow shrinking */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-progress__step:hover .step-dot {
    border-color: rgba(122, 240, 255, 0.8);
    box-shadow: 0 0 8px rgba(122, 240, 255, 0.4);
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(20, 24, 40, 0.9);
    border: 2px solid rgba(122, 240, 255, 0.35);
    transition: all 0.2s ease;
}

.header-progress__step.is-active .step-dot {
    background: #7af0ff;
    border-color: #7af0ff;
    box-shadow: 0 0 12px rgba(122, 240, 255, 0.6);
}

.header-progress__step.is-complete .step-dot {
    background: #44ffb2;
    border-color: #44ffb2;
}

.step-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.header-progress__step.is-active .step-label,
.header-progress__step.is-complete .step-label {
    color: #7af0ff;
}

.header-progress__step:hover .step-label {
    color: rgba(255, 255, 255, 0.8);
}

/* Sticky Header (with full progress) */
.header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
    background: linear-gradient(135deg, rgba(12, 13, 20, 0.98), rgba(8, 10, 18, 0.98));
    backdrop-filter: blur(12px);
    padding: 10px 0 12px;
    border-bottom: 1px solid rgba(122, 240, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}

.header-sticky__row {
    display: none; /* Keep only the progress bar sticky */
}

.header-sticky.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.header-sticky__progress {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.header-sticky__bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(122, 240, 255, 0.15);
}

.header-sticky__fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #44ffb2, #7af0ff);
    border-radius: inherit;
    transition: width 0.3s ease;
}

.header-sticky__steps {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
    min-width: 0;
}

/* Mobile responsiveness for header */
@media (max-width: 640px) {
    .header-full {
        padding: 10px 0;
    }

    .header-full__row {
        gap: 10px;
    }

    .header-title {
        font-size: clamp(12px, 4.5vw + 2px, 18px);
        max-width: 58vw;
        line-height: 1.2;
    }

    .header-full__controls {
        gap: 8px;
    }

    .header-auth-btn {
        padding: 8px 10px;
        min-height: 40px;
    }

    .header-profile-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 18px;
    }
    
    .header-credits {
        padding: 4px 8px;
    }
    
    .credit-value {
        font-size: 10px;
    }
    
    .step-label {
        display: none;
    }
    
    .step-dot {
        width: 14px;
        height: 14px;
    }

    .header-progress__thumb {
        --header-thumb-size: clamp(40px, 12vw, 54px);
    }
    
    /* Ensure progress steps don't exceed content width */
    .header-progress__steps,
    .header-sticky__steps {
        gap: 2px;
    }
    
    .header-progress__step {
        padding: 6px 2px;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .header-full {
        padding: 10px 0;
        margin-left: -12px;
        margin-right: -12px;
        width: calc(100% + 24px);
    }

    .header-container {
        padding: 0 12px;
    }

    .header-sticky {
        padding: 8px 0 10px;
    }

    .header-title {
        font-size: clamp(11px, 5vw + 2px, 16px);
        max-width: 56vw;
    }

    .header-title--sticky {
        font-size: clamp(11px, 3vw + 4px, 16px);
    }

    .header-auth-btn {
        padding: 7px 10px;
        font-size: clamp(9px, 2.6vw, 11px);
        min-height: 36px;
    }

    /* Tighter progress bar on small screens */
    .header-progress__steps,
    .header-sticky__steps {
        gap: 0;
    }

    .step-dot {
        width: 12px;
        height: 12px;
    }
}

.mobile-body {
    background: #0c0d14;
}

.mobile-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-page,
.mobile-page p,
.mobile-page label,
.mobile-page input,
.mobile-page button,
.mobile-page textarea,
.mobile-page select {
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    letter-spacing: 0.02em;
    line-height: 1.65;
    color: var(--text);
}

/* Headlines use Press Start 2P for retro aesthetic */
.mobile-page h1,
.mobile-page h2,
.mobile-page h3 {
    font-family: 'Press Start 2P', cursive;
}

.mobile-page .hint {
    color: #d9e7ff;
}

.mobile-page strong {
    color: #fff;
}

.banner--compact {
    padding: 18px 16px;
    border-radius: 18px;
    display: grid;
    gap: 12px;
}

.stats-deck--mobile {
    width: 100%;
    max-width: 460px;
    flex-direction: column;
    padding: 8px;
    gap: 6px;
}

.stats-deck--mobile .metric {
    width: 100%;
    min-width: 0;
    padding: 6px 8px;
}

.mobile-main {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 12px;
    width: 100%;
    align-items: center;
}

/* Credits Card - displayed above Step 1 */
.credits-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(68, 255, 178, 0.08), rgba(122, 240, 255, 0.06));
    border: 1px solid rgba(122, 240, 255, 0.25);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.credits-card__items {
    display: flex;
    gap: 20px;
}

.credits-card__item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.credits-card__icon {
    font-size: 20px;
}

.credits-card__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.credits-card__label {
    font-size: 10px;
    font-weight: 600;
    color: var(--muted, #c7d5f2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.credits-card__value {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: var(--accent, #44ffb2);
}

.credits-card__buy-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #44ffb2, #7af0ff);
    color: #021016;
    border: none;
    border-radius: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(68, 255, 178, 0.3);
    white-space: nowrap;
}

.credits-card__buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(68, 255, 178, 0.4);
}

.credits-card__buy-btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .credits-card {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .credits-card__items {
        width: 100%;
        justify-content: center;
    }
    
    .credits-card__buy-btn {
        width: 100%;
    }
}

.mobile-nav .pill-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mobile-nav {
    width: 100%;
    text-align: center;
    position: sticky;
    top: 110px;
    z-index: 40;
    background: linear-gradient(180deg, rgba(12, 13, 20, 0.96) 0%, rgba(12, 13, 20, 0.85) 100%);
    padding: 8px 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(122, 240, 255, 0.25);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}

.mobile-nav .hint {
    text-align: center;
}

.flow-progress {
    margin-top: 10px;
    display: grid;
    gap: 6px;
}

.flow-progress__label {
    font-size: 12px;
    color: #d9e7ff;
    text-transform: uppercase;
}

.flow-progress__track {
    background: rgba(31, 35, 54, 0.7);
    border-radius: 999px;
    border: 1px solid rgba(122, 240, 255, 0.24);
    height: 10px;
    overflow: hidden;
}

.flow-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, #44ffb2, #7af0ff);
    width: 0;
    transition: width 0.25s ease;
}

.pill-nav .pill {
    background: #1b1e2a;
    color: #f5f7ff;
    border: 1px solid #2e3143;
    border-radius: 999px;
    padding: 12px 16px;
    min-height: var(--touch-target-min, 44px);
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.pill-nav .pill.is-active {
    border-color: #5a7bff;
    background: linear-gradient(135deg, rgba(90, 123, 255, 0.24), rgba(21, 25, 45, 0.95));
    box-shadow: 0 6px 18px rgba(90, 123, 255, 0.25);
}

.mobile-section {
    background: linear-gradient(145deg, rgba(20, 22, 36, 0.96), rgba(11, 13, 24, 0.92));
    border: 1px solid rgba(122, 240, 255, 0.2);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    width: 100%;
}

.collapsible {
    position: relative;
}

.collapsible__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 8px;
    margin: -8px;
    border-radius: 12px;
    transition: background-color 0.15s ease;
}

.collapsible__header:hover {
    background-color: rgba(122, 240, 255, 0.06);
}

.collapsible__header:active {
    background-color: rgba(122, 240, 255, 0.1);
}

.collapsible__header .section-heading {
    padding-right: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.collapsible__header .section-heading h2 {
    margin: 0;
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(11px, 3.4vw, 14px);
    line-height: 1.25;
}

.collapsible__toggle {
    align-self: flex-start;
    width: var(--touch-target-min, 44px);
    height: var(--touch-target-min, 44px);
    border-radius: 12px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(122, 240, 255, 0.4);
    color: #e8f0ff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

/* Summary indicator shown when section is collapsed (T018, T019) */
.collapsible__summary {
    display: none;
    font-size: 12px;
    color: var(--accent, #44ffb2);
    font-weight: 500;
    margin-top: 4px;
}

.collapsible.is-collapsed .collapsible__summary:not(:empty) {
    display: block;
}

/* Route color preview swatch in step 2 header */
.route-color-preview-wrapper {
    display: none;
    align-items: center;
    gap: 4px;
}

.route-color-preview-wrapper .route-color-label {
    font-size: 12px;
    color: var(--accent, #44ffb2);
    font-weight: 500;
    white-space: nowrap;
}

.route-color-preview {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.collapsible.is-collapsed .route-color-preview-wrapper {
    display: inline-flex;
}

.collapsible__body {
    margin-top: 10px;
}

.collapsible.is-collapsed .collapsible__body {
    display: none;
}

.collapsible__footer {
    margin-top: 14px;
    display: grid;
    gap: 10px;
    text-align: center;
}

.collapsible__footer-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.next-btn {
    background: linear-gradient(135deg, #44ffb2, #7af0ff);
    color: #021016;
    box-shadow: 0 8px 20px rgba(68, 255, 178, 0.32);
    min-width: 170px;
}

.flight-import-label {
    margin: 0 0 10px;
    text-align: center;
    width: 100%;
}

.flight-import-label span {
    font-weight: 700;
}

.mobile-section .section-heading {
    margin-bottom: 10px;
}

.mobile-section .button-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mobile-section .button-row button,
.render-actions button,
.video-card__buttons button,
.collapsible__footer-actions .primary,
.collapsible__footer-actions .ghost {
    width: 100%;
    max-width: 320px;
}

.mobile-section .inputs {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-section .inputs textarea {
    width: 100%;
    max-width: 500px;
}

.mobile-section textarea.has-error {
    border: 2px solid var(--danger);
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.35);
}

.mobile-section .inputs .hint {
    text-align: center;
}

.input-feedback {
    color: var(--danger);
    margin-top: 6px;
    width: 100%;
    max-width: 520px;
    text-align: left;
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.32);
    border-radius: 10px;
    padding: 8px 16px;
    list-style: disc;
}

/* Hide the feedback container when empty */
.input-feedback:empty,
#flight-validation:empty {
    display: none;
}

.input-feedback--ok {
    color: var(--accent);
    border-color: rgba(68, 255, 178, 0.45);
    background: rgba(68, 255, 178, 0.1);
}

.mobile-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-panel {
    background: #121524;
    border-radius: 12px;
    border: 1px solid #1f2335;
    padding: 12px;
}

.map-selector-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.map-selector-row select,
.map-selector-row button {
    flex: 1 1 240px;
}

.mobile-footer-banner {
    margin-top: 18px;
    text-align: center;
    padding: 16px 14px;
    gap: 10px;
    width: 100%;
}

.mobile-footer-banner h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 6px;
}

.mobile-footer-banner .subtitle {
    color: #cfd9f7;
    font-size: 13px;
}

.hero-mode {
    display: grid;
    gap: 10px;
    margin-bottom: 8px;
    justify-items: center;
}

/* ============================================================================
   Step 1 - Hero Design (New Layout)
   ============================================================================ */

.login-required-badge {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--warning, #ffc857);
    background: rgba(255, 200, 87, 0.15);
    border: 1px solid rgba(255, 200, 87, 0.4);
    padding: 4px 10px;
    border-radius: 6px;
    margin-left: 12px;
}

.login-required-badge.is-hidden {
    display: none;
}

/* Hero Option Buttons */
.hero-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.hero-option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    background: rgba(31, 35, 54, 0.9);
    border: 1px solid rgba(122, 240, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.hero-option-btn:hover {
    border-color: rgba(122, 240, 255, 0.6);
    background: rgba(41, 46, 68, 0.95);
    transform: translateX(4px);
}

.hero-option-btn.is-active {
    border-color: #7af0ff;
    background: linear-gradient(135deg, rgba(122, 240, 255, 0.15), rgba(68, 255, 178, 0.1));
    box-shadow: 0 0 16px rgba(122, 240, 255, 0.2);
}

.hero-option-btn__letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(122, 240, 255, 0.2), rgba(68, 255, 178, 0.15));
    border: 1px solid rgba(122, 240, 255, 0.4);
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #7af0ff;
    flex-shrink: 0;
}

.hero-option-btn__label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #f6fbff;
    letter-spacing: 0.3px;
}

/* Hero Panels (expandable) */
.hero-panel {
    background: linear-gradient(135deg, rgba(20, 24, 40, 0.98), rgba(12, 15, 28, 0.95));
    border: 1px solid rgba(122, 240, 255, 0.25);
    border-radius: 14px;
    margin-bottom: 16px;
    overflow: hidden;
    animation: panelSlideIn 0.25s ease-out;
}

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

.hero-panel[hidden] {
    display: none;
}

.hero-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(122, 240, 255, 0.08);
    border-bottom: 1px solid rgba(122, 240, 255, 0.15);
}

.hero-panel__header h3 {
    margin: 0;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    color: #7af0ff;
}

.hero-panel__close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #f6fbff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.hero-panel__close:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.4);
    color: var(--danger);
}

.hero-panel__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hero-panel__body .hero-preview-tile {
    margin-top: 8px;
}

.hero-panel__body .hero-flip-controls {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

.hero-panel__body .ai-hero-cropper {
    max-width: 300px;
    margin: 0 auto;
    width: 100%;
}

.hero-panel__body .ai-hero-preview {
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
}

.hero-panel__body .hero-input-row {
    max-width: 300px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
}

.hero-panel__body .hero-input-row .file-label {
    flex: 1;
}

.hero-panel__body .hero-input-row .camera-btn {
    flex: 0 0 auto;
}

.hero-panel__body .ai-hero-primary-actions {
    max-width: 300px;
    margin: 0 auto;
    width: 100%;
}

.hero-panel__body .ai-hero-primary-actions button {
    width: 100%;
}

/* AI Provider Toggle Buttons */
.ai-provider-toggle {
    margin-bottom: 16px;
}

.ai-provider-toggle .toggle-label {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.ai-provider-buttons {
    display: flex;
    gap: 8px;
    width: 100%;
}

.ai-provider-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    border: 2px solid rgba(122, 240, 255, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--muted, #c7d5f2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-provider-btn:hover {
    border-color: rgba(122, 240, 255, 0.5);
    background: rgba(122, 240, 255, 0.1);
}

.ai-provider-btn.is-selected {
    border-color: rgba(255, 138, 101, 0.8);
    background: linear-gradient(135deg, rgba(255, 138, 101, 0.25), rgba(255, 213, 79, 0.2));
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 138, 101, 0.3);
}

.ai-provider-btn.is-selected:hover {
    border-color: rgba(255, 138, 101, 1);
}

/* Previous Heroes Gallery */
.previous-heroes {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(122, 240, 255, 0.15);
}

.previous-heroes__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.previous-heroes__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted, #c7d5f2);
    margin: 0;
}

.previous-heroes__edit {
    font-size: 11px;
    color: var(--accent, #44ffb2);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.previous-heroes__edit:hover {
    opacity: 1;
    text-decoration: underline;
}

.previous-heroes__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
}

.previous-hero-item {
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(122, 240, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.previous-hero-item:hover {
    border-color: rgba(122, 240, 255, 0.6);
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(122, 240, 255, 0.2);
}

.previous-hero-item.is-selected {
    border-color: #44ffb2;
    box-shadow: 0 0 0 2px rgba(68, 255, 178, 0.3);
}

.previous-hero-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.previous-hero-placeholder {
    grid-column: 1 / -1;
    padding: 20px;
    text-align: center;
    color: var(--muted, #c7d5f2);
    font-size: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(122, 240, 255, 0.2);
    border-radius: 10px;
}

/* ============================================================================
   Step 2 - Sizing Cards (Simplified Layout)
   ============================================================================ */

.sizing-card {
    background: linear-gradient(145deg, rgba(20, 22, 36, 0.96), rgba(11, 13, 24, 0.92));
    border: 1px solid rgba(122, 240, 255, 0.2);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sizing-card__preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.sizing-card__label {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    color: #7af0ff;
    margin: 0;
    text-transform: uppercase;
}

.sizing-card__frame {
    width: 180px;
    height: 180px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(122, 240, 255, 0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sizing-card__frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.sizing-card__controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.sizing-card__flip-btn {
    align-self: center;
    min-width: 120px;
}

.sizing-extras {
    display: flex;
    justify-content: center;
    padding: 12px 0;
    margin-bottom: 8px;
}

.sizing-extras .color-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sizing-extras .color-label span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    color: var(--text, #f6fbff);
}

.sizing-extras .color-label input[type="color"] {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(122, 240, 255, 0.3);
    border-radius: 8px;
    padding: 2px;
    cursor: pointer;
    background: transparent;
}

.hero-mode-switch {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 600px;
}

.hero-mode-option {
    position: relative;
    background: #161927;
    border: 1px solid #2b3043;
    border-radius: 10px;
    padding: 10px 12px;
    display: grid;
    gap: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.hero-mode-option input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.hero-mode-option__label {
    font-weight: 700;
    color: #f5f7ff;
}

.hero-mode-option__hint {
    color: #a9b0c7;
    font-size: 12px;
    line-height: 1.4;
}

.hero-mode-option.is-selected {
    border-color: #4d7cff;
    background: linear-gradient(140deg, rgba(77, 124, 255, 0.2), rgba(22, 25, 39, 0.8));
}

.hero-mode-panels {
    display: grid;
    gap: 12px;
    justify-items: center;
}

.hero-mode-panels .ai-hero-card,
.hero-mode-panels .hero-upload-card {
    width: 100%;
    max-width: 500px;
}

.hero-mode-panels .ai-hero-card__header {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    align-items: center;
}

.hero-mode-panels .ai-hero-card__body {
    align-items: center;
}

.hero-mode-panels .ai-hero-cropper {
    width: 100%;
    max-width: 400px;
    align-items: center;
}

.hero-mode-panels .ai-hero-cropper__controls {
    width: 100%;
}

.hero-mode-panels .ai-hero-primary-actions {
    width: 100%;
    max-width: 320px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-mode-panels .ai-hero-primary-actions button {
    width: 100%;
}

.hero-mode-panels .ai-hero-preview {
    width: 100%;
    max-width: 400px;
}

.hero-mode-panels .hero-upload-card {
    text-align: center;
}

.hero-mode-panels .hero-upload-card .file-label {
    display: inline-block;
    margin: 0 auto;
}

.hero-mode-panels .hero-upload-card .inline-actions {
    justify-content: center;
}

.hero-mode-panels .hero-upload-card .hero-preview-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-mode-panels .hero-upload-card .hero-orientation-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.hero-flip-controls {
    display: flex;
    justify-content: center;
    padding: 12px 0;
}

.hero-mode-panels__notice {
    font-size: 12px;
    color: #9db2ff;
    background: #151a2b;
    border: 1px dashed #263259;
    padding: 8px 10px;
    border-radius: 10px;
}

.ai-hero-preview__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ai-hero-preview__actions .credits-hint {
    width: 100%;
    margin-bottom: 4px;
}

.ai-hero-preview__actions button {
    width: 100%;
    max-width: 280px;
}

.hero-mode-panels [data-hero-panel] {
    display: none;
}

.hero-mode-panels[data-mode="upload"] [data-hero-panel="upload"],
.hero-mode-panels[data-mode="generate"] [data-hero-panel="generate"] {
    display: block;
}

.compact-panel .slider-label + .slider-label,
.compact-panel .mobile-toggle-row,
.compact-panel .color-label,
.compact-panel .slider-label + .mobile-toggle-row {
    margin-top: 10px;
}

.hero-flip-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(122, 240, 255, 0.15);
}

.hero-flip-row button {
    min-width: 100px;
}

.hero-flip-row .hint {
    margin: 0;
    flex: 1;
}

.mobile-toggle-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    align-items: center;
}

.mobile-action-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 2px;
}

.hero-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
    justify-content: center;
    width: 100%;
}

.hero-input-row--compact {
    margin-top: 4px;
}

.hero-input-row .file-label {
    flex: 1 1 220px;
}

.hero-input-row .camera-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (min-width: 720px) {
    .hero-input-row {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .hero-input-row.hero-input-row--compact {
        justify-content: flex-end;
    }
}

.camera-btn.is-hidden {
    display: none;
}

.sizing-layout {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

.sizing-preview-card {
    display: grid;
    gap: 10px;
}

.sizing-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sizing-preview-stage {
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05), rgba(22, 25, 39, 0.85));
    border: 1px solid #1f2335;
    border-radius: 12px;
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.sizing-preview-box {
    background: #0d1020;
    border: 1px solid #252a3d;
    border-radius: 10px;
    padding: 10px;
    display: grid;
    gap: 8px;
    align-items: center;
    justify-items: center;
}

.sizing-preview-label {
    margin: 0;
    font-size: 12px;
    color: #a9b0c7;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.sizing-preview-frame {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed #2a3045;
    border-radius: 8px;
    padding: 10px;
    display: grid;
    place-items: center;
    width: 100%;
}

.sizing-preview-stage img {
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
    max-height: 140px;
    width: auto;
}

#sizing-aircraft {
    max-width: 90%;
}

#sizing-hero.is-flipped {
    transform: scaleX(-1);
}

.sizing-controls-panel .slider-control {
    max-width: 320px;
}

.sizing-controls-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sizing-controls-panel .hero-flip-row {
    width: 100%;
    max-width: 400px;
    justify-content: center;
}

.sizing-controls-panel .slider-label {
    width: 100%;
    max-width: 400px;
}

.sizing-controls-panel .mobile-toggle-row {
    width: 100%;
    max-width: 400px;
    justify-content: center;
}

.mobile-fold {
    background: #0f111a;
    border: 1px solid #1e2233;
    border-radius: 12px;
    padding: 10px 12px;
    width: 100%;
}

.mobile-fold summary {
    cursor: pointer;
    font-weight: 700;
}

.mobile-fold .tuning-grid,
.mobile-fold .advanced-panel__body {
    margin-top: 12px;
}

.canvas-panel.mobile-panel {
    padding: 12px;
    width: 100%;
}

.canvas-panel .canvas-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.canvas-panel .canvas-header > div {
    text-align: center;
}

.canvas-wrapper {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #1f2233;
    margin: 0 auto;
}

.mobile-post-preview {
    text-align: center;
}

.mobile-post-preview .render-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mobile-post-preview .render-option {
    width: 100%;
    max-width: 260px;
    text-align: left;
}

.mobile-post-preview .render-option select {
    width: 100%;
}

.video-download-panel {
    margin-top: 12px;
    text-align: center;
}

/* Mobile-specific: unified download panel content */
.video-download-panel__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 8px 4px;
}

.video-download-previews {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.video-preview-item {
    width: 90px;
    height: 90px;
}

.video-download-panel .video-download-options,
.video-download-panel .video-share-row {
    text-align: center;
}

.video-download-panel .download-formats,
.video-download-panel .share-formats {
    justify-content: center;
}

.video-download-panel .format-btn,
.video-download-panel .share-format-btn {
    min-height: var(--touch-target-min, 44px);
}

/* Keep old card styles for backwards compatibility */
.video-download-panel__cards {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Mobile-specific video cards - freely floating layout */
.video-download-panel__cards--mobile {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 100%;
}

.video-card--mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(122, 240, 255, 0.25);
    border-radius: 12px;
    min-width: 140px;
    max-width: 180px;
    flex: 1 1 140px;
}

.help-section {
    background: rgba(20, 24, 40, 0.95);
}

.help-list {
    list-style: none;
    padding-left: 0;
    display: grid;
    gap: 10px;
}

.help-list li {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(122, 240, 255, 0.24);
    background: rgba(255, 255, 255, 0.04);
}

.video-card--mobile .video-card__preview--large {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 120px;
    max-height: 120px;
    background: radial-gradient(circle at 30% 30%, rgba(122, 240, 255, 0.1), transparent 50%), #050812;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-card--mobile .video-card__preview--large img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.video-card--mobile .video-card__badge {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(122, 240, 255, 0.4);
    border-radius: 6px;
    color: #7af0ff;
    white-space: nowrap;
}

.video-card__buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.video-card__button-group {
    width: 100%;
    display: flex;
}

.video-card__button-group--share {
    flex-direction: column;
}

.video-card__buttons button {
    width: 100%;
    padding: 10px 14px;
    font-size: 12px;
    border-radius: 8px;
    min-height: var(--touch-target-min, 44px);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
}

.video-card__buttons button:active {
    transform: scale(0.97);
}

.video-card__buttons button[data-download-type="pc"] {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e8f0ff;
}

.video-card__buttons button[data-download-type="mobile"] {
    background: linear-gradient(135deg, #44ffb2, #7af0ff);
    border: none;
    color: #021016;
    font-weight: 600;
}

/* Stack cards vertically on very small screens */
@media (max-width: 480px) {
    .video-download-panel__cards--mobile {
        flex-direction: column;
        align-items: center;
    }
    
    .video-card--mobile {
        width: 100%;
        max-width: 220px;
        flex-direction: row;
        gap: 12px;
        padding: 10px 14px;
    }
    
    .video-card--mobile .video-card__preview--large {
        max-width: 80px;
        max-height: 80px;
        flex-shrink: 0;
    }
    
    .video-card__buttons {
        flex: 1;
    }
}

.mobile-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    align-items: center;
    width: 100%;
    justify-items: center;
    text-align: center;
}

@media (min-width: 860px) {
    .mobile-stack {
        flex-direction: row;
    }
    .mobile-stack > * {
        flex: 1;
    }
    .mobile-main {
        gap: 22px;
    }
}

@media (max-width: 640px) {
    .banner--compact .title-block h1 {
        font-size: 22px;
    }
    .mobile-nav .pill-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .mobile-panel textarea {
        min-height: 140px;
    }
    .canvas-panel .canvas-wrapper canvas {
        width: 100%;
        height: auto;
    }
    .mobile-action-row {
        grid-template-columns: 1fr;
    }
    .sizing-layout {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 720px) {
    .sizing-layout {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }
    .sizing-preview-card {
        align-self: stretch;
    }
}

.camera-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 8, 12, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 40;
}

.camera-overlay.hidden {
    display: none;
}

.camera-panel {
    background: #111423;
    border: 1px solid #22283a;
    border-radius: 14px;
    padding: 14px;
    width: min(560px, 100%);
    display: grid;
    gap: 10px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.camera-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.camera-stage {
    position: relative;
    background: #06070e;
    border: 1px solid #1c2030;
    border-radius: 12px;
    overflow: hidden;
    min-height: 320px;
}

.camera-stage video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================================================
   Profile Page - Mobile Styles
   ============================================================================ */

@media (max-width: 768px) {
    .profile-page .page {
        padding: 12px;
    }
    
    .profile-page .banner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-link {
        padding: 10px 16px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .profile-section {
        padding: 16px;
    }
    
    .section-title {
        font-size: 12px;
    }
    
    /* Account info mobile layout */
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .info-value {
        width: 100%;
    }
    
    /* Video grid - single column on mobile */
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-card-thumbnail {
        height: 180px;
    }
    
    .download-btn {
        min-height: 44px;
    }
    
    /* Hero gallery - 2 columns on mobile */
    .hero-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .hero-card-actions {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .hero-card-actions button {
        min-height: auto;
        padding: 4px 10px;
        font-size: 11px;
    }
    
    /* Delete modal */
    .modal-content {
        padding: 24px 20px;
        width: 95%;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-buttons button {
        width: 100%;
        min-height: 44px;
    }
    
    .confirmation-input {
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    /* Very small screens - hero gallery single column */
    .hero-gallery {
        grid-template-columns: 1fr;
    }
    
    .hero-card {
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    
    .hero-card-thumbnail {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
        aspect-ratio: auto;
    }
    
    .hero-card-content {
        flex: 1;
        min-width: 0;
    }
    
    .hero-card-actions {
        flex-direction: row;
        gap: 4px;
    }
    
    .hero-card-actions button {
        padding: 3px 8px;
        font-size: 10px;
    }
}

/* Recent videos section - mobile */
@media (max-width: 768px) {
    .recent-videos-section {
        padding: 16px;
        margin-top: 24px;
    }
    
    .video-strip {
        gap: 12px;
        scroll-padding-left: 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .video-card-mini {
        flex: 0 0 160px;
    }
    
    .video-card-mini .video-card-thumbnail {
        height: 80px;
    }
    
    .video-card-mini .video-card-content {
        padding: 8px;
    }
    
    .video-card-mini .download-btn {
        min-height: 40px;
    }
}

/* ============================================================================
   Profile Page Credits Display (Stripe Credits Integration)
   ============================================================================ */

/* Credits dual display for profile page */
.credits-dual-display {
    display: flex;
    gap: 16px;
    align-items: center;
}

.credits-dual-display .credit-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(122, 240, 255, 0.08);
    border: 1px solid rgba(122, 240, 255, 0.25);
    border-radius: 4px;
}

.credits-dual-display .credit-icon {
    font-size: 14px;
}

.credits-dual-display .credit-item span:last-child {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #7af0ff;
}

/* Mobile adjustments for credits row */
@media (max-width: 768px) {
    .credits-row .info-value {
        width: auto;
    }
    
    .credits-dual-display {
        gap: 12px;
    }
    
    .credits-dual-display .credit-item {
        padding: 3px 8px;
    }
    
    .credits-dual-display .credit-icon {
        font-size: 12px;
    }
    
    .credits-dual-display .credit-item span:last-child {
        font-size: 10px;
    }
}

/* ============================================================================
   Responsive Scaling (Phase 8 - 005-ui-overhaul)
   Mobile-first breakpoints: 320 → 480 → 720 → 960 → 1200
   ============================================================================ */

/* T036: Prevent horizontal scroll at any viewport */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

.mobile-page {
    width: 100%;
    box-sizing: border-box;
}

/* T037: Scale pill navigation for larger screens (720px+) */
@media (min-width: 720px) {
    .mobile-nav .pill-nav {
        gap: 14px;
    }
    
    .pill-nav .pill {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* T038: Scale canvas container for larger viewports */
@media (min-width: 720px) {
    .canvas-wrapper {
        max-width: 720px;
    }
    
    .canvas-panel .canvas-header {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    .canvas-panel .canvas-header > div {
        text-align: left;
    }
}

@media (min-width: 960px) {
    .canvas-wrapper {
        max-width: 860px;
    }
    
    .mobile-page {
        max-width: 1100px;
        padding: 24px;
    }
    
    /* Header container matches larger page width */
    .header-container {
        max-width: calc(1100px + 48px);
        padding: 0 24px;
    }
    
    .header-full {
        margin-left: -24px;
        margin-right: -24px;
        width: calc(100% + 48px);
    }
}

/* T039: Responsive typography scaling */
@media (min-width: 720px) {
    .mobile-arcade-header h1 {
        font-size: 18px;
    }
    
    .mobile-section h2 {
        font-size: 20px;
    }
    
    .hint {
        font-size: 14px;
    }
}

@media (min-width: 960px) {
    .mobile-arcade-header h1 {
        font-size: 22px;
    }
}

/* T040: Video download cards grid on larger screens (960px+) */
@media (min-width: 960px) {
    .video-download-panel__cards--mobile {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        max-width: 720px;
    }
    
    .video-card--mobile {
        max-width: none;
    }
}

/* Additional responsive improvements */
@media (min-width: 720px) {
    .stats-deck--mobile {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        max-width: 100%;
    }
    
    .stats-deck--mobile .metric {
        width: auto;
        min-width: 140px;
        flex: 0 1 auto;
    }
    
    .sizing-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

/* Large screen enhancements */
@media (min-width: 1200px) {
    .mobile-page {
        max-width: 1200px;
    }
    
    .header-container {
        max-width: calc(1200px + 48px);
    }
    
    .mobile-section {
        padding: 20px;
    }
}

/* ============================================================================
   Compact Help Section
   ============================================================================ */

.help-section-compact {
    padding: 16px 20px;
    background: rgba(20, 24, 40, 0.6);
    border-radius: 12px;
    margin-bottom: 16px;
}

.help-section-compact .help-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.5;
}

/* ============================================================================
   Site Footer - Impressum
   ============================================================================ */

.site-footer {
    margin-top: 32px;
    padding: 24px 20px;
    background: rgba(5, 8, 18, 0.9);
    border-top: 1px solid rgba(122, 240, 255, 0.15);
}

.footer-content {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    margin-bottom: 12px;
}

.footer-link {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    color: #7af0ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.4);
    margin: 0 8px;
}

.footer-impressum {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(122, 240, 255, 0.6);
    margin: 0 0 8px;
}

.footer-details {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 8px;
}

.footer-details a {
    color: #7af0ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-details a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-copyright {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

/* ============================================================================
   Legal Pages
   ============================================================================ */

.legal-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.legal-content {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 20px;
    width: 100%;
    box-sizing: border-box;
}

.legal-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(122, 240, 255, 0.15);
}

.legal-nav__link {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.legal-nav__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.legal-nav__link.is-active {
    color: #7af0ff;
    background: rgba(122, 240, 255, 0.1);
    border-color: rgba(122, 240, 255, 0.3);
}

.legal-page .legal-document {
    display: block;
    background: rgba(15, 18, 36, 0.6);
    border: 1px solid rgba(122, 240, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.legal-document__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(122, 240, 255, 0.1);
}

.legal-document__version-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(122, 240, 255, 0.15);
    padding: 6px 12px;
    border-radius: 4px;
}

.legal-document__version-badge .version-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
}

.legal-document__version-badge .version-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #7af0ff;
}

.legal-document__effective {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.legal-document__body {
    padding: 24px 20px;
}

/* Markdown Content Styling */
.markdown-content {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.markdown-content h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    color: #7af0ff;
    margin: 0 0 24px;
    line-height: 1.4;
}

.markdown-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(122, 240, 255, 0.15);
}

.markdown-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #7af0ff;
    margin: 24px 0 12px;
}

.markdown-content p {
    margin: 0 0 16px;
}

.markdown-content ul,
.markdown-content ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.markdown-content li {
    margin-bottom: 8px;
}

.markdown-content a {
    color: #7af0ff;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content strong {
    color: #fff;
    font-weight: 600;
}

.markdown-content code {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    color: #ffc857;
}

.markdown-content pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0 0 16px;
}

.markdown-content pre code {
    background: none;
    padding: 0;
}

.markdown-content hr {
    border: none;
    border-top: 1px solid rgba(122, 240, 255, 0.15);
    margin: 32px 0;
}

.markdown-content blockquote {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-left: 3px solid #7af0ff;
    background: rgba(122, 240, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 16px;
}

.markdown-content th,
.markdown-content td {
    padding: 10px 12px;
    text-align: left;
    border: 1px solid rgba(122, 240, 255, 0.15);
}

.markdown-content th {
    background: rgba(0, 0, 0, 0.3);
    font-weight: 600;
    color: #fff;
}

.legal-actions {
    margin-top: 24px;
    text-align: center;
}

.ghost-btn {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: inline-block;
    transition: all 0.2s ease;
}

.ghost-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================================================
   Credits Hint (above buttons)
   ============================================================================ */

.credits-hint {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 8px;
    text-align: center;
}

.credits-hint .credits-count {
    color: #7af0ff;
    font-weight: 600;
}

.credits-hint a {
    color: #7af0ff;
    text-decoration: none;
}

/* ============================================================================
   Video History Section (main page)
   ============================================================================ */

.video-history-section {
    margin-top: 32px;
    padding: 24px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(122, 240, 255, 0.1);
}

.video-history-section .section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.video-history-section .section-heading h2 {
    margin: 0;
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: #7af0ff;
}

.video-history-section .video-count-badge {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.video-history-section .empty-state {
    text-align: center;
    padding: 32px 16px;
    color: rgba(255, 255, 255, 0.5);
}

.video-history-section .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.video-history-section .loading-placeholder {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.video-history-section .skeleton-card {
    height: 200px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.video-history-section .load-more-btn {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 24px auto 0;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid rgba(122, 240, 255, 0.4);
    color: #7af0ff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.video-history-section .load-more-btn:hover {
    background: rgba(122, 240, 255, 0.1);
    border-color: #7af0ff;
}

.credits-hint a:hover {
    text-decoration: underline;
}
