/* ==========================================
   INTERACTIVE CANVAS & CINEMATIC TEXT
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background-color: #000000;
    overflow-x: hidden;
    width: 100%;
}

/* Fixed Background Canvas */
#scroll-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    display: block;
    pointer-events: none;
    /* Cinematic quality enhancement */
    filter: contrast(1.06) brightness(1.02) saturate(1.08);
}

/* Cinematic Name Overlay (Centered) */
.name-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;
    will-change: transform, opacity, filter;
}

.japanese-name {
    font-family: 'Syne', 'Yu Gothic', 'Meiryo', 'MS Gothic', sans-serif;
    font-size: clamp(3.5rem, 11vw, 9.5rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.02em;
    user-select: none;
}

.uchiha-ja {
    color: #ffffff;
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.35), 0 0 50px rgba(255, 255, 255, 0.15);
}

.itachi-ja {
    color: #e50914; /* Crimson Red */
    text-shadow: 0 0 30px rgba(229, 9, 20, 0.6), 0 0 60px rgba(229, 9, 20, 0.3);
}

.english-name {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.7rem, 1.8vw, 1.2rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.6em;
    text-transform: uppercase;
    margin-top: 1.8rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    text-indent: 0.6em;
    user-select: none;
}

/* ==========================================
   LEFT-SIDE CHARACTER TRAITS
   ========================================== */
.traits-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
}

.trait-section {
    position: absolute;
    left: 8vw;
    top: 50%;
    transform: translateY(-50%);
    width: 32vw;
    max-width: 360px; /* Constrain text block strictly to left side so it doesn't cross face */
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    will-change: transform, opacity, filter;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.trait-title {
    font-family: 'Syne', 'Yu Gothic', 'Meiryo', 'MS Gothic', sans-serif;
    font-size: clamp(2.8rem, 6.5vw, 5.8rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    user-select: none;
}

.white-text {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 40px rgba(255, 255, 255, 0.1);
}

.red-text {
    color: #e50914;
    text-shadow: 0 0 25px rgba(229, 9, 20, 0.5), 0 0 50px rgba(229, 9, 20, 0.2);
}

.trait-english {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.7rem, 1.5vw, 1.05rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    text-indent: 0.4em;
    user-select: none;
}

.trait-desc {
    display: flex;
    flex-wrap: wrap; /* Auto next line alignment */
    align-items: center;
    gap: 12px;
    border-left: 2px solid #e50914;
    padding-left: 18px;
    margin-top: 0.5rem;
}

.trait-desc-ja {
    font-family: 'Yu Gothic', 'Meiryo', sans-serif;
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.05em;
    user-select: none;
}

.trait-desc-en {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.8rem, 1.6vw, 0.95rem);
    font-weight: 400;
    color: #e50914; /* Crimson Accent for descriptor */
    letter-spacing: 0.05em;
    user-select: none;
}

/* ==========================================
   SCROLL POSITIONING
   ========================================== */
.scroll-spacer {
    height: 1200vh; /* Extended to 12 screen scroll height for additional scroll reveal section */
    position: relative;
    z-index: 2;
    pointer-events: none;
}

/* Video Reveal Container */
.video-container {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 20; /* Keep it in front of the background canvas and traits */
    transform: translateY(100%); /* Start completely offscreen below */
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    will-change: transform;
}

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

.video-subtitle {
    position: absolute;
    bottom: 8vh;
    left: 50%;
    transform: translate(-50%, 0);
    z-index: 25;
    text-align: center;
    width: 90%;
    max-width: 1000px;
    user-select: none;
    pointer-events: none;
    opacity: 0;
    will-change: transform, opacity, filter;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.video-japanese-quote {
    font-family: 'Syne', 'Yu Gothic', 'Meiryo', 'MS Gothic', sans-serif;
    font-size: clamp(1.5rem, 4.2vw, 3rem);
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: 0.05em;
}

.video-english-quote {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.7rem, 1.5vw, 0.95rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
    text-indent: 0.35em;
}

/* Hide scrollbar for immersive cinematic look */
::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* ==========================================
   UCHIHA CLAN CREST (Bottom-Right Cover)
   ========================================== */
.uchiha-crest {
    position: fixed;
    bottom: 48px;
    right: 104px;
    z-index: 9999;
    width: 82px;
    height: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
    background: radial-gradient(ellipse at center, rgba(0,0,0,1) 62%, rgba(0,0,0,0.0) 100%);
    border-radius: 50%;
    padding: 4px;
}

.crest-svg {
    width: 58px;
    height: 58px;
    animation: crestPulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(229, 9, 20, 0.6));
}

.crest-label {
    font-family: 'Yu Gothic', 'Meiryo', sans-serif;
    font-size: 6px;
    color: rgba(229, 9, 20, 0.6);
    letter-spacing: 0.12em;
    margin-top: 1px;
    text-align: center;
}

@keyframes crestPulse {
    0%, 100% {
        filter: drop-shadow(0 0 4px rgba(229, 9, 20, 0.5));
        opacity: 0.88;
    }
    50% {
        filter: drop-shadow(0 0 10px rgba(229, 9, 20, 0.9));
        opacity: 1;
    }
}

/* ==========================================
   END SECTION TECHNIQUES OVERLAYS
   ========================================== */
.end-section-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 30; /* In front of video */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10vh 8vw;
    color: #ffffff;
    pointer-events: none;
    transform: translateY(100%); /* Starts completely off-screen at bottom */
    background-color: #000000;
    /* Spotlight / Flashlight effect around cursor position variables */
    background-image: radial-gradient(circle 180px at var(--mouse-x, 50%) var(--mouse-y, 50%), transparent 0%, rgba(0, 0, 0, 0.3) 70%, rgba(0, 0, 0, 1) 100%), url('ChatGPT%20Image%20Aug%202,%202026,%2003_05_51%20PM.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.end-left-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 45%;
    max-width: 550px;
}

.end-main-title {
    font-family: 'Syne', 'Yu Gothic', 'Meiryo', sans-serif;
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.end-main-desc {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.8rem, 1.6vw, 1rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    margin-bottom: 3.5rem;
    max-width: 480px;
}

.end-details-grid {
    display: flex;
    gap: 3.5rem;
    margin-bottom: 4rem;
}

.end-grid-item {
    display: flex;
    flex-direction: column;
    border-left: 2px solid #e50914;
    padding-left: 12px;
}

.grid-ja {
    font-family: 'Yu Gothic', sans-serif;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.3rem;
}

.grid-en {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.6rem, 1.3vw, 0.75rem);
    color: #e50914;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.end-quote {
    font-family: 'Yu Gothic', 'Meiryo', sans-serif;
    font-size: clamp(0.85rem, 1.8vw, 1.05rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.end-quote-sub {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.7rem, 1.4vw, 0.85rem);
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.end-right-col {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 45%;
    height: 100%;
    position: relative;
}

.end-vertical-badge {
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: left center;
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    display: flex;
    gap: 1rem;
    white-space: nowrap;
}

.end-right-text-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.end-accent-quote {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.75rem, 1.5vw, 0.95rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    max-width: 320px;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.end-accent-word {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.word-ja {
    font-family: 'Syne', 'Yu Gothic', sans-serif;
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 900;
    color: #e50914;
    line-height: 1.1;
    text-shadow: 0 0 35px rgba(229, 9, 20, 0.55);
}

.word-en {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.8rem, 1.8vw, 1.15rem);
    color: #ffffff;
    letter-spacing: 0.5em;
    margin-top: 0.8rem;
    text-indent: 0.5em;
}

/* ==========================================
   CREATIVE UPGRADES & STYLING
   ========================================== */

/* 1. Top Minimalist Header Bar */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.8rem 5vw;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-family: 'Outfit', 'Yu Gothic', sans-serif;
    letter-spacing: 0.15em;
    user-select: none;
}

.logo-ja {
    color: #ffffff;
    font-weight: 700;
}

.logo-divider {
    color: #e50914;
}

.logo-en {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.header-nav {
    display: flex;
    gap: 2.2rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.4);
    user-select: none;
}

.nav-item {
    transition: color 0.3s ease, text-shadow 0.3s ease;
    cursor: default;
}

.nav-item.active {
    color: #e50914;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(229, 9, 20, 0.6);
}

/* 2. Custom Sharingan Reticle Cursor */
@media (pointer: fine) {
    body {
        cursor: default;
    }
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    margin-left: -16px;
    margin-top: -16px;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.15s ease-out, opacity 0.3s ease;
    mix-blend-mode: screen;
}

.cursor-ring {
    width: 100%;
    height: 100%;
    border: 1.5px solid rgba(229, 9, 20, 0.7);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.4);
    transition: transform 0.2s ease;
}

.cursor-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    margin-left: -2.5px;
    margin-top: -2.5px;
    background-color: #e50914;
    border-radius: 50%;
    box-shadow: 0 0 8px #e50914;
}

/* 3. Ambient Embers Canvas */
#ambient-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 3;
    pointer-events: none;
}

/* 4. Click Genjutsu Ripple Effect */
.click-ripple {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid #e50914;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%) scale(0.5);
    animation: rippleExpand 0.6s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.8), inset 0 0 10px rgba(229, 9, 20, 0.5);
}

@keyframes rippleExpand {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.3);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(5);
    }
}

/* 5. Enhanced Interactive Jutsu Grid Card Hover */
.end-grid-item {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, padding-left 0.3s ease;
    padding: 6px 12px;
    border-radius: 0 6px 6px 0;
    pointer-events: auto;
    cursor: pointer;
}

.end-grid-item:hover {
    transform: translateX(8px);
    border-left-color: #ffffff;
    background: rgba(229, 9, 20, 0.12);
    box-shadow: 0 0 25px rgba(229, 9, 20, 0.25);
}


