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

/* Center every image/GIF in its container (except inline menu icons) */
img:not(.menu-icon),
video {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

:root {
    --ink: #f4f0ff;
    --ink-dim: #cabde3;
    --purple: #8b5cf6;
    --purple-deep: #6d28d9;
    --purple-soft: #a78bfa;
    --gold: #d4af37;
    --panel: rgba(20, 14, 34, 0.72);
    --panel-light: rgba(255, 255, 255, 0.06);
    --border-soft: rgba(167, 139, 250, 0.35);
    /* Theme-driven backgrounds (dark defaults) */
    --grad-1: rgba(12, 8, 24, 0.78);
    --grad-2: rgba(71, 41, 135, 0.72);
    --grad-3: rgba(10, 7, 20, 0.82);
    --sidebar-bg: linear-gradient(180deg, rgba(18, 12, 32, 0.92), rgba(12, 8, 22, 0.96));
    --ticker-bg: rgba(8, 5, 16, 0.88);
    --h1-grad-start: #f4f0ff;
    --kicker: var(--purple-soft);
}

/* ===== Light theme ===== */
:root[data-theme="light"] {
    --ink: #241a3d;
    --ink-dim: #574a75;
    --panel: rgba(255, 255, 255, 0.90);
    --panel-light: rgba(124, 92, 196, 0.10);
    --border-soft: rgba(124, 92, 196, 0.30);
    --grad-1: rgba(245, 240, 255, 0.80);
    --grad-2: rgba(214, 197, 247, 0.68);
    --grad-3: rgba(250, 246, 255, 0.82);
    --sidebar-bg: linear-gradient(180deg, rgba(238, 230, 252, 0.96), rgba(224, 212, 248, 0.98));
    --ticker-bg: rgba(238, 231, 252, 0.94);
    --h1-grad-start: #6d28d9;
    --kicker: #6d28d9;
}
:root[data-theme="light"] .menu-button.domain { color: #7a5c12 !important; }
:root[data-theme="light"] .latest-news-label { color: #6d28d9; }

body {
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--ink);
    text-shadow: none;
    transition: color 0.3s ease;
}

/* Parallax : couche image de fond qui derive au scroll (via --parallax-y) */
body::before {
    content: "";
    position: fixed;
    top: -12%;
    left: 0;
    width: 100%;
    height: 124%;
    background: url('pixelisee-seoul.jpg') no-repeat center center;
    background-size: cover;
    transform: translate3d(0, var(--parallax-y, 0px), 0);
    z-index: -3;
    will-change: transform;
    pointer-events: none;
}

/* Voile degrade thematique : au-dessus de l'image, sous le contenu */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--grad-1) 0%, var(--grad-2) 45%, var(--grad-3) 100%);
    z-index: -2;
    pointer-events: none;
}

/* Cherry Blossoms - Pixel Art */
.cherry-trees {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.45;
}

.tree {
    position: absolute;
    width: 0;
    height: 0;
}

/* Cherry tree trunk */
.tree::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 50px;
    background: #4a3b5c;
}

/* Flowers - pixel art with box-shadow */
.tree::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #d8c8f5;
    border-radius: 50%;
    box-shadow:
        -12px -15px 0 2px #d8c8f5,
        12px -15px 0 2px #d8c8f5,
        -18px -8px 0 2px #d8c8f5,
        18px -8px 0 2px #d8c8f5,
        -8px 0px 0 2px #d8c8f5,
        8px 0px 0 2px #d8c8f5,
        0px -20px 0 2px #d8c8f5,
        -15px -25px 0 2px #d8c8f5,
        15px -25px 0 2px #d8c8f5,
        -5px -10px 0 2px #d8c8f5,
        5px -10px 0 2px #d8c8f5;
}

/* Positions of 5 cherry trees */
.tree-1 { top: 8%; left: 10%; }
.tree-2 { top: 12%; right: 10%; }
.tree-3 { bottom: 15%; left: 15%; }
.tree-4 { bottom: 10%; right: 15%; }
.tree-5 { top: 45%; left: 50%; transform: translateX(-50%); }

/* Vertical menu on the left */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 200px;
    height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 34px 14px;
    gap: 10px;
    border-right: 1px solid var(--border-soft);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
    z-index: 1000;
}

.menu-button {
    width: 160px;
    text-decoration: none;
    padding: 12px 14px;
    background: transparent;
    color: var(--ink-dim);
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.85em;
    text-align: left;
    border: none;
    border-left: 3px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.25s ease;
    text-shadow: none;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.menu-icon {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.menu-button:hover {
    background: var(--panel-light);
    border-left-color: var(--purple-soft);
    color: var(--ink);
    transform: translateX(3px);
    box-shadow: none;
}

.menu-button[aria-current="page"] {
    background: rgba(139, 92, 246, 0.22) !important;
    border-left-color: var(--gold) !important;
    color: var(--ink) !important;
}

.menu-button:active {
    transform: translateX(1px);
}

/* Boutons avec accent violet ARMY (sauf domain) */
.menu-button {
    background: var(--panel-light) !important;
    border: 1px solid rgba(167, 139, 250, 0.18) !important;
    border-left: 3px solid var(--purple) !important;
}
.menu-button:hover {
    background: rgba(139, 92, 246, 0.18) !important;
    border-left-color: var(--gold) !important;
}
.menu-button.domain {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.08)) !important;
    border: 1px solid rgba(212, 175, 55, 0.45) !important;
    border-left: 3px solid var(--gold) !important;
    color: #f3dfa0 !important;
    font-weight: 600 !important;
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.15) !important;
}

/* News Veracity Tags */
.news-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    color: white;
    margin-left: 8px;
    font-family: 'Helvetica', 'Arial', sans-serif;
    text-transform: uppercase;
}
.news-tag.official { background: #4caf50; }
.news-tag.confirmed { background: #2196f3; }
.news-tag.rumor { background: #ff9800; }
.news-tag.unconfirmed { background: #9e9e9e; }
.news-tag.denied { background: #f44336; }

/* Live News Ticker */
.news-ticker {
    position: fixed;
    top: 0;
    left: 200px;
    width: calc(100% - 200px);
    height: 36px;
    background: var(--ticker-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--ink);
    overflow: hidden;
    white-space: nowrap;
    z-index: 1001;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.ticker-content {
    display: inline-block;
    animation: ticker-scroll 40s linear infinite;
    padding-left: 100%;
}

.ticker-item {
    margin-right: 60px;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.92em;
    font-weight: 500;
    color: var(--ink-dim);
    text-shadow: none;
}

.ticker-item .news-tag {
    margin-left: 0;
    margin-right: 8px;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 65px 20px 20px;
    margin-left: 200px;
}

.kicker {
    display: inline-block;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--kicker);
    margin-bottom: 6px;
}

h1 {
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-size: 4em;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: 1px;
    background: linear-gradient(120deg, var(--h1-grad-start) 10%, var(--purple-soft) 55%, var(--gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    -webkit-text-stroke: 0;
}

.hero-divider {
    width: 60px;
    height: 3px;
    margin: 0 auto 28px;
    background: linear-gradient(90deg, var(--purple), var(--gold));
    border-radius: 2px;
}

.gif-container {
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 14px;
    background: var(--panel);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255,255,255,0.02);
}

.gif-container img,
.gif-container video {
    max-width: 100%;
    max-height: 400px;
    border: none;
    border-radius: 12px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* La video n'a pas de taille intrinseque avant chargement des metadonnees :
   on reserve l'espace (ratio du visuel d'origine 480x266) pour eviter le layout shift. */
.gif-container video {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 480 / 266;
    height: auto;
}

/* Hero layout: latest news (left) + main GIF (right) */
.hero-layout {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 24px;
    max-width: 1040px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.hero-layout .gif-container {
    flex: 1 1 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.latest-news-card {
    flex: 1 1 300px;
    max-width: 360px;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 22px;
    background: var(--panel);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255,255,255,0.02);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.latest-news-label {
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.8em;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--purple-soft);
    display: flex;
    align-items: center;
    gap: 8px;
}

.latest-news-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-soft), transparent);
}

.latest-news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.latest-news-date {
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.82em;
    color: var(--ink-dim);
}

.latest-news-title {
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 1.15em;
    line-height: 1.4;
    color: var(--ink);
    margin: 2px 0;
}

.latest-news-desc {
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.9em;
    line-height: 1.6;
    color: var(--ink-dim);
    margin: 0;
}

.latest-news-more {
    margin-top: auto;
    align-self: flex-start;
    background: linear-gradient(90deg, var(--purple), var(--purple-deep));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.latest-news-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

@media (max-width: 768px) {
    .latest-news-card {
        max-width: 100%;
        order: 2;
    }
    .hero-layout .gif-container {
        order: 1;
        flex-basis: 100%;
    }
}

/* Accueil : texte de bienvenue a gauche, carte Instagram a droite */
.welcome-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
    max-width: 1040px;
    margin: 26px auto 30px;
}

.welcome-card {
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-card .welcome-text {
    margin: 0;
    max-width: none;
    text-align: left;
}

/* Clip Super Tuna sous le texte de bienvenue : le lecteur .video-embed est
   dimensionne pour une page entiere (marges, ombre) — allege dans la carte. */
.welcome-card .video-embed {
    margin: 18px 0 0;
    max-width: none;
    box-shadow: none;
}

.welcome-card .video-caption {
    margin: 10px 0 0;
    text-align: left;
}

@media (max-width: 900px) {
    .welcome-card .video-caption { text-align: center; }
}

.instagram-card {
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.instagram-card-header {
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    color: var(--ink);
    text-align: center;
}

.instagram-card iframe {
    width: 100%;
    height: 480px;
    border: 0;
    border-radius: 10px;
    display: block;
    background: #fff;
}

.instagram-card-link {
    text-align: center;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.82em;
    color: var(--purple-soft);
    text-decoration: none;
}

.instagram-card-link:hover { text-decoration: underline; }

/* Page BTS Members : dernier post Instagram officiel de chaque membre.
   L'embed Instagram a besoin d'environ 326px de large pour s'afficher correctement :
   conteneur elargi + colonnes d'au moins 330px (min() evite tout debordement mobile). */
#other-members-page .bio-container {
    max-width: 1100px;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
    gap: 20px;
    margin: 20px 0;
}

.member-insta {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
}

.member-insta iframe {
    width: 100%;
    height: 440px;
    border: 0;
    border-radius: 10px;
    display: block;
    background: #fff;
}

.member-insta-link {
    display: inline-block;
    margin-top: 8px;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.82em;
    color: var(--purple-soft);
    text-decoration: none;
}

.member-insta-link:hover { text-decoration: underline; }

.member-insta-none {
    margin: 0;
    font-size: 0.85em;
    font-style: italic;
    color: var(--ink-dim);
}

/* Page ARMY : liens vers les espaces officiels et les communautes de fans.
   Selecteurs a 2 classes pour passer devant d'eventuelles regles "conteneur a". */
.army-links {
    container: army-links / inline-size; /* colonnes selon la largeur de la section, pas de l'ecran */
    display: grid;
    gap: 26px;
    max-width: 900px;
    margin: 0 auto 30px;
}

.army-links .army-links-group h4 {
    margin: 0 0 12px;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.8em;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: left;
    color: var(--kicker);
}

.army-links .army-links-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

/* Jamais une carte seule sur sa ligne :
   - 2 colonnes : avec un nombre impair de cartes, la derniere prend toute la ligne ;
   - section large : 3 colonnes pour les groupes de 3 cartes, 2 x 2 pour ceux de 4. */
@container army-links (min-width: 420px) {
    .army-links .army-links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .army-links .army-link-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@container army-links (min-width: 700px) {
    .army-links .army-links-grid:not(:has(> :nth-child(4))) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .army-links .army-links-grid:not(:has(> :nth-child(4))) .army-link-card:last-child { grid-column: auto; }
}

.army-links .army-link-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: var(--panel);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: var(--ink);
    text-align: left;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.army-links .army-link-card:hover,
.army-links .army-link-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--purple-soft);
    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.25);
}

.army-links .army-link-card:focus-visible {
    outline: 2px solid var(--purple-soft);
    outline-offset: 2px;
}

.army-links .army-link-name {
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 1em;
    color: var(--ink);
}

.army-links .army-link-domain {
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.78em;
    color: var(--kicker);
    overflow-wrap: anywhere; /* doolsetbangtan.wordpress.com ne deborde pas d'une carte etroite */
}

.army-links .army-link-desc {
    margin: 4px 0 0;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.88em;
    line-height: 1.5;
    color: var(--ink-dim);
}

.army-links .army-links-note {
    margin: 0;
    font-size: 0.8em;
    font-style: italic;
    text-align: center;
    color: var(--ink-dim);
}

@media (prefers-reduced-motion: reduce) {
    .army-links .army-link-card { transition: none; }
    .army-links .army-link-card:hover,
    .army-links .army-link-card:focus-visible { transform: none; }
}

/* Mini Jin pixelise qui se balade en bas de l'ecran (anime par app.js) */
.pixel-jin {
    position: fixed;
    left: 0;
    bottom: 6px;
    width: 48px;           /* 16 colonnes x 3 : doit suivre W et SCALE dans app.js */
    height: 66px;          /* 22 lignes x 3 : doit suivre H et SCALE dans app.js */
    z-index: 998;          /* sous le bouton theme (1001) et le retour-en-haut (1000) */
    pointer-events: none;  /* ne bloque jamais un clic ni le scroll */
    will-change: transform;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}

.pixel-jin canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: crisp-edges;
    image-rendering: pixelated; /* pixels nets a l'agrandissement x3 */
}

@media print {
    .pixel-jin { display: none; }
}

@media (max-width: 900px) {
    .welcome-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .welcome-layout .welcome-text { text-align: center; }
    .instagram-card { max-width: 400px; margin: 0 auto; width: 100%; }
}

.welcome-text {
    max-width: 700px;
    margin: 26px auto 30px;
    text-align: center;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 1.1em;
    font-weight: 400;
    color: var(--ink-dim);
    text-shadow: none;
    line-height: 1.7;
}

.gif-gallery-title {
    text-align: center;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 1.3em;
    letter-spacing: 0.5px;
    color: var(--ink);
    margin: 44px 0 22px;
    text-shadow: none;
}

.gif-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 900px;
    margin: 0 auto 30px;
}

.gif-card {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 8px;
    background: var(--panel);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gif-card:hover {
    transform: translateY(-4px);
    border-color: var(--purple-soft);
    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.25);
}

.gif-card img,
.gif-card video {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border: none;
    border-radius: 9px;
    display: block;
}

.gif-card p {
    margin: 10px 0 2px;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-weight: 500;
    font-size: 0.85em;
    color: var(--ink-dim);
}

/* Outfit page : conteneur élargi pour laisser respirer les grandes photos */
#outfit-page .bio-container {
    max-width: 1100px;
}

/* Outfit gallery (photoshoots) */
/* Lecteur video integre (ratio 16:9, responsive) */
.video-embed {
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: 25px auto 10px;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    background: var(--panel);
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.video-caption {
    text-align: center;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.85em;
    color: var(--ink-dim);
    margin: 0 auto 25px;
}

.outfit-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    max-width: 1200px;
    margin: 0 auto 30px;
}

.outfit-card {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 8px;
    background: var(--panel);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.outfit-card:hover {
    transform: translateY(-4px);
    border-color: var(--purple-soft);
    box-shadow: 0 10px 28px rgba(139, 92, 246, 0.25);
}

.outfit-card img,
.outfit-card video {
    width: 100%;
    height: 600px;
    object-fit: cover;
    object-position: center top;
    border: none;
    border-radius: 9px;
    display: block;
}

.outfit-card .outfit-title {
    margin: 10px 0 2px;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.92em;
    color: var(--ink);
}

.outfit-card .outfit-credit {
    margin: 2px 0 4px;
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-size: 0.72em;
    color: var(--ink-dim);
    opacity: 0.85;
}

@media (max-width: 768px) {
    .outfit-gallery {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .outfit-card img,
.outfit-card video {
        height: 440px;
    }
}

.controls {
    margin-top: 20px;
    background: var(--panel);
    padding: 10px 20px;
    border-radius: 10px;
    border: 2px dashed #ff69b4;
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
}

/* Responsive images */
.responsive-img,
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive videos and iframes */
iframe,
video {
    max-width: 100%;
    height: auto;
}

/* Prevent text selection on buttons and interactive elements */
button,
.menu-button,
.hamburger-menu,
a {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Touch-friendly link styles */
a {
    cursor: pointer;
}

a[href] {
    touch-action: manipulation;
}

/* Prevent zoom on input focus for mobile */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input:not([type]) {
    font-size: 16px;
}

/* Focus styles for accessibility */
button:focus,
.menu-button:focus,
a:focus,
input:focus {
    outline: 2px solid var(--purple-soft);
    outline-offset: 2px;
}

/* Remove outline for mouse users */
button:focus:not(:focus-visible),
.menu-button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

.controls input {
    padding: 8px;
    border: 2px solid #ff1493;
    border-radius: 5px;
    background: var(--panel);
    font-family: 'Helvetica', 'Arial', sans-serif;
    width: 300px;
}

.controls button {
    padding: 8px 15px;
    background: linear-gradient(to bottom, #ff1493, #ff69b4);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-weight: bold;
    margin-left: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.controls button:hover {
    background: linear-gradient(to bottom, #ff69b4, #ff1493);
}

/* SPA Content Sections */
.page {
    display: none;
}
.page.active {
    display: block;
}

/* Jin Biography Page */
.bio-container {
    max-width: 800px;
    background: var(--panel);
    border: 5px double #ff1493;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 0 25px rgba(255, 20, 147, 0.5);
    color: var(--ink);
    text-align: left;
}

.bio-header {
    text-align: center;
    margin-bottom: 30px;
    color: #ff1493;
}

.bio-header h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(255, 20, 147, 0.5);
}

.bio-content {
    font-family: Arial, sans-serif;
    line-height: 1.8;
    font-size: 1.1em;
}

/* Pixel Timeline */
.timeline {
    margin-top: 40px;
    position: relative;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 8px;
    background: #ff1493;
    border-radius: 4px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: #ff69b4;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #ff1493;
}

.timeline-date {
    font-weight: bold;
    color: #ff1493;
    font-size: 1.2em;
    margin-bottom: 5px;
    font-family: 'Helvetica', 'Arial', sans-serif;
}

.timeline-title {
    font-weight: bold;
    color: var(--ink-dim);
    font-size: 1.1em;
    margin-bottom: 8px;
}

.timeline-description {
    color: var(--ink-dim);
    padding: 8px;
    background: rgba(255, 105, 180, 0.1);
    border-radius: 5px;
    border-left: 3px solid #ffb6c1;
}

/* Pixel art timeline connector - horizontal pixels */
.pixel-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
    gap: 2px;
}

.pixel {
    width: 20px;
    height: 20px;
    background: #ff1493;
    border: 1px solid #fff;
    box-shadow: 1px 1px 0 #ff69b4;
}

.pixel.empty {
    background: transparent;
    box-shadow: none;
    border-color: rgba(255, 20, 147, 0.2);
}

.pixel.active {
    animation: pixelPulse 1.5s infinite;
}

@keyframes pixelPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.back-button {
    position: fixed;
    text-decoration: none;
    display: inline-block;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    background: var(--panel-light);
    color: var(--ink);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Poppins', 'Helvetica', 'Arial', sans-serif;
    font-weight: 600;
    font-size: 0.9em;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(139, 92, 246, 0.22);
    border-color: var(--purple-soft);
    transform: translateX(-3px);
}

.footer {
    margin-top: auto !important;
    color: var(--ink-dim);
    font-size: 0.85em;
    width: 100%;
    text-align: center;
    padding: 24px 0;
}

.footer p.contact {
    background: var(--panel-light);
    border: 1px solid var(--border-soft);
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-block;
    color: var(--ink);
    font-weight: 500;
    margin-top: 12px;
    box-shadow: none;
    animation: none;
}

.header-contact {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
}

.header-contact .contact {
    background: var(--panel-light);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    color: var(--ink);
    box-shadow: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    font-weight: 500;
    font-size: 0.9em;
    border: 1px solid var(--border-soft);
}

@keyframes blink {
    50% { opacity: 0.5; }
}

/* Internet Explorer 10-11 gradient hack */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    h1 { text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5); }
}

/* ==================== MOBILE RESPONSIVE DESIGN ==================== */

/* Hamburger Menu - Hidden by default */
.hamburger-menu {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 2000;
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background: var(--purple);
    margin: 4px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger-menu.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Sidebar - Overlay */
.mobile-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 300px;
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    border-right: 1px solid var(--border-soft);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
    -webkit-overflow-scrolling: touch;
}

.mobile-sidebar.active {
    transform: translateX(0);
}

.mobile-sidebar .menu-button {
    width: calc(100% - 20px);
    margin: 8px 10px;
    font-size: 1em;
    padding: 12px;
}

/* Mobile overlay for closing sidebar */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile News Ticker */
.mobile-news-ticker {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 45px;
    background: var(--ticker-bg);
    color: var(--ink);
    z-index: 1002;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-soft);
    padding: 5px 10px;
}

.mobile-news-ticker .ticker-content {
    display: inline-block;
    animation: ticker-scroll 30s linear infinite;
    padding-left: 100%;
    font-size: 0.9em;
}

.mobile-news-ticker .ticker-item {
    margin-right: 40px;
}

/* Back to top button for mobile */
.back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--purple-deep), var(--purple));
    color: white;
    border: 1px solid var(--border-soft);
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(109, 40, 217, 0.5);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

/* Theme toggle switch */
.theme-toggle {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple-deep), var(--purple));
    color: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 50%;
    font-size: 1.4em;
    line-height: 1;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 4px 16px rgba(109, 40, 217, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    .menu-button {
        min-height: 48px;
        padding: 12px 16px !important;
    }
    
    button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .controls input {
        padding: 12px 16px;
        font-size: 1.1em;
    }
    
    .controls button {
        padding: 12px 20px;
        font-size: 1.1em;
    }
}

/* Tablet view */
@media (max-width: 1024px) {
    .sidebar {
        width: 150px;
    }
    
    .container {
        margin-left: 150px;
    }
    
    .news-ticker {
        left: 150px;
        width: calc(100% - 150px);
    }
    
    .back-button {
        left: 160px;
    }
}

/* Mobile Landscape and Small Tablets */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .container {
        margin-left: 0;
        padding: 55px 15px 20px;
    }
    
    .news-ticker {
        display: none;
    }
    
    .mobile-news-ticker {
        display: block;
    }
    
    .hamburger-menu {
        display: block;
    }
    
    .mobile-sidebar {
        display: block;
    }

    /* .mobile-overlay reste display:none tant qu'il n'est pas .active
       (sinon ce calque plein écran capte scroll + clics — cf. bug mobile) */

    .back-to-top {
        display: block;
    }
    
    .back-button {
        left: 10px;
        top: 10px;
        z-index: 1002;
        padding: 8px 15px;
        font-size: 0.95em;
    }
    
    .header-contact {
        top: 60px;
        right: 10px;
        z-index: 1002;
    }
    
    .header-contact .contact {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    
    h1 {
        font-size: 2.5em;
    }
    
    h2 {
        font-size: 1.8em;
    }
    
    .bio-header h2 {
        font-size: 2em;
    }
    
    .gif-container img,
.gif-container video {
        max-width: 100%;
        height: auto;
    }

    .gif-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .gif-card img,
.gif-card video {
        height: 120px;
    }

    .bio-container {
        padding: 20px 15px;
    }
    
    /* Adjust timeline for mobile */
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 25px;
    }
    
    .timeline-item::before {
        left: -30px;
    }
    
    .timeline-date {
        font-size: 1.1em;
    }
    
    .timeline-title {
        font-size: 1em;
    }
    
    /* Grid adjustments */
    .bio-content {
        font-size: 1em;
        line-height: 1.7;
    }
    
    /* Product grid */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* Member grid */
    div[style*="grid-template-columns: repeat"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Stats grid */
    div[style*="display: flex; justify-content: space-around"] {
        flex-direction: column;
        align-items: center;
    }
    
    .menu-button {
        width: 100%;
        margin: 6px 0;
    }
}

/* Mobile Portrait - Very small screens */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .header-contact {
        display: none;
    }
    
    h1 {
        font-size: 2em;
    }

    .gif-container {
        padding: 10px;
    }

    .gif-container img,
.gif-container video {
        border-radius: 8px;
    }
    
    .controls input {
        width: 100%;
        max-width: 100%;
    }
    
    .footer {
        font-size: 0.85em;
    }
    
    .bio-container {
        border-width: 3px;
        padding: 15px 10px;
    }
    
    .pixel-timeline {
        gap: 1px;
    }
    
    .pixel {
        width: 14px;
        height: 14px;
    }
    
    /* Make buttons more touch-friendly */
    .menu-button {
        min-height: 44px;
        padding: 10px 8px !important;
        font-size: 1em;
    }
    
    .back-button {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}

/* iPhone SE and similar small devices */
@media (max-width: 360px) {
    h1 {
        font-size: 1.7em;
    }
    
    .bio-header h2 {
        font-size: 1.5em;
    }
    
    .bio-content p {
        font-size: 0.95em;
    }
    
    .mobile-news-ticker {
        height: 40px;
        font-size: 0.85em;
    }
    
    .back-button {
        padding: 8px 12px;
        font-size: 0.85em;
    }
}

/* Samsung Galaxy Fold and very narrow screens */
@media (max-width: 280px) {
    body {
        font-size: 12px;
    }
    
    h1 {
        font-size: 1.5em;
    }
    
    .hamburger-menu {
        padding: 5px 8px;
    }
    
    .hamburger-menu .bar {
        width: 20px;
    }
    
    .mobile-sidebar {
        width: 90%;
    }
}

/* Landscape mobile view */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-news-ticker {
        height: 35px;
        font-size: 0.8em;
    }
    
    .hamburger-menu {
        top: 5px;
        left: 5px;
        padding: 5px 8px;
    }
    
    .back-button {
        top: 5px;
        left: 5px;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .pixel {
        box-shadow: 0.5px 0.5px 0 #ff69b4;
    }
}

/* Custom scrollbar for WebKit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--panel);
}

::-webkit-scrollbar-thumb {
    background: #ff69b4;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff1493;
}

/* Hide scrollbar for mobile sidebar on iOS */
.mobile-sidebar::-webkit-scrollbar {
    display: none;
}

/* Print styles */
@media print {
    .sidebar,
    .news-ticker,
    .hamburger-menu,
    .mobile-sidebar,
    .mobile-overlay,
    .back-to-top,
    .header-contact,
    .gif-container {
        display: none !important;
    }
    
    .container {
        margin-left: 0 !important;
        padding-top: 0 !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    h1, h2, h3, h4 {
        color: black !important;
        text-shadow: none !important;
        -webkit-text-stroke: 0 !important;
    }
}
