:root {
    --color-bg: #F8F9FB;
    /* Light Gray/White */
    --color-bg-dark: #EDF2F7;
    /* Slightly darker for contrast sections */
    --color-accent: #0044CC;
    /* Web Blue */
    --color-accent-sub: #FF6600;
    /* Vibrant Orange for calls to action */
    --color-text: #1A202C;
    /* Navy Black */
    --color-text-muted: #4A5568;
    /* Cool Gray */
    --color-glass: rgba(255, 255, 255, 0.85);
    --color-glass-border: rgba(0, 68, 204, 0.1);

    --font-main: 'Noto Sans JP', sans-serif;
    --font-head: 'Outfit', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.8;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
    line-height: 1.2;
    color: var(--color-text);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 5%;
}

.logo {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: var(--color-accent);
}

.nav ul {
    display: flex;
    gap: 30px;
}

.nav a {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.nav a:hover {
    color: var(--color-accent);
}

/* Hero Section */
/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center content horizontally */
    padding: 0 5%;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/hero_bg_new.jpg');
    background-size: 100% auto;
    /* Full Width Top Align */
    background-repeat: no-repeat;
    background-position: center 60px;
    /* Shift down to reveal top */
    background-color: #0b1120;
    /* Dark Navy fallback */
    z-index: -2;
}

/* Mobile Background Override */
@media (max-width: 768px) {
    .hero-bg {
        background-size: contain;
        background-position: center 110px;
        /* Shift down to be visible below header */
        background-color: #0b1120;
    }
}

/* Hero Content Styles */
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    /* Match container width approx */
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    /* Stack children */
    margin-top: 15vh;
}

.hero-catchphrase {
    color: #fff;
    font-size: clamp(1.2rem, 3.5vw, 2.5rem);
    /* Smaller, responsive size */
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
    font-family: var(--font-main);
    white-space: nowrap;
    /* Force single line */
    width: auto;
    /* Allow width to fit content */
    /* Override single line behavior for mobile */
}

/* Base style: hide mobile line break on PC */
.br-sp {
    display: none;
}

/* Base style: show PC line break on PC */
.br-pc {
    display: block;
}

.hero-description {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    line-height: 1.8;
    font-weight: 500;
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    /* Higher transparency */
    padding: 25px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-left: 4px solid var(--color-accent-sub);
    max-width: 550px;
    /* Limit width of the text block */
    align-self: flex-start;
    /* Align container to start */
    margin-left: 30%;
    /* Push to match catchphrase */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 1);
    /* Stronger text shadow */
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .hero-content {
        max-width: 90%;
        margin-top: 30vh;
        /* Moved further down (was 10vh) */
        margin-left: auto;
        margin-right: auto;
        align-items: center;
        /* Center children */
    }

    .hero-catchphrase {
        white-space: normal !important;
        /* Allow wrap */
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        align-self: center;
        /* Center align */
        text-align: center;
        margin-left: 0;
        /* Reset margin */
        width: 100%;
    }

    .br-sp {
        display: block !important;
    }

    .br-pc {
        display: none !important;
    }

    .hero-description {
        padding: 20px;
        font-size: 0.9rem;
        align-self: center;
        /* Center align */
        margin-left: 0;
        /* Reset margin */
        width: 100%;
    }
}

.hero-tech-specs {
    display: inline-flex;
    gap: 20px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.8);
    padding: 15px 25px;
    border-radius: 4px;
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-right: 20px;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.spec-item:last-child {
    border-right: none;
}

.spec-label {
    color: var(--color-text-muted);
    font-size: 0.7rem;
}

.spec-val {
    color: var(--color-accent);
    font-weight: bold;
}

/* Hero Score UI Decoration - Light Mode */
.hero-ui-score {
    position: absolute;
    right: 10%;
    bottom: 20%;
    width: 220px;
    padding: 25px;
    background: #fff;
    border: 1px solid var(--color-glass-border);
    border-top: 4px solid var(--color-accent-sub);
    z-index: 2;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.score-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-bottom: 5px;
}

.score-value {
    font-family: var(--font-mono);
    font-size: 4rem;
    line-height: 1;
    font-weight: 700;
    color: var(--color-text);
}

.score-value .unit {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-left: 5px;
}

.score-wave {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 30px;
    margin-top: 15px;
}

.wave-bar {
    width: 6px;
    background: var(--color-accent-sub);
    /* Orange bars */
    opacity: 0.8;
}


/* Common Sections */
.section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-header.center {
    text-align: center;
}

.section-subtitle {
    display: block;
    font-family: var(--font-mono);
    color: var(--color-accent-sub);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    font-weight: 700;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    /* Bolder */
    color: var(--color-text);
}

/* About Section */
.about {
    background: #fff;
}

.about-content {
    border: none;
    padding: 50px;
    background: var(--color-bg);
    /* Slight contrast from white section */
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.section-image {
    margin-top: -20px;
    /* keep slight shift if original had it, or 0. Resetting to likely intended state */
    border-radius: 4px;
    max-width: 100%;
}



.about-text .lead {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--color-accent);
    /* Blue highlight */
    margin-top: -10px;
    /* Pull text header up slightly */
}

.about-text p {
    color: var(--color-text);
    margin-bottom: 20px;
}

.tour-text {
    margin-bottom: 30px;
    /* Increased spacing for dramatic flow */
    line-height: 2.0;
    /* More breathing room */
}

.tour-text.last-msg {
    margin-bottom: 0;
    font-weight: 700;
    /* Emphasize the final statement */
}

/* Mobile Adjustments for About Text */
@media (max-width: 768px) {

    .about-text p:not(.lead),
    .about-text .tour-text {
        font-size: 0.82rem;
        /* Reduce font size to fit long lines on mobile before the manual break */
        letter-spacing: -0.01em;
        /* Slight tightening to ensure fit */
        margin-bottom: 25px;
        /* Adjust spacing between blocks slightly */
        line-height: 1.8;
    }
}

/* Innovation Section */
.innovation {
    background: var(--color-bg-dark);
}

.innovation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: #fff;
    border: none;
    padding: 40px;
    transition: 0.4s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    /* Thicker strip */
    height: 100%;
    background: var(--color-bg-dark);
    /* Default strip */
    transition: 0.4s;
}

.feature-card:hover::before {
    background: var(--color-accent);
}

.feature-card.active::before {
    background: var(--color-accent-sub);
}

.feature-num {
    font-family: var(--font-mono);
    font-size: 3.5rem;
    color: rgba(0, 68, 204, 0.05);
    /* Faint blue */
    font-weight: 700;
    margin-bottom: -15px;
    line-height: 1;
}

.feature-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-new {
    font-size: 0.7rem;
    background: var(--color-accent-sub);
    color: #fff;
    padding: 4px 8px;
    border-radius: 50px;
    font-weight: bold;
}

.live-badge {
    font-size: 0.7rem;
    background: #E62117;
    /* YouTube Red */
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(230, 33, 23, 0.3);
}

.live-badge i {
    font-size: 0.5rem;
    animation: live-blink 1.5s ease-in-out infinite;
}

@keyframes live-blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.2;
    }

    100% {
        opacity: 1;
    }
}

.feature-desc {
    font-size: 1rem;
    color: var(--color-text-muted);
}

/* Priority Card with Background */
.feature-card.has-bg-image {
    background-size: cover;
    background-position: center;
    position: relative;
    /* Ensure stacking context */
    overflow: hidden;
    border: none;
    /* Remove default border if any */
}

.feature-card.has-bg-image .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Dark Overlay for readability */
    z-index: 1;
    transition: 0.4s;
}

.feature-card.has-bg-image:hover .card-overlay {
    background: rgba(0, 0, 0, 0.4);
    /* Lighten overlay on hover */
}

.feature-content-wrapper {
    position: relative;
    z-index: 2;
    /* Bring content above overlay */
}

.feature-card.has-bg-image .feature-num {
    color: rgba(255, 255, 255, 0.2);
    /* White transparent number */
}

.feature-card.has-bg-image .feature-title,
.feature-card.has-bg-image .feature-desc {
    color: #fff;
    /* White text */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Records Section */
.records {
    background: #fff;
    position: relative;
    overflow: hidden;
    min-height: 800px;
    /* Restore visible height */
    border-bottom: 20px solid #fff;
    /* White boundary */
    border-top: 20px solid #fff;
}

/* Subtle decorative background shape */
.records::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 68, 204, 0.03) 0%, transparent 70%);
    z-index: 0;
}


.records-wrapper {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.record-card.special-10 {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 60px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 68, 204, 0.1);
    /* Blue glow shadow */
}

.record-badge {
    background: var(--color-accent);
    color: #fff;
    display: inline-block;
    padding: 6px 20px;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 25px;
    border-radius: 50px;
    letter-spacing: 0.1em;
}

.record-score {
    font-size: 7rem;
    font-family: var(--font-mono);
    font-weight: 700;
    line-height: 1;
    color: var(--color-text);
    margin-bottom: 15px;
}

.record-score .unit {
    font-size: 1.5rem;
    color: var(--color-text-muted);
}

.record-player {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--color-accent);
}

.record-meta {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 20px;
}

.score-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px 0;
    border-bottom: 1px solid var(--color-bg-dark);
}

.score-val {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-accent-sub);
    /* Orange numbers */
}

/* Mobile Adjustments for Records Text */
@media (max-width: 768px) {
    .ranking-content p {
        font-size: 0.85rem !important;
        line-height: 1.8 !important;
        letter-spacing: -0.02em;
        margin-bottom: 25px !important;
    }
}

/* Archives Section */
.archives {
    background-color: #1a1a1a;
    /* Dark Gray Background for Gaps */
    position: relative;
    overflow: hidden;
    /* Ensure content stays on top of dark bg */
}

/* History Grid Background */
.history-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    /* 20px Grid Gap */
    padding: 20px;
    /* Padding around grid to show gaps at edges */
    z-index: 0;
}

.history-bg-grid img {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: cover;
    filter: brightness(0.55);
    /* ~45% Dark Overlay */
    display: block;
    border-radius: 4px;
    /* Slight rounding for panel look */
}

/* Update Archives Text Color for Dark Background */
.archives .section-subtitle {
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.archives .section-title {
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.archives .container {
    position: relative;
    z-index: 1;
}


.archives-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    /* Increased Spacing */
    width: 100%;
    padding: 40px 0;
    /* Vertical Padding */
}

.archive-item {
    width: 100%;
    max-width: 380px;
    /* Compact Card Width */
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid transparent;
    padding: 20px 30px;
    /* Slightly reduced padding */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: 0.3s;
}

.archive-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
    border-color: var(--color-accent);
}

.archive-item.special-link {
    background: #fff;
    border-left: 5px solid var(--color-accent);
    max-width: 380px;
    width: 100%;
}

.archive-year {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    /* Blue Icons */
}

.archive-season {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--color-text);
    flex: 1;
    margin-left: 20px;
}

.archive-link {
    color: var(--color-accent-sub);
    font-weight: 700;
    font-size: 0.9rem;
}


/* Classes Section - New Card Grid */
.classes {
    background: #fff;
}

.classes-list-visual {
    /* Previously flex, now we want a full width grid */
    display: block;
    width: 100%;
}

.class-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    width: 100%;
}

.class-card {
    background: #fff;
    border: 1px solid var(--color-bg-dark);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.class-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.class-card-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    border-bottom: 3px solid var(--color-accent);
}

.class-card[data-type="c1"] .class-card-image-container {
    border-bottom-color: #000;
}

.class-card[data-type="c5"] .class-card-image-container {
    border-bottom-color: var(--color-accent-sub);
}

.class-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.class-card:hover .class-card-image {
    transform: scale(1.1);
}

.class-header {
    background: #fff;
    /* Changed from dark to white for cleaner look under image */
    padding: 20px 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Softer divider */
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* Specific header colors for variety */
.class-card[data-type="c1"] .class-header {
    border-bottom-color: #000;
    background: #f0f0f0;
}

.class-card[data-type="c2"] .class-header {
    border-bottom-color: var(--color-accent);
}

.class-card[data-type="c3"] .class-header {
    border-bottom-color: var(--color-accent);
}

.class-card[data-type="c5"] .class-header {
    border-bottom-color: var(--color-accent-sub);
}

/* Orange */

.class-code {
    font-family: var(--font-head);
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    color: var(--color-text);
}

.class-name-jp {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text-muted);
}

.class-body {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.class-definition {
    border-bottom: 1px solid var(--color-bg-dark);
    padding-bottom: 15px;
}

.def-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 5px;
    display: block;
}

.def-text {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-accent);
}

.class-desc {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.7;
}

.class-target-box {
    margin-top: auto;
    /* Push to bottom */
    background: var(--color-bg);
    padding: 15px;
    border-left: 4px solid var(--color-accent-sub);
    font-size: 0.9rem;
}

.target-label {
    font-weight: 800;
    color: var(--color-accent-sub);
    display: block;
    margin-bottom: 3px;
    font-family: var(--font-head);
    text-transform: uppercase;
}


/* Sponsors */
.priority-badge-container {
    text-align: center;
    margin-bottom: 40px;
}

/* .priority-badge style moved/removed */

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    text-align: center;
}

.sponsor-logo {
    padding: 30px;
    background: #fff;
    color: var(--color-text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
}

.sponsor-logo:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: var(--color-accent);
}

/* Footer */
.footer {
    padding: 80px 0;
    background: #111;
    /* Keep dark for anchor */
    color: #fff;
    text-align: center;
}

.footer-logo {
    font-weight: 900;
    margin-bottom: 20px;
    font-size: 2rem;
}

.copyright {
    color: #666;
    font-size: 0.8rem;
}

/* Floating Entry Button - Light Mode */
.floating-entry-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--color-accent-sub);
    /* Orange for visibility */
    color: #fff;
    padding: 15px 35px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-family: var(--font-head);
    box-shadow: 0 10px 25px rgba(255, 102, 0, 0.4);
    z-index: 1000;
    transition: 0.3s;
    animation: float 3s ease-in-out infinite;
}

.floating-entry-btn:hover {
    transform: translateY(-5px);
    background: #FF8533;
    box-shadow: 0 15px 35px rgba(255, 102, 0, 0.5);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        padding: 10px 5%;
        flex-direction: column;
        height: auto;
        gap: 10px;
    }

    .logo {
        margin-bottom: 0px;
    }

    .nav {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* Hide scrollbar for a cleaner look but keep scrollability */
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav ul {
        gap: 15px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 4px;
    }

    .nav a {
        font-size: 0.75rem;
        white-space: nowrap;
        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.15);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        padding: 6px 14px;
        border-radius: 20px;
        color: var(--color-text);
    }

    .hero-main-title {
        font-size: 15vw;
        /* Adjusted for mobile */
        -webkit-text-stroke: 1.5px var(--color-accent);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-tech-specs {
        display: none;
        /* Hide on small screens */
    }

    .records-wrapper {
        grid-template-columns: 1fr;
    }

    .hero-ui-score {
        display: none;
    }

    .floating-entry-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    .archives-list {
        grid-template-columns: 1fr;
    }
}

/* Update Hero Title Spacing for multi-line */
.hero-title {
    font-size: 7vw;
    /* Slightly smaller to fit "Spring Campaign" */
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--color-text);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 13vw;
    }
}

/* Tour Ranking Preview Section */
.ranking-preview {
    background: #1a1a1a;
    color: #fff;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.ranking-preview::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 68, 204, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

/* Force Single Line Title */
.nowrap-title {
    white-space: nowrap;
    /* Responsive sizing to ensure it fits */
    font-size: clamp(1.5rem, 4vw, 2.5rem) !important;
}

/* Text Highlights - White Bold with Shadow */
.text-highlight-white {
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    /* Stronger shadow for floating effect */
}

.text-bold-white {
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.ranking-preview-inner {
    display: flex;
    align-items: center;
    gap: 60px;
}

.ranking-content {
    flex: 1;
}

.ranking-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.ranking-btn {
    display: inline-block;
    background: var(--color-accent);
    color: #fff;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-family: var(--font-head);
    letter-spacing: 0.05em;
    box-shadow: 0 10px 20px rgba(0, 68, 204, 0.4);
}

.ranking-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 68, 204, 0.6);
    background: #003db3;
}

/* Mock UI Card */
.mock-ranking-card {
    background: #fff;
    width: 320px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 8px solid #333;
    position: relative;
    z-index: 2;
    transform: rotate(-3deg);
    transition: 0.5s;
}

.mock-ranking-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.mock-header {
    background: #000;
    color: #fff;
    padding: 20px;
    text-align: center;
}

.mock-title {
    display: block;
    font-family: var(--font-head);
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.mock-cat {
    display: block;
    font-family: var(--font-head);
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 0.05em;
}

.mock-list {
    background: #f5f5f5;
    padding: 10px;
}

.mock-row {
    background: #fff;
    margin-bottom: 8px;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.mock-row.top {
    border-left: 4px solid var(--color-accent-sub);
}

.mock-row .rank {
    font-family: var(--font-mono);
    font-weight: 700;
    color: #999;
    width: 20px;
}

.mock-row.top .rank {
    color: var(--color-accent-sub);
    font-size: 1.2rem;
}

.mock-row .name {
    flex: 1;
    font-weight: 700;
    font-size: 0.9rem;
    color: #333;
}

.mock-row .points {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 700;
}

@media (max-width: 768px) {
    .ranking-preview-inner {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .mock-ranking-card {
        transform: rotate(0);
    }
}

/* Impact Design Updates */
.hero-title.impact-text {
    font-size: 11vw;
    font-style: italic;
    text-transform: uppercase;
    line-height: 0.9;
    margin-bottom: 25px;
    text-shadow: 10px 10px 0px rgba(255, 255, 255, 0.1);
    transform: skew(-5deg);
}

.hero-title-jp {
    display: block;
    font-size: 0.4em;
    /* Relative to the huge 11vw */
    margin-top: 15px;
    font-style: normal;
    font-weight: 700;
    transform: skew(5deg);
    /* Counter-skew */
    color: var(--color-text);
    text-shadow: none;
}

.hero-sub.tour-text {
    color: var(--color-accent-sub);
    font-size: 1.5rem;
    /* Larger */
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: 0.2em;
    font-family: var(--font-head);
}

@media (max-width: 768px) {
    .hero-title.impact-text {
        font-size: 18vw;
    }

    .hero-sub.tour-text {
        font-size: 1.2rem;
    }
}

/* =========================================
   Ranking Year Navigation
   =========================================*/
/* Ranking Navigation */
.ranking-nav {
    position: sticky;
    /* Standard property first */
    position: -webkit-sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
    width: 100%;
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

.nav-label {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #475569;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 4px;
    flex-shrink: 0;
}

.ranking-nav-list {
    display: flex;
    gap: 0.8rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-year-btn {
    background: none;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.nav-year-btn:hover {
    background: rgba(249, 115, 22, 0.1);
    /* transparent orange */
    transform: translateY(-1px);
}

.nav-year-btn.active {
    background: var(--color-accent-sub);
    color: white;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* =========================================
   Back to Top Button
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-text);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 900;
    /* Below sticky nav if needed, but high enough to float */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Adjust for mobile to avoid covering content/other buttons */
@media (max-width: 640px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .ranking-nav {
        padding: 0.75rem 0;
        margin-left: -1rem;
        margin-right: -1rem;
    }

    .ranking-nav-list {
        justify-content: flex-start;
        /* Left align for scrolling */
        padding: 0 1rem;
    }

    .nav-year-btn {
        padding: 0.4rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* Update for Linked Feature Card */
a.feature-card {
    text-decoration: none;
    color: inherit;
    display: block;
    /* Ensure it behaves like a block */
    cursor: pointer;
}

a.feature-card .feature-title,
a.feature-card .feature-desc {
    color: inherit;
    /* Inherit from parent or specify if needed */
}

a.feature-card:hover .feature-title {
    color: var(--color-accent);
    /* Optional: Hover effect for title */
}

/* Partner Recruitment Button */
.partner-recruitment {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 60px;
}

.partner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 18px 40px;
    border-radius: 50px;
    font-family: var(--font-head);
    letter-spacing: 0.05em;
    color: #fff;
    transition: 0.3s;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background: #06C755;
    /* LINE Green */
    box-shadow: 0 10px 25px rgba(6, 199, 85, 0.3);
}

.partner-btn:hover {
    transform: translateY(-5px);
    background: #05b34c;
    box-shadow: 0 15px 35px rgba(6, 199, 85, 0.5);
    color: #fff;
}

.partner-note {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

@media (max-width: 768px) {
    .partner-btn {
        width: 100%;
        padding: 15px;
        font-size: 1rem;
    }
}

/* Footer Links */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #999;
    font-size: 0.9rem;
    transition: 0.3s;
}

.footer-link-item i {
    font-size: 1.5rem;
    color: #fff;
    transition: 0.3s;
}

.footer-link-item:hover {
    color: #fff;
    transform: translateY(-5px);
}

.footer-link-item:hover i {
    color: var(--color-accent);
}

/* Section Images */
.section-image {
    width: 100%;
    max-width: 800px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 40px auto;
    display: block;
    object-fit: cover;
}

/* Background Image Sections (Overlay & Text Shadow) */
.has-bg {
    position: relative;
    background-size: cover;
    background-position: top center;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

.has-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    /* Dark Overlay 70% */
    z-index: 1;
}

.has-bg .container {
    position: relative;
    z-index: 2;
}

/* Specific Background Images */
/* #innovation bg is handled by .bg-slider in HTML */

#records {
    background-image: url('../images/img_ranking.jpg');
    position: relative;
    z-index: 2;
}

/* Background Grid Styles Removed */

/* Back to Top Section Buttons */
.back-to-top-wrapper {
    display: flex;
    justify-content: flex-end;
    padding: 20px 5% 0;
    width: 100%;
}

.back-to-top {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-decoration: none;
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.03);
    transition: 0.3s;
}

.back-to-top:hover {
    color: var(--color-accent);
    background: rgba(0, 68, 204, 0.05);
}

/* Dark section adjustments for Back to Top */
.innovation .back-to-top,
.archives .back-to-top,
.section[style*="#1a1a1a"] .back-to-top {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
}

.innovation .back-to-top:hover,
.archives .back-to-top:hover,
.section[style*="#1a1a1a"] .back-to-top:hover {
    color: var(--color-accent-sub);
    background: rgba(255, 102, 0, 0.1);
}

@media (max-width: 768px) {
    .back-to-top-wrapper {
        padding: 15px 5% 0;
    }

    /* Make background images fit within screen on mobile without cropping */
    #records {
        background-size: contain;
        background-position: top center;
        background-repeat: no-repeat;
        background-color: #1a1a1a;
        /* Fill the empty space below the image */
    }

    .history-bg-grid {
        grid-template-rows: repeat(2, minmax(150px, 25vh));
        /* Compact the rows to the top */
        align-content: start;
        /* Align the grid to the top of the section */
        gap: 10px;
        padding: 10px;
    }

    .history-bg-grid img {
        object-fit: contain;
        object-position: top center;
        background-color: transparent;
        /* Remove letterboxing fill, let them float naturally */
    }
}