:root {
    --soccer-green: #27ae60;
    --soccer-dark-green: #1e8449;
    --soccer-white: #ffffff;
    --soccer-yellow: #f1c40f;
    --soccer-black: #1a1a1a;
    --accent-red: #e74c3c;
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--soccer-black);
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Hero Section: Stadium --- */
.soccer-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    background: url('img/bg_pc.png') no-repeat center center;
    background-size: cover;
    position: relative;
    padding: 20px 20px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .soccer-hero {
        background-image: url('img/bg_sp.png');
    }
}

.soccer-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 0;
}

.players-on-pitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.player {
    position: absolute;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.5));
}

.player img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
}

@keyframes playerRunA { 0% { transform: translate(0, 0) rotate(5deg); } 100% { transform: translate(30px, -20px) rotate(-5deg); } }
@keyframes playerRunB { 0% { transform: translate(0, 0); } 100% { transform: translate(-40px, -30px); } }
@keyframes playerRunC { 0% { transform: translate(0, 0); } 50% { transform: translate(20px, -15px); } 100% { transform: translate(40px, 0); } }
@keyframes playerRunD { 0% { transform: translateY(0); } 100% { transform: translateY(-20px); } }
@keyframes playerRunE { 0% { transform: translate(0,0); } 100% { transform: translate(50px, -30px); } }

.player-a { bottom: 30%; left: 8%; animation: playerRunA 8s infinite alternate ease-in-out; }
.player-b { bottom: 22%; right: 5%; animation: playerRunB 10s infinite alternate ease-in-out; }
.player-c { bottom: 12%; left: 25%; animation: playerRunC 7s infinite alternate ease-in-out; }
.player-d { bottom: 10%; right: 28%; animation: playerRunD 9s infinite alternate ease-in-out; }
.player-e { bottom: 38%; right: 18%; animation: playerRunE 12s infinite alternate ease-in-out; }

.soccer-hero .container {
    position: relative;
    z-index: 10;
}

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

.stadium-lights::before, .stadium-lights::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0;
    box-shadow: 0 0 20px 10px #fff;
}

.stadium-lights::before { top: 20%; left: 30%; animation: cameraFlash 3s infinite 0.5s; }
.stadium-lights::after { top: 15%; right: 25%; animation: cameraFlash 4s infinite 1.2s; }

@keyframes cameraFlash {
    0%, 90%, 100% { opacity: 0; transform: scale(0); }
    91% { opacity: 1; transform: scale(1.5); }
    93% { opacity: 0; transform: scale(0.5); }
}

.stadium-flashes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 6;
}

.stadium-flashes::before, .stadium-flashes::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 15px 5px #fff;
}

.stadium-flashes::before { top: 40%; right: 10%; animation: cameraFlash 2.5s infinite 0.8s; }
.stadium-flashes::after { bottom: 30%; left: 15%; animation: cameraFlash 5s infinite 2s; }

.ball-flying {
    position: absolute;
    font-size: 3rem;
    z-index: 15;
    pointer-events: none;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
    animation: ballPassing 10s infinite linear;
}

@keyframes ballPassing {
    0%   { bottom: 30%; left: 8%;  transform: rotate(0deg) scale(0.8); }
    20%  { bottom: 18%; left: 45%; transform: rotate(720deg) scale(1.2); }
    40%  { bottom: 25%; right: 8%; transform: rotate(1440deg) scale(0.8); }
    60%  { bottom: 10%; right: 28%; transform: rotate(2160deg) scale(0.8); }
    80%  { bottom: 12%; left: 25%; transform: rotate(2880deg) scale(1.1); }
    100% { bottom: 30%; left: 8%;  transform: rotate(3600deg) scale(0.8); }
}

.soccer-ball-icon { display: none; }

.soccer-title {
    margin-bottom: 5px;
    margin-top: -30px;
}

.title-img {
    width: 600px;
    max-width: 90%;
    height: auto;
}

.soccer-subtitle {
    font-size: 1.8rem;
    font-weight: 900;
    margin-top: -30px;
    margin-bottom: 40px;
    text-shadow: 0 0 15px rgba(0,0,0,0.8);
    color: #fff;
}

/* --- Bracket Navigation --- */
.index-nav {
    position: sticky;
    top: 0;
    background: #111;
    z-index: 100;
    padding: 30px 0;
    border-bottom: 5px solid var(--soccer-yellow);
    transition: transform 0.3s ease-in-out;
}

/* 當頁面下捲時隱藏 */
.index-nav.nav-hidden {
    transform: translateY(-100%);
}

.bracket-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.bracket-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bracket-match {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
}

.bracket-column:last-child .bracket-match::after {
    left: -25px;
    right: auto;
    border-left: 2px solid #555;
    border-right: none;
}

.bracket-center { text-align: center; z-index: 10; }
.cup-icon img {
    width: 77px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(241,196,15,0.6));
    animation: cupGlow 2s infinite alternate;
}

@keyframes cupGlow {
    from { transform: scale(1); filter: drop-shadow(0 0 10px rgba(241,196,15,0.4)); }
    to { transform: scale(1.05); filter: drop-shadow(0 0 30px rgba(241,196,15,0.8)); }
}

.team a {
    display: flex;
    align-items: center;
    background: #222;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    border: 1px solid #444;
    transition: all 0.3s;
    width: 180px;
}

.team a img { width: 40px; height: 40px; object-fit: contain; margin-right: 12px; }
.team a span { font-size: 0.85rem; font-weight: bold; }
.team a:hover { background: var(--soccer-yellow); color: #000; border-color: #fff; }

.bracket-footer { display: flex; flex-direction: column; gap: 15px; }

/* 手機版適配：計分板樣式 */
@media (max-width: 768px) {
    .soccer-hero { padding: 15px 15px 60px; justify-content: flex-start; }
    .soccer-title { margin-top: 0; }
    .soccer-subtitle { font-size: 1.2rem; margin-top: -10px; margin-bottom: 50px; }
    
    .index-nav { padding: 10px 0; }
    .bracket-wrapper { flex-direction: column; gap: 8px; }
    .bracket-column { width: 100%; }
    .bracket-match { flex-direction: row; justify-content: center; gap: 5px; align-items: center; }
    .bracket-match::after { display: none; }
    .bracket-match::before { content: "VS"; font-family: 'Anton', sans-serif; font-size: 0.8rem; color: var(--soccer-yellow); order: 2; margin: 0 5px; }
    .bracket-match .team:first-child { order: 1; }
    .bracket-match .team:last-child { order: 3; }
    .team a { width: 130px; padding: 5px 10px; font-size: 0.7rem; justify-content: center; }
    .team a img { width: 20px; height: 20px; margin-right: 5px; }
    .bracket-center { display: none; }
    .bracket-footer { flex-direction: row; justify-content: center; gap: 5px; width: 100%; margin-top: 5px; }
    
    .section-title { font-size: 2.5rem; }
    .card-grid { grid-template-columns: 1fr; }
    .marquee-item { flex: 0 0 80px; }
    .marquee-item img { width: 60px; height: 60px; object-fit: contain; }
    
    .player { width: 85px; height: 85px; }
    .player-a { bottom: 20%; left: 5%; }
    .player-b { bottom: 15%; right: 5%; }
    .player-c { bottom: 25%; left: 15%; }
    .player-d { bottom: 10%; right: 30%; }
    .player-e { bottom: 35%; right: 5%; }
    
    .soccer-section, .brand-section { padding: 60px 0; }
}

/* --- Sections --- */
.soccer-section { padding: 100px 0; background: var(--soccer-green); }
.section-title {
    font-family: 'Anton', sans-serif;
    font-size: 3.5rem;
    text-align: left;
    margin-bottom: 60px;
    font-style: italic;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 30px;
}
.section-logo { width: 120px; height: 120px; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3)); }
.section-title span { display: block; font-size: 1.2rem; color: var(--soccer-yellow); letter-spacing: 0.2em; margin-bottom: 5px; text-align: left; }

.section-starting-xi .section-title { flex-direction: column; text-align: center; }
.section-starting-xi .section-title span { text-align: center; margin-bottom: 10px; }

.section-intro-gif { text-align: center; margin-bottom: 20px; width: 100%; display: flex; justify-content: center; }
.section-intro-gif img { width: 250px; max-width: 80%; height: auto; }

.pitch-visual { width: 100%; overflow: hidden; position: relative; padding: 20px 0; }
.marquee-track { display: flex; width: fit-content; animation: marqueeScroll 10s linear infinite; }
.marquee-item { flex: 0 0 100px; padding: 0 5px; }
.marquee-item img { width: 100px; height: 100px; object-fit: contain; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3)); }

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

/* --- Brand Sections --- */
.brand-section { padding: 80px 0; border-top: 1px solid rgba(255,255,255,0.2); }
.section-smbc { background: #1e8449; }
.section-jcb { background: #1a5276; }
.section-jal { background: #922b21; }
.section-dcard { background: #a04000; }
.section-saison { background: #1b2631; }
.section-others { background: #333; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 25px; padding-bottom: 20px;}
.card-item { background: #fff; color: #333; border-radius: 15px; padding: 25px; display: flex; flex-direction: column; position: relative; overflow: hidden; box-shadow: 0 15px 40px rgba(0,0,0,0.1); transition: transform 0.3s; }
.card-item:hover { transform: translateY(-5px); }
.card-item::before { content: "STAR PLAYER"; position: absolute; top: 15px; right: -35px; background: var(--soccer-yellow); color: #000; font-size: 0.65rem; font-weight: 900; padding: 5px 40px; transform: rotate(45deg); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.card-main-content { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 20px; }
.card-img-thumb { flex: 0 0 90px; width: 90px; height: 90px; border: 1px solid #eee; border-radius: 12px; padding: 5px; background: #f9f9f9; }
.card-img-thumb img { width: 100%; height: 100%; object-fit: contain; }
.card-info { flex: 1; }
.card-name { font-size: 1.15rem; font-weight: 900; margin-bottom: 8px; line-height: 1.3; }
.card-reward { font-size: 1.8rem; font-weight: 900; color: #ff3333; margin-bottom: 5px; }
.reward-point { font-size: 1.6rem; color: #ff3333; }
.card-condition { font-size: 0.85rem; color: #666; font-weight: bold; }
.btn-apply { display: block; background: var(--soccer-green); color: #fff; text-align: center; text-decoration: none; padding: 14px; border-radius: 10px; font-weight: 900; font-size: 1rem; transition: all 0.3s; margin-top: auto; }
.btn-apply:hover { background: var(--soccer-dark-green); box-shadow: 0 5px 15px rgba(39,174,96,0.4); }

/* --- CTA Section --- */
.soccer-cta { padding: 120px 0; text-align: center; background: radial-gradient(circle at center, #2ecc71, #1a1a1a); }
.goal-scene img { width: 300px; max-width: 90%; margin-bottom: 30px; }
footer { padding: 40px 0; background: #000; text-align: center; font-size: 0.8rem; color: #777; border-top: 1px solid #222; }
