
/* ==================================================
GHOST OF TSUSHIMA: JIN SAKAI STYLES
================================================== */

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

@font-face {
    font-family: 'HanyiSentyPagoda Regular';
    src: url('./HanyiSentyPagoda Regular/HanyiSentyPagoda Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-FFFF;
}

@font-face {
    font-family: 'HanyiSentyPagoda Regular';
    src: url("./HanyiSentyPagoda Regular/HanyiSentyPagoda Regular.ttf") format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}
:root {
    --primary-color: #0B0B13;
    --secondary-color: #2a2a2a;
    --accent-red: #cc2936;
    --accent-gold: #d4af37;
    --text-light: #f5f5f5;
    --text-muted: #a0a0a0;
    --shadow-color: rgba(0, 0, 0, 0.7);
    --gradient-sunset: linear-gradient(135deg, #ff6b6b, #ffa500, #ffeb3b);
    --gradient-night: #0B0B13;
    --card-bg: rgba(20, 20, 30, 0.9);
    --border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    --primary-color: #ffffff;
    --secondary-color: #ffffff;
    --accent-red: #dc3545;
    --accent-gold: #d4af37;
    --text-light: #1a1a1a;
    --text-muted: #4a4a4a;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-sunset: linear-gradient(135deg, #ff8a80, #ffcc80, #fff59d);
    --gradient-night: linear-gradient(135deg, #ffffff, #ffffff, #ffffff);
    --card-bg: rgba(255, 255, 255, 0.95);
    --border-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--primary-color);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
    opacity: 0;
}

body.loaded {
    opacity: 1;
    transition: opacity 0.5s ease;
}

body {
    cursor: none; 
}

/* КАСТОМНЫЙ КУРСОР - БОЛЬШОЙ КРУГ */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: transparent;
    border: 1px solid var(--accent-gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.1s ease;
    transform: translate(-50%, -50%);
}

/* МАЛЕНЬКИЙ ЦЕНТРАЛЬНЫЙ КРУГ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 4px;
    height: 4px;
    background: var(--accent-gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.05s ease;
    transform: translate(-50%, -50%);
}

/* УКАЗАТЕЛЬНЫЙ КУРСОР ДЛЯ ИНТЕРАКТИВНЫХ ЭЛЕМЕНТОВ */
button,
.nav-dot,
.theme-toggle,
a,
[role="button"],
.floating-ui,
input,
textarea,
select {
    cursor: pointer !important;
}

/* АНИМАЦИИ ПРИ НАВЕДЕНИИ НА КНОПКИ */
button:hover::after,
.nav-dot:hover::after,
.theme-toggle:hover::after {
    transform: scale(1.5);
}

/* ===============================
THEME TOGGLE
=============================== */

.theme-toggle {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 1001;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.theme-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(180deg);
}

/* ===============================
GENERAL STYLES
=============================== */

.section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.section:not(.hero-section) {
    background: var(--primary-color);
    z-index: 10;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* ===============================
TYPOGRAPHY 
=============================== */

.title-xl {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    position: relative;
    letter-spacing: -0.02em;
    line-height: 0.9;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.title-xl::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #d4af37 0%, #ffd700 30%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: 1;
}

.title-xl::after {
    content: 'JIN SAKAI';
    position: absolute;
    top: 2px;
    left: 2px;
    color: rgba(0, 0, 0, 0.1);
    z-index: -1;
    font-weight: 900;
    -webkit-text-fill-color: rgba(0, 0, 0, 0.1);
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

[data-theme="light"] .title-xl::after {
    display: none;
}

.title-lg {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--accent-gold);
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    line-height: 1.6;
    opacity: 0.9;
}
[data-theme="dark"] .subtitle {
    opacity: 1 !important;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9) !important;
    padding: 1rem !important;
    border-radius: 10px !important;
}

.text-body {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    max-width: 700px;
    font-weight: 400;
}

/* ===============================
ANIMATIONS
=============================== */

.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================
NAVIGATION
=============================== */

.nav {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border: 2px solid var(--accent-gold);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
    position: relative;
}

.nav-dot:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card-bg);
    color: var(--text-light);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    border: 1px solid var(--border-color);
}

.nav-dot.active {
    background-color: var(--accent-gold);
    opacity: 1;
    transform: scale(1.2);
}

.nav-dot:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ===============================
DECORATIVE ELEMENTS
=============================== */

.japanese-text {
    font-family: 'HanyiSentyPagoda', 'HanyiSentyPagoda Regular', 'Noto Sans JP', serif !important;
    position: absolute;
    font-size: 8rem;
    font-weight: 100;
    color: var(--border-color);
    z-index: 0;
    user-select: none;
    pointer-events: none;
    transition: color 0.3s ease;
}

.floating-element {
    position: absolute;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* ===============================
HERO SECTION 
=============================== */

.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--gradient-night);
    min-height: 100vh;
    width: 100vw;
    z-index: 5;
    overflow: hidden;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-night);
    filter: blur(1px) brightness(0.3);
    z-index: 0;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95) 0%, rgba(25, 25, 40, 0.85) 100%);
    z-index: 1;
    pointer-events: none;
    transform: translateZ(0);
    backface-visibility: hidden;
}

[data-theme="dark"] .hero-overlay,
:root:not([data-theme="light"]) .hero-overlay {
    display: none !important;
}

[data-theme="dark"] .hero-overlay,
[data-theme="dark"] .hero-bg,
:root:not([data-theme="light"]) .hero-overlay,
:root:not([data-theme="light"]) .hero-bg {
    display: none !important;
}

[data-theme="light"] .hero-overlay {
    background: rgba(255, 255, 255, 0.98) !important;
}

[data-theme="light"] .hero-bg {
    background: #ffffff !important;
    filter: none !important;
}

[data-theme="light"] .hero-section {
    background: #ffffff !important;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    height: 130vh;
    gap: 4rem;
    max-width: 1400px;
    position: relative;
    z-index: 3;
    width: 100%;
    padding-left: 60px;
    padding-right: 40px;
}

.hero-content {
    z-index: 3;
    padding-right: 1rem;
    max-width: none;
}

.hero-character {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
}

.character-img {
    width: 100%;
    max-width: 500px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
    background: transparent;
    mix-blend-mode: normal;
    position: relative;
    z-index: 5; 
}

.character-img:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.4));
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 500;
    opacity: 0.9;
}

[data-theme="dark"] .hero-subtitle {
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .hero-stats {
    z-index: 9999 !important;
    position: relative !important;
}

[data-theme="light"] .hero-stats {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4) !important;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
}

[data-theme="dark"] .stat-item {
    z-index: 9999 !important;
    position: relative !important;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

[data-theme="dark"] .stat-label {
    text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 1),
        0px 0px 12px rgba(0, 0, 0, 0.9) !important;
    color: #ffffff !important;
    z-index: 9999 !important;
    position: relative !important;
    font-weight: 600 !important;
}

[data-theme="light"] .stat-label {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3) !important;
    color: #333333 !important;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-gold);
    position: relative;
}

[data-theme="dark"] .stat-value {
    text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 1),
        0px 0px 12px rgba(0, 0, 0, 0.9) !important;
    z-index: 9999 !important;
    position: relative !important;
    font-weight: 800 !important;
}

[data-theme="light"] .stat-value {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.stat-value::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--accent-red);
    opacity: 0.6;
}

.scroll-hint {
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    opacity: 0.8;
}

[data-theme="dark"] .scroll-hint {
    opacity: 1 !important;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    backdrop-filter: blur(5px) !important;
}

.scroll-arrow {
    font-size: 1.5rem;
    margin-top: 1rem;
    animation: bounce 2s infinite;
    color: var(--accent-gold);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ===============================
FLOATING UI
=============================== */

.floating-ui {
    position: absolute;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    backdrop-filter: blur(20px);
    min-width: 140px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.floating-ui:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
}

.ui-honor {
    top: 10%;
    left: -140px;
    z-index: 300;
}

.ui-ghost {
    bottom: 25%;
    right: -50px;
    z-index: 300;
}

.ui-legend {
    top: 53%;
    left: -100px;
    z-index: 300;
}

.ui-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.ui-bar {
    width: 100px;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.ui-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

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

.ui-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold), #ffd700);
    transition: width 2s ease-out;
    border-radius: 3px;
    position: relative;
}

.ghost-progress {
    background: linear-gradient(90deg, var(--accent-red), #ff4757);
}

.honor-progress {
    background: linear-gradient(90deg, var(--accent-gold), #FFD700);
    position: relative;
    overflow: hidden;
}

.honor-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.ui-value {
    font-size: 1rem;
    color: var(--accent-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===============================
INTERACTIVE KATANA
=============================== */

/* .interactive-katana {
    position: absolute;
    width: 200px;
    height: 10px;
    pointer-events: none;
    z-index: 10;
    transform-origin: center center;
    transition: all 0.05s ease-out;
    opacity: 0;
}

.interactive-katana.visible {
    opacity: 1;
}

.katana-blade {
    position: absolute;
    width: 150px;
    height: 4px;
    background: linear-gradient(90deg, #c0c0c0, #ffffff, #c0c0c0);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.katana-handle {
    position: absolute;
    left: 0;
    width: 50px;
    height: 8px;
    background: linear-gradient(90deg, #8B4513, #654321);
    border-radius: 4px;
    border: 1px solid var(--accent-gold);
}

.katana-trail {
    position: absolute;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.interactive-katana:hover .katana-trail {
    opacity: 0.8;
    animation: swordTrail 0.5s ease-out;
}

.interactive-katana.blood-mode .katana-blade {
    background: linear-gradient(90deg, #8B0000, #FF0000, #8B0000);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.7);
}

@keyframes swordTrail {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.2); opacity: 0; }
} */

.interactive-katana {
    position: fixed; 
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 150;
    transform-origin: center center;
    transition: none; 
    opacity: 0;
}

.interactive-katana.visible {
    opacity: 1;
}

/* Энсо круг */
.enso-circle {
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url('img/enso.svg'); 
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
    filter: 
        brightness(0) saturate(100%) 
        invert(66%) sepia(63%) saturate(558%) 
        hue-rotate(17deg) brightness(98%) contrast(87%)
        drop-shadow(0 0 8px var(--accent-gold));
}


/* Дымный след */
.smoke-trail {
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.3) 0%, rgba(212, 175, 55, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    left: 10px;
    top: 10px;
}

/* Анимации */
.interactive-katana:hover .smoke-trail {
    opacity: 0.6;
    animation: smokeTrail 0.8s ease-out;
}

.interactive-katana.blood-mode .enso-circle {
    filter: 
        brightness(0) saturate(100%) 
        invert(25%) sepia(100%) saturate(2847%) 
        hue-rotate(346deg) brightness(104%) contrast(97%)
        drop-shadow(0 0 8px var(--accent-red));
}

@keyframes smokeTrail {
    0% { 
        transform: scale(1) rotate(0deg); 
        opacity: 0.6; 
    }
    50% { 
        transform: scale(1.5) rotate(180deg); 
        opacity: 0.4; 
    }
    100% { 
        transform: scale(2) rotate(360deg); 
        opacity: 0; 
    }
}

/* Вращение энсо при движении */
.interactive-katana.moving .enso-circle {
    animation: ensoRotate 2s linear infinite;
}

@keyframes ensoRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===============================
ANCIENT SCROLL
=============================== */

.ancient-scroll {
    position: fixed;
    top: 50%;
    right: -300px;
    width: 250px;
    height: 400px;
    background: linear-gradient(45deg, #F4E4BC, #E6D3A3);
    border: 3px solid #8B4513;
    border-radius: 10px;
    z-index: 15;
    transform: translateY(-50%);
    transition: right 0.8s ease;
    box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.3);
}

.ancient-scroll.visible {
    right: 20px;
}
.ancient-scroll {
    display: none !important;
}

.scroll-content {
    padding: 20px;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.scroll-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(139, 69, 19, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 69, 19, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.scroll-text {
    font-family: 'Noto Sans JP', serif;
    font-size: 14px;
    line-height: 1.6;
    color: #2F1B14;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.scroll-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================
PARALLAX IMAGES 
=============================== */

.parallax-img {
    position: fixed;
    pointer-events: none;
    user-select: none;
    will-change: transform;
    backface-visibility: hidden;
}

.layer-mountains {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: auto;
    z-index: 1;
    opacity: 1;
    filter: brightness(0.8);
    min-height: 60vh;
}

[data-theme="dark"] .layer-mountains {
    filter: brightness(0.6) contrast(1.2) !important;
}

.layer-mist {
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 120vw; 
    height: auto;
    z-index: 1;
    opacity: 0.6;
    filter: brightness(0.9);
    animation: mistFloat 25s ease-in-out infinite;
}

.layer-trees-back-1 {
    bottom: -30px;
    left: -5%;
    width: 300px;
    height: auto;
    z-index: 3;
    opacity: 0.6;
    filter: brightness(0.4);
}

.layer-trees-back-2 {
    bottom: 0;
    left: 30%;
    width: 250px;
    height: auto;
    z-index: 3;
    opacity: 0.6;
    filter: brightness(0.4);
}

.layer-trees-back-3 {
    bottom: 0;
    left: 60%;
    width: 280px;
    height: auto;
    z-index: 3;
    opacity: 0.6;
    filter: brightness(0.4);
}

.layer-trees-mid-1 {
    bottom: 0;
    left: 40%;
    width: 280px;
    height: auto;
    z-index: 4;
    opacity: 0.5;
    filter: brightness(0.35);
}

.layer-trees-mid-2 {
    bottom: 0;
    left: 85%;
    width: 260px;
    height: auto;
    z-index: 4;
    opacity: 0.5;
    filter: brightness(0.35);
}

.layer-trees-front-1 {
    bottom: 0;
    left: 15%;
    width: 350px;
    height: auto;
    z-index: 6;
    opacity: 0.4;
    filter: brightness(0.3);
}

.layer-trees-front-2 {
    bottom: 0;
    left: 75%;
    width: 320px;
    height: auto;
    z-index: 6;
    opacity: 0.4;
    filter: brightness(0.3);
}

.layer-trees-back-1,
.layer-trees-back-2,
.layer-trees-back-3 {
    z-index: 1 !important; 
}

.layer-trees-front-1,
.layer-trees-front-2 {
    z-index: 1 !important; 
}

/*  АНИМАЦИЯ ТУМАНА */
@keyframes mistFloat {
    0%, 100% { 
        transform: translateX(-50%) translateY(0); 
        opacity: 0.6;
    }
    25% { 
        transform: translateX(-45%) translateY(-10px); 
        opacity: 0.5;
    }
    50% { 
        transform: translateX(-40%) translateY(0); 
        opacity: 0.6;
    }
    75% { 
        transform: translateX(-48%) translateY(10px); 
        opacity: 0.5;
    }
}

/* ===============================
FALLING GINKGO LEAVES
=============================== */

.sakura-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.sakura-petal {
    position: absolute;
    top: -10px;
    width: 12px;
    height: 16px;
    background: var(--accent-gold);
    opacity: 0.8;
    border-radius: 0 100% 0 100%;
    animation: fallGinkgo 10s linear infinite;
    transform-origin: center;
}

.sakura-petal::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 8px;
    background: #8B4513;
    transform: translate(-50%, -50%);
    border-radius: 1px;
}

.sakura-petal:nth-child(odd) {
    background: linear-gradient(45deg, var(--accent-gold), #FFD700);
    animation-duration: 12s;
}

.sakura-petal:nth-child(even) {
    background: linear-gradient(45deg, #DAA520, var(--accent-gold));
    animation-duration: 8s;
}

@keyframes fallGinkgo {
    0% {
        transform: translateY(-100vh) rotate(0deg) scale(1);
        opacity: 1;
    }
    25% {
        transform: translateY(-50vh) rotate(90deg) scale(1.1);
        opacity: 0.8;
    }
    50% {
        transform: translateY(0vh) rotate(180deg) scale(0.9);
        opacity: 0.7;
    }
    75% {
        transform: translateY(50vh) rotate(270deg) scale(1.05);
        opacity: 0.5;
    }
    100% {
        transform: translateY(100vh) rotate(360deg) scale(0.8);
        opacity: 0;
    }
}

/* ===============================
PARTICLE SYSTEM
=============================== */

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 50%;
    opacity: 0.8;
    animation: particleFloat 4s linear infinite;
}

.particle.ember {
    background: linear-gradient(45deg, #FF4500, #FFD700);
    animation: emberFloat 3s ease-out infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes emberFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-50px) scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100px) scale(0.8);
        opacity: 0;
    }
}

/* ===============================
SCROLLBAR
=============================== */

::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}

/* СКРЫВАЕМ ФОНОВЫЕ ИЗОБРАЖЕНИЯ В СВЕТЛОЙ ТЕМЕ */
[data-theme="light"] .layer-mountains,
[data-theme="light"] .layer-mist,
[data-theme="light"] .layer-trees-back-1,
[data-theme="light"] .layer-trees-back-2,
[data-theme="light"] .layer-trees-back-3,
[data-theme="light"] .layer-trees-mid-1,
[data-theme="light"] .layer-trees-mid-2,
[data-theme="light"] .layer-trees-front-1,
[data-theme="light"] .layer-trees-front-2 {
    opacity: 0.3 !important;
    filter: brightness(1.5) contrast(0.8) !important;
}

[data-theme="light"] .japanese-text {
    color: rgba(0, 0, 0, 0.05) !important;
}

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        padding: 4rem 20px;
        height: auto;
        min-height: 100vh;
    }

    .hero-content {
        padding-right: 0;
        order: 2;
    }

    .hero-character {
        order: 1;
    }

    .character-img {
        max-width: 400px;
        max-height: 50vh;
    }

    .floating-ui {
        position: static;
        display: inline-block;
        margin: 1rem;
        transform: none !important;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .theme-toggle {
        top: 20px;
        left: 20px;
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .nav {
        top: 20px;
        right: 20px;
        gap: 10px;
    }

    .nav-dot {
        width: 10px;
        height: 10px;
    }

    .hero-container {
        gap: 2rem;
        padding: 3rem 20px;
    }

    .hero-stats {
        gap: 1rem;
        margin: 2rem 0;
        padding: 1.5rem 0;
    }

    .stat-item {
        text-align: center;
    }

    .character-img {
        max-width: 320px;
        max-height: 40vh;
    }

    .japanese-text {
        font-size: 4rem;
        opacity: 0.03;
    }

    .container {
        padding: 0 20px;
    }

    .title-xl {
        font-size: clamp(2.5rem, 12vw, 4rem);
        line-height: 0.95;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .floating-ui {
        margin: 0.5rem;
        min-width: 100px;
        padding: 12px 16px;
    }
}

/* ===============================
   ФИНАЛЬНЫЕ ИСПРАВЛЕННЫЕ АДАПТИВНЫЕ СТИЛИ ДЛЯ HERO СЕКЦИИ JIN SAKAI
   =============================== */

/* ===============================
   СПЕЦИАЛЬНО ДЛЯ 769px (iPad Portrait) - ПОЛНОЕ ИСПРАВЛЕНИЕ
   =============================== */

@media (max-width: 769px) and (min-width: 700px) {
    .hero-container {
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
        padding: 1rem 30px !important;
        height: 100vh !important;
        align-items: center !important;
        justify-content: center !important;
        max-width: 100% !important;
    }
    
    .hero-content {
        order: 1 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
        text-align: left !important;
        z-index: 10 !important;
    }

    .hero-character {
        order: 2 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        position: relative !important;
        z-index: 8 !important;
    }

    .character-img {
        max-width: 320px !important;
        max-height: 60vh !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }

    .title-xl {
        font-size: clamp(2.2rem, 6vw, 3.5rem) !important;
        margin-bottom: 0.8rem !important;
        text-align: left !important;
        line-height: 0.9 !important;
    }

    .hero-subtitle {
        font-size: 0.75rem !important;
        letter-spacing: 2px !important;
        margin-bottom: 0.8rem !important;
        text-align: left !important;
    }

    .subtitle {
        font-size: 0.85rem !important;
        margin-bottom: 1.2rem !important;
        max-width: 95% !important;
        text-align: left !important;
        line-height: 1.4 !important;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.8rem !important;
        margin: 1.2rem 0 !important;
        padding: 1rem 0 !important;
        text-align: center !important;
        max-width: 100% !important;
    }

    .scroll-hint {
        margin-top: 1rem !important;
        font-size: 0.75rem !important;
        text-align: center !important;
    }

    .floating-ui {
        transform: scale(0.7) !important;
        opacity: 1 !important;
        z-index: 15 !important;
    }

    .ui-honor {
        position: absolute !important;
        left: -10% !important;
        top: 15% !important;
        transform: translateX(-50px) scale(0.7) !important;
        z-index: 15 !important;
    }

    .ui-ghost {
        position: absolute !important;
        right: 50% !important;
        bottom: 30% !important;
        transform: scale(0.7) !important;
        z-index: 15 !important;
    }

    .ui-legend {
        position: absolute !important;
        left: 64% !important;
        top: 65% !important;
        transform: translateX(-20px) scale(0.7) !important;
        z-index: 15 !important;
    }

    .layer-mountains {
        opacity: 0.8 !important;
        filter: brightness(0.7) !important;
        z-index: 1 !important;
    }

    .layer-mist {
        opacity: 0.6 !important;
        z-index: 1 !important;
    }

    .layer-trees-back-1,
    .layer-trees-back-2,
    .layer-trees-back-3 {
        opacity: 0.6 !important;
        filter: brightness(0.6) !important;
        z-index: 2 !important;
    }

    .layer-trees-mid-1,
    .layer-trees-mid-2 {
        opacity: 0.5 !important;
        filter: brightness(0.5) !important;
        z-index: 3 !important;
    }

    .layer-trees-front-1,
    .layer-trees-front-2 {
        opacity: 0.4 !important;
        filter: brightness(0.4) !important;
        z-index: 4 !important;
    }

    .japanese-text {
        opacity: 0.05 !important;
        font-size: 4rem !important;
        z-index: 1 !important;
    }

    .sakura-container {
        opacity: 0.8 !important;
        z-index: 5 !important;
    }

    .particles-container {
        opacity: 0.6 !important;
        z-index: 5 !important;
    }

    .ancient-scroll {
        display: none !important;
    }

    .interactive-katana {
        opacity: 0.8 !important;
        z-index: 12 !important;
    }
}

/* ===============================
ДЛЯ МОБИЛЬНЫХ 390px-480px 
=============================== */

@media (max-width: 480px) {
    .hero-container {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        text-align: center !important;
        padding: 1.5rem 20px !important;
        min-height: 100vh !important;
        height: auto !important;
        gap: 1.2rem !important;
        position: relative !important;
        z-index: 10 !important;
        padding: 4rem 20px 3rem 20px !important;
    }
    
    .hero-content {
        order: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 10 !important;
    }
    
    .hero-character {
        order: 1 !important;
        width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        z-index: 8 !important;
        position: relative !important;
        margin-top: 2rem !important;
    }
    
    .character-img {
        max-width: 320px !important;
        max-height: 40vh !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        z-index: 8 !important;
        position: relative !important;
    }
    
    .title-xl {
        font-size: clamp(2rem, 12vw, 3.2rem) !important;
        margin-bottom: 0.8rem !important;
        text-align: center !important;
        line-height: 0.9 !important;
    }
    
    .hero-subtitle {
        font-size: 0.75rem !important;
        margin-bottom: 0.8rem !important;
        text-align: center !important;
        letter-spacing: 2px !important;
    }
    
    .subtitle {
        font-size: 0.85rem !important;
        margin-bottom: 1.2rem !important;
        text-align: center !important;
        max-width: 100% !important;
        line-height: 1.4 !important;
    }
    
    .hero-stats {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        width: 100% !important;
        max-width: 280px !important;
        margin: 1.2rem auto !important;
        padding: 1rem 0 !important;
        text-align: center !important;
    }
    
    .stat-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 0.4rem !important;
    }
    
    .stat-value {
        font-size: 1.1rem !important;
    }
    
    .stat-label {
        font-size: 0.75rem !important;
    }
    
    .scroll-hint {
        font-size: 0.75rem !important;
        margin-top: 1rem !important;
        text-align: center !important;
    }
    
    .scroll-arrow {
        font-size: 1.2rem !important;
        margin-top: 0.5rem !important;
    }
    
    .floating-ui,
    .ui-honor,
    .ui-ghost,
    .ui-legend {
        display: none !important;
    }
    
    .theme-toggle {
        padding: 8px 12px !important;
        font-size: 0.7rem !important;
        top: 20px !important;
        left: 20px !important;
        z-index: 20 !important;
    }
    
    .nav {
        top: 20px !important;
        right: 20px !important;
        gap: 8px !important;
        z-index: 20 !important;
    }
    
    .nav-dot {
        width: 8px !important;
        height: 8px !important;
    }

    .layer-mountains {
        position: absolute !important;
        top: 25% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 100vw !important;
        height: 50vh !important;
        z-index: 1 !important;
        opacity: 0.4 !important;
        object-fit: cover !important;
        object-position: center bottom !important;
        mask: linear-gradient(to bottom, white 0%, white 70%, transparent 100%) !important;
        -webkit-mask: linear-gradient(to bottom, white 0%, white 70%, transparent 100%) !important;
    }

    .layer-mist {
        position: absolute !important;
        top: 10% !important;
        left: 50% !important;
        width: 120vw !important;
        height: 40vh !important;
        z-index: 1 !important;
        opacity: 0.3 !important;
        object-fit: cover !important;
        object-position: center center !important;
        animation: mistFloatMobile 25s ease-in-out infinite !important;
    }

    .layer-trees-back-1,
    .layer-trees-back-2,
    .layer-trees-back-3 {
        position: absolute !important;
        bottom: 30vh !important;
        width: 150px !important;
        height: auto !important;
        max-height: 30vh !important;
        z-index: 2 !important;
        opacity: 0.25 !important;
        object-fit: contain !important;
    }

    .layer-trees-mid-1,
    .layer-trees-mid-2 {
        position: absolute !important;
        bottom: 32vh !important;
        width: 120px !important;
        height: auto !important;
        max-height: 28vh !important;
        z-index: 3 !important;
        opacity: 0.2 !important;
        object-fit: contain !important;
    }

    .layer-trees-front-1,
    .layer-trees-front-2 {
        position: absolute !important;
        bottom: 28vh !important;
        width: 180px !important;
        height: auto !important;
        max-height: 32vh !important;
        z-index: 4 !important;
        opacity: 0.15 !important;
        object-fit: contain !important;
    }

    .sakura-container {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 60vh !important;
        z-index: 5 !important;
        opacity: 0.6 !important;
        pointer-events: none !important;
    }

    .sakura-petal {
        width: 8px !important;
        height: 10px !important;
        opacity: 0.6 !important;
        animation: fallGinkgo 12s linear infinite !important;
    }

    .sakura-petal:nth-child(1) { animation-delay: 0s !important; }
    .sakura-petal:nth-child(2) { animation-delay: 1.5s !important; }
    .sakura-petal:nth-child(3) { animation-delay: 0.8s !important; }
    .sakura-petal:nth-child(4) { animation-delay: 2.2s !important; }
    .sakura-petal:nth-child(5) { animation-delay: 1.1s !important; }
    .sakura-petal:nth-child(6) { animation-delay: 3s !important; }
    .sakura-petal:nth-child(7) { animation-delay: 1.8s !important; }
    .sakura-petal:nth-child(8) { animation-delay: 0.4s !important; }
    .sakura-petal:nth-child(9) { animation-delay: 2.5s !important; }
    .sakura-petal:nth-child(10) { animation-delay: 1.3s !important; }

    .particles-container {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 50vh !important;
        z-index: 5 !important;
        opacity: 0.4 !important;
        pointer-events: none !important;
    }

    .particle {
        width: 2px !important;
        height: 2px !important;
        opacity: 0.5 !important;
        animation: particleFloat 6s linear infinite !important;
    }

    .particle.ember {
        opacity: 0.4 !important;
        animation: emberFloat 4s ease-out infinite !important;
    }

    .japanese-text,
    .ancient-scroll,
    .interactive-katana {
        display: none !important;
    }

    .hero-section {
        position: relative !important;
        overflow: hidden !important;
    }

    .hero-bg,
    .hero-overlay {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    @keyframes mistFloatMobile {
        0%, 100% { 
            transform: translateX(-50%) translateY(0); 
            opacity: 0.3;
        }
        25% { 
            transform: translateX(-45%) translateY(-5px); 
            opacity: 0.25;
        }
        50% { 
            transform: translateX(-40%) translateY(0); 
            opacity: 0.3;
        }
        75% { 
            transform: translateX(-48%) translateY(5px); 
            opacity: 0.25;
        }
    }
}

[data-theme="light"] {
    @media (max-width: 480px) {
        .hero-bg {
            background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
        }

        .hero-overlay {
            background: linear-gradient(135deg, rgba(248, 249, 250, 0.9) 0%, rgba(233, 236, 239, 0.8) 100%) !important;
        }

        .hero-section {
            background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
        }

        .layer-mountains {
            opacity: 0.3 !important;
            filter: brightness(1.4) contrast(0.7) sepia(10%) !important;
        }

        .layer-mist {
            opacity: 0.25 !important;
            filter: brightness(1.6) contrast(0.6) !important;
        }

        .layer-trees-back-1,
        .layer-trees-back-2,
        .layer-trees-back-3,
        .layer-trees-mid-1,
        .layer-trees-mid-2,
        .layer-trees-front-1,
        .layer-trees-front-2 {
            opacity: 0.15 !important;
            filter: brightness(1.8) contrast(0.5) sepia(15%) !important;
        }

        .sakura-container {
            opacity: 0.4 !important;
        }

        .particles-container {
            opacity: 0.3 !important;
        }

        .title-xl,
        .hero-subtitle,
        .subtitle,
        .stat-label,
        .stat-value,
        .scroll-hint {
            color: #2c3e50 !important;
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1) !important;
        }

        .hero-subtitle {
            color: #8b7355 !important;
        }

        .stat-value {
            color: #c9950a !important;
        }
        .layer-mountains {
            position: absolute !important;
            top: 10% !important;
            left: 50% !important;
            transform: translateX(-50%) !important;
            width: 100vw !important;
            height: 50vh !important;
            z-index: 1 !important;
            opacity: 0.4 !important;
            object-fit: cover !important;
            object-position: center bottom !important;
            mask: linear-gradient(to bottom, white 0%, white 70%, transparent 100%) !important;
            -webkit-mask: linear-gradient(to bottom, white 0%, white 70%, transparent 100%) !important;
        }
    }
}

/* ===============================
ДЛЯ ОЧЕНЬ МАЛЕНЬКИХ ЭКРАНОВ (до 390px)
=============================== */

@media (max-width: 390px) {
    .hero-container {
        padding: 1rem 15px !important;
        gap: 1rem !important;
    }
    
    .character-img {
        max-width: 250px !important;
        max-height: 50vh !important;
    }
    
    .title-xl {
        font-size: clamp(1.8rem, 14vw, 2.8rem) !important;
    }
    
    .hero-stats {
        max-width: 250px !important;
        gap: 0.8rem !important;
    }
    
    .theme-toggle {
        padding: 6px 10px !important;
        font-size: 0.65rem !important;
        top: 15px !important;
        left: 15px !important;
    }
    
    .nav {
        top: 15px !important;
        right: 15px !important;
    }
    
    .nav-dot {
        width: 6px !important;
        height: 6px !important;
    }

    .layer-mountains {
        opacity: 0.3 !important;
        min-height: 45vh !important;
    }
    .layer-mountains {
        position: absolute !important;
        top: 10% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 100vw !important;
        height: 50vh !important;
        z-index: 1 !important;
        opacity: 0.4 !important;
        object-fit: cover !important;
        object-position: center bottom !important;
        mask: linear-gradient(to bottom, white 0%, white 70%, transparent 100%) !important;
        -webkit-mask: linear-gradient(to bottom, white 0%, white 70%, transparent 100%) !important;
    }

    .layer-trees-back-1,
    .layer-trees-back-2,
    .layer-trees-back-3,
    .layer-trees-mid-1,
    .layer-trees-mid-2,
    .layer-trees-front-1,
    .layer-trees-front-2 {
        opacity: 0.15 !important;
        width: 100px !important;
    }

    .sakura-container {
        opacity: 0.4 !important;
    }

    .particles-container {
        opacity: 0.3 !important;
    }

    .sakura-petal {
        width: 6px !important;
        height: 8px !important;
    }
}

/* ===============================
ПЛАНШЕТЫ ГОРИЗОНТАЛЬНЫЕ (1024px+)
=============================== */

@media (max-width: 1024px) and (min-width: 770px) and (orientation: landscape) {
    .hero-container {
        grid-template-columns: 1.2fr 0.8fr !important;
        gap: 1.5rem !important;
        height: 100vh !important;
        padding: 1.5rem 40px !important;
        align-items: center !important;
    }

    .character-img {
        max-width: 350px !important;
        max-height: 75vh !important;
    }

    .title-xl {
        font-size: clamp(2.5rem, 5vw, 4rem) !important;
        line-height: 0.9 !important;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
        margin: 1.5rem 0 !important;
        padding: 1rem 0 !important;
    }

    .floating-ui {
        transform: scale(0.8) !important;
    }

    /* Полноценный фон */
    .layer-mountains {
        opacity: 0.9 !important;
        filter: brightness(0.8) !important;
    }

    .layer-trees-back-1,
    .layer-trees-back-2,
    .layer-trees-back-3,
    .layer-trees-mid-1,
    .layer-trees-mid-2,
    .layer-trees-front-1,
    .layer-trees-front-2 {
        opacity: 0.7 !important;
    }

    .sakura-container,
    .particles-container {
        opacity: 0.8 !important;
    }
}

/* ===============================
МОБИЛЬНЫЕ ГОРИЗОНТАЛЬНЫЕ
=============================== */

@media (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
    .hero-container {
        grid-template-columns: 1fr 0.6fr !important;
        gap: 1rem !important;
        height: 100vh !important;
        padding: 0.8rem 25px !important;
        align-items: center !important;
    }

    .hero-content {
        order: 1 !important;
        text-align: left !important;
    }

    .hero-character {
        order: 2 !important;
    }

    .character-img {
        max-width: 180px !important;
        max-height: 85vh !important;
    }

    .title-xl {
        font-size: clamp(1.6rem, 5vw, 2.2rem) !important;
        line-height: 0.9 !important;
        margin-bottom: 0.6rem !important;
    }

    .hero-subtitle {
        font-size: 0.65rem !important;
        margin-bottom: 0.4rem !important;
    }

    .subtitle {
        font-size: 0.75rem !important;
        margin-bottom: 0.8rem !important;
        line-height: 1.3 !important;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.6rem !important;
        margin: 0.8rem 0 !important;
        padding: 0.6rem 0 !important;
    }

    .stat-value {
        font-size: 0.9rem !important;
    }

    .stat-label {
        font-size: 0.65rem !important;
    }

    .scroll-hint {
        font-size: 0.65rem !important;
        margin-top: 0.8rem !important;
    }

    .floating-ui {
        display: none !important;
    }

    .layer-mountains {
        opacity: 0.4 !important;
        min-height: 70vh !important;
        z-index: 1 !important;
    }

    .layer-trees-back-1,
    .layer-trees-back-2,
    .layer-trees-back-3,
    .layer-trees-mid-1,
    .layer-trees-mid-2,
    .layer-trees-front-1,
    .layer-trees-front-2 {
        opacity: 0.25 !important;
        width: 80px !important;
        z-index: 2 !important;
    }

    .sakura-container {
        opacity: 0.3 !important;
        z-index: 3 !important;
    }

    .particles-container {
        opacity: 0.2 !important;
        z-index: 3 !important;
    }

    .japanese-text,
    .ancient-scroll,
    .interactive-katana {
        display: none !important;
    }
}

@media (max-width: 769px) and (min-width: 700px) {
    .stat-value {
        font-size: 1rem !important; 
        font-weight: 700 !important;
        color: var(--accent-gold) !important;
        white-space: nowrap !important; 
        overflow: hidden !important; 
        text-overflow: ellipsis !important; 
    }
}

/* ===============================
ОБЩИЕ ОПТИМИЗАЦИИ Z-INDEX
=============================== */

.hero-bg,
.hero-overlay {
    z-index: 0 !important;
}

.parallax-img {
    z-index: 1 !important;
}

.hero-container {
    z-index: 10 !important;
}

.character-img {
    z-index: 8 !important;
}

.floating-ui {
    z-index: 15 !important;
}

.theme-toggle,
.nav {
    z-index: 20 !important;
}


/* ===============================
SECTION 2: THE FALL
=============================== */
.fall-section {
    height: 100vh;
    background: #0B0B13;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8;
}

.fall-title-container {
    text-align: center;
    z-index: 100;
}

.fall-japanese-title {
    font-family: 'HanyiSentyPagoda Regular', 'Noto Sans JP', serif;
    font-size: 120px;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 60px;
    line-height: 1;
}

.japanese-char {
    display: block;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fall-english-title {
    font-family: 'Futura', 'Arial', sans-serif;
    font-size: 60px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 4px;
    position: relative;
}

.fall-english-title::before,
.fall-english-title::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: #ffffff;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fall-english-title::before {
    top: -15px;
}

.fall-english-title::after {
    bottom: -15px;
}

.fall-letter {
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.petal-particle {
    position: fixed;
    width: 6px;
    height: 10px;
    background: linear-gradient(45deg, #ffffff 0%, #f8f8f8 50%, #f0f0f0 100%);
    border-radius: 0 80% 0 80%;
    opacity: 0.9;
    pointer-events: none;
    z-index: 200;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.petal-particle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 6px;
    background: rgba(200, 200, 200, 0.3);
    transform: translate(-50%, -50%);
}

@keyframes petalFlySmooth1 {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg) scale(1);
        opacity: 0.9;
    }
    100% {
        transform: translateX(450px) translateY(-80px) rotate(720deg) scale(0.2);
        opacity: 0;
    }
}

@keyframes petalFlySmooth2 {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg) scale(1);
        opacity: 0.9;
    }
    100% {
        transform: translateX(420px) translateY(-120px) rotate(680deg) scale(0.2);
        opacity: 0;
    }
}

@keyframes petalFlySmooth3 {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg) scale(1);
        opacity: 0.9;
    }
    100% {
        transform: translateX(480px) translateY(-60px) rotate(750deg) scale(0.2);
        opacity: 0;
    }
}

@keyframes petalFlyWind1 {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg) scale(1);
        opacity: 0.9;
    }
    20% {
        transform: translateX(60px) translateY(-15px) rotate(144deg) scale(0.95);
        opacity: 0.8;
    }
    40% {
        transform: translateX(140px) translateY(-5px) rotate(288deg) scale(0.85);
        opacity: 0.6;
    }
    60% {
        transform: translateX(240px) translateY(-40px) rotate(432deg) scale(0.7);
        opacity: 0.4;
    }
    80% {
        transform: translateX(360px) translateY(-20px) rotate(576deg) scale(0.5);
        opacity: 0.2;
    }
    100% {
        transform: translateX(500px) translateY(-80px) rotate(720deg) scale(0.2);
        opacity: 0;
    }
}

@keyframes petalFlyWind2 {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg) scale(1);
        opacity: 0.9;
    }
    25% {
        transform: translateX(80px) translateY(-25px) rotate(180deg) scale(0.9);
        opacity: 0.75;
    }
    50% {
        transform: translateX(180px) translateY(-10px) rotate(360deg) scale(0.8);
        opacity: 0.5;
    }
    75% {
        transform: translateX(300px) translateY(-50px) rotate(540deg) scale(0.6);
        opacity: 0.3;
    }
    100% {
        transform: translateX(450px) translateY(-30px) rotate(720deg) scale(0.2);
        opacity: 0;
    }
}

@keyframes petalFlyWind3 {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg) scale(1);
        opacity: 0.9;
    }
    15% {
        transform: translateX(45px) translateY(-30px) rotate(108deg) scale(0.95);
        opacity: 0.8;
    }
    35% {
        transform: translateX(120px) translateY(-8px) rotate(252deg) scale(0.85);
        opacity: 0.65;
    }
    55% {
        transform: translateX(220px) translateY(-45px) rotate(396deg) scale(0.75);
        opacity: 0.45;
    }
    75% {
        transform: translateX(340px) translateY(-25px) rotate(540deg) scale(0.55);
        opacity: 0.25;
    }
    100% {
        transform: translateX(480px) translateY(-70px) rotate(684deg) scale(0.2);
        opacity: 0;
    }
}

.fall-letter.scatter,
.japanese-char.scatter {
    opacity: 0;
    transform: scale(0);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fall-english-title.scatter::before,
.fall-english-title.scatter::after {
    opacity: 0;
}

/* ===============================
СТИЛИ ДЛЯ СВЕТЛОЙ ТЕМЫ - ДОБАВИТЬ В КОНЕЦ CSS
=============================== */

[data-theme="light"] .fall-section {
    background: #ffffff;
}

[data-theme="light"] .fall-japanese-title {
    color: #1a1a1a;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .japanese-char {
    color: #1a1a1a;
}

[data-theme="light"] .fall-english-title {
    color: #1a1a1a;
}

[data-theme="light"] .fall-english-title::before,
[data-theme="light"] .fall-english-title::after {
    background: #1a1a1a;
}

[data-theme="light"] .fall-letter {
    color: #1a1a1a;
}

[data-theme="light"] .petal-particle {
    background: linear-gradient(45deg, #2a2a2a 0%, #404040 50%, #555555 100%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

[data-theme="light"] .petal-particle::before {
    background: rgba(100, 100, 100, 0.6);
}

/* ===============================
АДАПТИВНЫЕ СТИЛИ ДЛЯ FALL СЕКЦИИ
=============================== */

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .fall-japanese-title {
        font-size: 100px;
        margin-bottom: 50px;
    }
    
    .fall-english-title {
        font-size: 50px;
        letter-spacing: 3px;
    }
    
    .fall-english-title::before {
        top: -12px;
    }
    
    .fall-english-title::after {
        bottom: -12px;
    }
}

/* Маленькие планшеты (481px - 768px) */
@media (max-width: 768px) and (min-width: 481px) {
    .fall-japanese-title {
        font-size: 80px;
        margin-bottom: 40px;
        line-height: 0.9;
    }
    
    .fall-english-title {
        font-size: 40px;
        letter-spacing: 2px;
    }
    
    .fall-english-title::before {
        top: -10px;
    }
    
    .fall-english-title::after {
        bottom: -10px;
    }
    
    .petal-particle {
        width: 5px;
        height: 8px;
    }
}

/* Мобильные устройства (320px - 480px) */
@media (max-width: 480px) {
    .fall-section {
        padding: 20px;
    }
    
    .fall-title-container {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .fall-japanese-title {
        font-size: clamp(50px, 15vw, 70px);
        margin-bottom: 30px;
        line-height: 0.9;
    }
    
    .fall-english-title {
        font-size: clamp(24px, 8vw, 32px);
        letter-spacing: 1px;
        line-height: 1.2;
    }
    
    .fall-english-title::before {
        top: -8px;
    }
    
    .fall-english-title::after {
        bottom: -8px;
    }
    
    .petal-particle {
        width: 4px;
        height: 6px;
    }
    
    .petal-particle::before {
        width: 0.5px;
        height: 4px;
    }
    
    @keyframes petalFlySmooth1 {
        0% {
            transform: translateX(0) translateY(0) rotate(0deg) scale(1);
            opacity: 0.9;
        }
        100% {
            transform: translateX(250px) translateY(-60px) rotate(720deg) scale(0.2);
            opacity: 0;
        }
    }
    
    @keyframes petalFlySmooth2 {
        0% {
            transform: translateX(0) translateY(0) rotate(0deg) scale(1);
            opacity: 0.9;
        }
        100% {
            transform: translateX(220px) translateY(-80px) rotate(680deg) scale(0.2);
            opacity: 0;
        }
    }
    
    @keyframes petalFlySmooth3 {
        0% {
            transform: translateX(0) translateY(0) rotate(0deg) scale(1);
            opacity: 0.9;
        }
        100% {
            transform: translateX(280px) translateY(-40px) rotate(750deg) scale(0.2);
            opacity: 0;
        }
    }
    
    @keyframes petalFlyWind1 {
        0% {
            transform: translateX(0) translateY(0) rotate(0deg) scale(1);
            opacity: 0.9;
        }
        20% {
            transform: translateX(40px) translateY(-10px) rotate(144deg) scale(0.95);
            opacity: 0.8;
        }
        40% {
            transform: translateX(80px) translateY(-5px) rotate(288deg) scale(0.85);
            opacity: 0.6;
        }
        60% {
            transform: translateX(140px) translateY(-25px) rotate(432deg) scale(0.7);
            opacity: 0.4;
        }
        80% {
            transform: translateX(200px) translateY(-15px) rotate(576deg) scale(0.5);
            opacity: 0.2;
        }
        100% {
            transform: translateX(280px) translateY(-50px) rotate(720deg) scale(0.2);
            opacity: 0;
        }
    }
    
    @keyframes petalFlyWind2 {
        0% {
            transform: translateX(0) translateY(0) rotate(0deg) scale(1);
            opacity: 0.9;
        }
        25% {
            transform: translateX(50px) translateY(-18px) rotate(180deg) scale(0.9);
            opacity: 0.75;
        }
        50% {
            transform: translateX(100px) translateY(-8px) rotate(360deg) scale(0.8);
            opacity: 0.5;
        }
        75% {
            transform: translateX(180px) translateY(-35px) rotate(540deg) scale(0.6);
            opacity: 0.3;
        }
        100% {
            transform: translateX(250px) translateY(-20px) rotate(720deg) scale(0.2);
            opacity: 0;
        }
    }
    
    @keyframes petalFlyWind3 {
        0% {
            transform: translateX(0) translateY(0) rotate(0deg) scale(1);
            opacity: 0.9;
        }
        15% {
            transform: translateX(30px) translateY(-20px) rotate(108deg) scale(0.95);
            opacity: 0.8;
        }
        35% {
            transform: translateX(70px) translateY(-5px) rotate(252deg) scale(0.85);
            opacity: 0.65;
        }
        55% {
            transform: translateX(130px) translateY(-30px) rotate(396deg) scale(0.75);
            opacity: 0.45;
        }
        75% {
            transform: translateX(190px) translateY(-18px) rotate(540deg) scale(0.55);
            opacity: 0.25;
        }
        100% {
            transform: translateX(270px) translateY(-45px) rotate(684deg) scale(0.2);
            opacity: 0;
        }
    }
}

/* Очень маленькие экраны (до 360px) */
@media (max-width: 360px) {
    .fall-section {
        padding: 15px;
    }
    
    .fall-title-container {
        max-width: 280px;
    }
    
    .fall-japanese-title {
        font-size: clamp(40px, 18vw, 60px);
        margin-bottom: 25px;
    }
    
    .fall-english-title {
        font-size: clamp(20px, 9vw, 28px);
        letter-spacing: 0.5px;
    }
    
    .fall-english-title::before {
        top: -6px;
    }
    
    .fall-english-title::after {
        bottom: -6px;
    }
    
    .petal-particle {
        width: 3px;
        height: 5px;
    }
    
    .petal-particle::before {
        display: none;
    }
}

/* Горизонтальная ориентация мобильных */
@media (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
    .fall-section {
        padding: 10px;
    }
    
    .fall-japanese-title {
        font-size: clamp(35px, 12vw, 50px);
        margin-bottom: 20px;
    }
    
    .fall-english-title {
        font-size: clamp(18px, 6vw, 25px);
        letter-spacing: 1px;
    }
    
    .fall-english-title::before {
        top: -5px;
    }
    
    .fall-english-title::after {
        bottom: -5px;
    }
}

/* ===============================
SECTION 2-2: THE FALL
=============================== */
/* ===============================
PHOTO STORY SECTION - ПОЛНЫЕ СТИЛИ
=============================== */

.photo-story-section {
    height: 500vh;
    position: relative;
    background: var(--primary-color);
    z-index: 10;
    overflow: hidden;
}

/* Фиксированные изображения  */
.story-images {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1; 
}

.story-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease, transform 1.5s ease;
    border-radius: 0;
}

.story-image.visible {
    opacity: 1;
    transform: scale(1);
}

/* Читаемые заголовки позади фото */
.story-titles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-title {
    position: absolute;
    font-size: 110px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.4);
    text-align: left;
    line-height: 1;
    letter-spacing: -0.05em;
    opacity: 0;
    transition: opacity 1.2s ease;
    pointer-events: none;
    user-select: none;
    text-shadow: 
        3px 3px 15px rgba(0, 0, 0, 0.9),
        0px 0px 30px rgba(0, 0, 0, 0.8),
        0px 0px 50px rgba(0, 0, 0, 0.6);
    mix-blend-mode: screen;
    top: 0%;
    left: 60px;
}

.story-title.visible {
    opacity: 1;
}

/* Тексты поверх фото */
.story-texts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    pointer-events: none;
}

.text-group {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.text-group.visible {
    opacity: 1;
}

.story-text {
    position: absolute;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 500;
    color: #ffffff;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-shadow: 
        2px 2px 12px rgba(0, 0, 0, 0.9),
        0px 0px 25px rgba(0, 0, 0, 0.8);
}

.story-text.active {
    opacity: 1;
    transform: translateY(0);
}

/* Прогресс бар */
.scroll-progress {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1px;
    z-index: 20;
    opacity: 0.7;
}

.progress-bar {
    height: 100%;
    background: var(--accent-gold);
    border-radius: 1px;
    width: 0%;
    transition: width 0.1s ease;
}

/* Нежные лепестки для плавного создания фото */
.create-petal {
    position: fixed;
    width: 4px;
    height: 7px;
    background: linear-gradient(45deg, #ffffff 0%, #f8f8f8 50%, #f0f0f0 100%);
    border-radius: 0 60% 0 60%;
    opacity: 0.7;
    pointer-events: none;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.create-petal::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.5px;
    height: 3px;
    background: rgba(200, 200, 200, 0.4);
    transform: translate(-50%, -50%);
    border-radius: 1px;
}

/* Светлая тема */
[data-theme="light"] .photo-story-section {
    background: #ffffff;
}

[data-theme="light"] .story-title {
    color: rgba(0, 0, 0, 0.4);
    text-shadow: 
        2px 2px 15px rgba(255, 255, 255, 0.9),
        0px 0px 25px rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .story-text {
    color: #ffffff;
    text-shadow: 
        2px 2px 15px rgba(0, 0, 0, 0.9),
        0px 0px 30px rgba(0, 0, 0, 0.8);
}

[data-theme="light"] .create-petal {
    background: linear-gradient(45deg, #2a2a2a 0%, #404040 50%, #555555 100%);
}

[data-theme="light"] .create-petal::before {
    background: rgba(100, 100, 100, 0.7);
}

/* Адаптивные стили */
@media (max-width: 1024px) {
    .story-title {
        font-size: 90px;
        left: 40px;
    }
    
    .story-text {
        font-size: clamp(1.6rem, 5vw, 2.8rem);
    }
}

@media (max-width: 768px) {
    .photo-story-section {
        height: 400vh;
    }
    
    .story-title {
        font-size: 70px;
        left: 30px;
        line-height: 0.9;
    }
    
    .story-text {
        font-size: clamp(1.3rem, 6vw, 2.2rem);
        padding: 0 1rem;
    }
    
    .scroll-progress {
        width: 150px;
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .story-title {
        font-size: 50px;
        left: 20px;
        color: rgba(255, 255, 255, 0.6);
    }
    
    .story-text {
        font-size: clamp(1.1rem, 7vw, 1.8rem);
        padding: 0 0.5rem;
    }
    
    .scroll-progress {
        width: 120px;
        bottom: 15px;
    }
}

@media (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
    .story-title {
        font-size: 40px;
        left: 15px;
    }
    
    .story-text {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }
    
    .scroll-progress {
        bottom: 10px;
        width: 100px;
    }
}

