/* ==========================================
   全域變數與重設樣式 (Reset & Variables)
   ========================================== */
:root {
    /* 英雄聯盟海克斯科技風格配色 */
    --color-bg-darkest: #010a13;   /* 最深黑色背景 */
    --color-bg-dark: #091428;      /* 深海藍色區塊背景 */
    --color-bg-medium: #0a1428;    /* 卡片背景 */
    --color-gold: #c89b3c;         /* 經典海克斯黃金 */
    --color-gold-light: #f0e6d2;   /* 亮金色 */
    --color-gold-dark: #785a28;    /* 暗金色 */
    --color-blue-hextech: #00c8c5; /* 海克斯科技藍/青綠 */
    --color-blue-dark: #005a82;    /* 暗海克斯藍 */
    --color-text-light: #f0e6d2;   /* 淺色文字（偏米白） */
    --color-text-muted: #a0aab5;   /* 灰藍色輔助文字 */
    
    /* 冰雪大亂鬥專屬冰藍色系 */
    --color-ice-blue: #a3c7fc;     /* 寒冰藍 */
    --color-ice-glow: rgba(163, 199, 252, 0.4);
    
    /* 字型與過渡效果設定 */
    --font-primary: 'Noto Sans TC', 'Montserrat', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth; /* 平滑滾動 */
}

body {
    background-color: var(--color-bg-darkest);
    color: var(--color-text-light);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================
   客製化捲軸樣式 (Scrollbar)
   ========================================== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-darkest);
}
::-webkit-scrollbar-thumb {
    background: var(--color-gold-dark);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold);
}

/* ==========================================
   頂部導覽列 (Navbar)
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background: rgba(1, 10, 19, 0.85); /* 半透明背景 */
    backdrop-filter: blur(10px);        /* 毛玻璃模糊特效 */
    border-bottom: 2px solid var(--color-gold-dark);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.logo {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 2px;
}

.gold-text {
    color: var(--color-gold);
    text-shadow: 0 0 10px rgba(200, 155, 60, 0.3);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 1px;
    transition: var(--transition-smooth);
    position: relative;
    padding: 5px 0;
}

/* 導覽列連結懸停底線效果 */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--color-gold);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: var(--color-gold-light);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ==========================================
   首頁主視覺區塊 (Hero Section)
   ========================================== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    background: radial-gradient(circle at center, #092042 0%, #010a13 80%);
    overflow: hidden;
}

/* 金色霓虹發光字體 */
.gold-text-glow {
    color: var(--color-gold-light);
    text-shadow: 0 0 10px rgba(200, 155, 60, 0.8),
                 0 0 20px rgba(200, 155, 60, 0.5),
                 0 0 30px rgba(200, 155, 60, 0.3);
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 10px;
    color: var(--color-text-light);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--color-gold);
    letter-spacing: 3px;
    margin-bottom: 30px;
    font-weight: 700;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

/* 藍色氛圍光暈背景裝飾 */
.hero-glow-effect {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 200, 197, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
    animation: glowPulse 8s infinite alternate ease-in-out;
}

@keyframes glowPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* ==========================================
   通用按鈕樣式 (Buttons)
   ========================================== */
.btn {
    display: inline-block;
    padding: 12px 35px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--color-gold);
    color: var(--color-bg-darkest);
    border: 2px solid var(--color-gold);
    box-shadow: 0 0 15px rgba(200, 155, 60, 0.4);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--color-gold-light);
    box-shadow: 0 0 25px rgba(200, 155, 60, 0.7);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--color-gold);
    border: 2px solid var(--color-gold-dark);
    padding: 8px 20px;
    font-size: 0.85rem;
    margin-top: 15px;
}

.btn-secondary:hover {
    background: var(--color-gold);
    color: var(--color-bg-darkest);
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(200, 155, 60, 0.5);
}

/* ==========================================
   區塊標題樣式 (Section Headers)
   ========================================== */
.section-title {
    font-size: 2.2rem;
    text-align: center;
    color: var(--color-text-light);
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 10px;
    position: relative;
}

/* 標題下方的裝飾金線 */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-gold);
    margin: 15px auto 0 auto;
    box-shadow: 0 0 8px rgba(200, 155, 60, 0.8);
}

.section-subtitle {
    font-size: 1rem;
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 60px;
}

/* ==========================================
   遊戲概述與大亂鬥區塊 (Overview Section)
   ========================================== */
.overview-section {
    padding: 100px 8%;
    background-color: var(--color-bg-dark);
    border-top: 1px solid var(--color-gold-dark);
    border-bottom: 1px solid var(--color-gold-dark);
}

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

/* 玩法卡片設計 */
.card {
    background-color: var(--color-bg-medium);
    border: 2px solid rgba(200, 155, 60, 0.15);
    border-radius: 6px;
    padding: 35px 25px;
    text-align: center;
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--color-gold);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 
                0 0 15px rgba(200, 155, 60, 0.2);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(200, 155, 60, 0.4));
}

.card h3 {
    font-size: 1.25rem;
    color: var(--color-gold-light);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    text-align: justify;
}

/* 大亂鬥專屬卡片樣式 */
.card.aram-card {
    border-color: rgba(163, 199, 252, 0.2);
}

.card.aram-card:hover {
    border-color: var(--color-ice-blue);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 
                0 0 15px var(--color-ice-glow);
}

.card.aram-card .card-icon {
    filter: drop-shadow(0 0 10px rgba(163, 199, 252, 0.6));
}

.card.aram-card h3 {
    color: var(--color-ice-blue);
}

/* ==========================================
   五大分路定位區塊 (Positions Section)
   ========================================== */
.positions-section {
    padding: 100px 8%;
    background-color: var(--color-bg-darkest);
}

/* 頁籤選單外殼 */
.tabs-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

/* 頁籤按鈕樣式 */
.tab-btn {
    background: rgba(9, 20, 40, 0.6);
    border: 1px solid var(--color-gold-dark);
    color: var(--color-text-muted);
    padding: 12px 25px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--color-gold-light);
    border-color: var(--color-gold);
    background: rgba(200, 155, 60, 0.1);
}

.tab-btn.active {
    background-color: var(--color-gold);
    color: var(--color-bg-darkest);
    border-color: var(--color-gold);
    box-shadow: 0 0 15px rgba(200, 155, 60, 0.4);
}

/* 分路內容卡片 */
.position-display {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--color-bg-dark);
    border: 2px solid var(--color-gold-dark);
    border-radius: 6px;
    padding: 40px;
    min-height: 300px;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
}

/* 所有內容預設隱藏，只有 active 時顯示 */
.position-content {
    display: none;
    width: 100%;
    animation: fadeIn 0.5s ease-in-out forwards;
}

.position-content.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.position-info {
    width: 100%;
}

.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-blue-hextech);
    border: 1px solid var(--color-blue-hextech);
    padding: 4px 10px;
    border-radius: 3px;
    margin-bottom: 15px;
    background: rgba(0, 200, 197, 0.05);
}

.position-info h3 {
    font-size: 2rem;
    color: var(--color-gold-light);
    margin-bottom: 15px;
}

.pos-desc {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    margin-bottom: 25px;
    line-height: 1.8;
}

/* 分路標籤條 */
.pos-tags {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 15px;
}

.pos-tags li {
    background: rgba(0, 200, 197, 0.1);
    border: 1px solid rgba(0, 200, 197, 0.3);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-blue-hextech);
}

/* ==========================================
   熱門英雄展示區塊 (Champions Section)
   ========================================== */
.champions-section {
    padding: 100px 8%;
    background-color: var(--color-bg-dark);
    border-top: 1px solid var(--color-gold-dark);
}

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

/* 英雄卡片 */
.champ-card {
    background-color: var(--color-bg-medium);
    border: 1px solid var(--color-gold-dark);
    border-radius: 6px;
    overflow: hidden;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.champ-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-gold);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6), 
                0 0 15px rgba(200, 155, 60, 0.25);
}

/* 英雄卡片頂部 header（漸層或圖片背景通用樣式） */
.champ-header {
    padding: 25px 20px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--color-gold-dark);
    min-height: 120px;       /* 讓有圖片的卡片有足夠空間顯示 */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* 文字靠底部對齊 */
    align-items: center;
}

/* 有圖片的 header 需要更高的空間 */
.champ-header.has-image {
    min-height: 220px;         /* 圖片卡片加高，讓英雄圖能完整呈現 */
    background-size: cover;    /* 圖片填滿整個 header 區塊 */
    background-position: center top; /* 圖片頂部對齊，顯示臉部 */
    background-repeat: no-repeat;
}

/* 有圖片時加上半透明遮罩，讓文字在圖片上仍清晰可讀 */
.champ-header.has-image::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;               /* 下半部漸層遮罩 */
    background: linear-gradient(to top, rgba(1, 10, 19, 0.95) 0%, rgba(1, 10, 19, 0) 100%);
    pointer-events: none;
}

/* 讓有圖片時的文字顯示在遮罩上方 */
.champ-header.has-image .champ-title,
.champ-header.has-image h3 {
    position: relative;
    z-index: 1;
}

/* 每個英雄的專屬漸層背景（替代圖片，打造酷炫主視覺） */
.garen-bg {
    background: linear-gradient(135deg, #1f355a 0%, #101e35 100%);
}

/* 阿璃使用真實英雄圖片作為卡片背景 */
.ahri-bg {
    background-image: url('ahri.jpg');
    background-size: cover;
    background-position: center top;
}

.yasuo-bg {
    background: linear-gradient(135deg, #234d58 0%, #0e2227 100%);
}

.jinx-bg {
    background: linear-gradient(135deg, #6c1f54 0%, #152d42 100%);
}

.zed-bg {
    /* 劫：黑紅影流暗影配色 */
    background: linear-gradient(135deg, #370e17 0%, #150508 100%);
}

.thresh-bg {
    /* 瑟雷西：幽綠靈魂暗影配色 */
    background: linear-gradient(135deg, #0b3c31 0%, #041b16 100%);
}

.champ-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.champ-header h3 {
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: 800;
}

.champ-body {
    padding: 25px 20px;
    text-align: center;
}

.champ-role {
    font-weight: 700;
    color: var(--color-blue-hextech);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.champ-difficulty {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 15px;
}

.champ-desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    height: 80px; /* 固定高度保持卡片對齊 */
    overflow: hidden;
}

/* ==========================================
   技能詳細資訊彈窗 (Modal)
   ========================================== */
.modal {
    display: none; /* 預設隱藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 10, 19, 0.9); /* 暗透明背景 */
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--color-bg-dark);
    border: 2px solid var(--color-gold);
    width: 100%;
    max-width: 580px;
    border-radius: 6px;
    position: relative;
    animation: slideDown 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 
                0 0 30px rgba(0, 200, 197, 0.1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
    line-height: 1;
}

.close-btn:hover {
    color: var(--color-gold);
}

.modal-header {
    padding: 30px 30px 15px 30px;
    border-bottom: 1px solid rgba(200, 155, 60, 0.2);
}

#modal-champ-name {
    font-size: 1.6rem;
    color: var(--color-gold);
    margin-bottom: 15px;
    font-weight: 800;
}

/* Q W E R 技能切換頁籤 */
.skill-tabs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.skill-tab-btn {
    background: rgba(1, 10, 19, 0.6);
    border: 1px solid var(--color-gold-dark);
    color: var(--color-text-muted);
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.skill-tab-btn:hover {
    color: var(--color-gold-light);
    border-color: var(--color-gold);
}

.skill-tab-btn.active {
    background-color: var(--color-gold);
    color: var(--color-bg-darkest);
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(200, 155, 60, 0.3);
}

.modal-body {
    padding: 30px;
}

.skill-info-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.modal-skill-icon {
    font-size: 2.5rem;
    background: rgba(0, 200, 197, 0.1);
    border: 2px solid var(--color-blue-hextech);
    color: var(--color-blue-hextech);
    padding: 10px 20px;
    border-radius: 6px;
    text-shadow: 0 0 10px rgba(0, 200, 197, 0.5);
    min-width: 80px;
    text-align: center;
}

.skill-detail-text {
    flex: 1;
}

.skill-detail-text h4 {
    color: #ffffff;
    font-size: 1.15rem;
    margin-bottom: 10px;
    border-left: 3px solid var(--color-blue-hextech);
    padding-left: 10px;
}

.skill-detail-text p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    text-align: justify;
}

/* ==========================================
   頁尾樣式 (Footer)
   ========================================== */
.footer {
    background-color: var(--color-bg-darkest);
    border-top: 2px solid var(--color-gold-dark);
    padding: 50px 20px;
    text-align: center;
}

.footer-content {
    max-width: 850px;
    margin: 0 auto;
}

.footer p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--color-gold);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    margin: 0 10px;
}

.footer-links a:hover {
    color: var(--color-gold-light);
    text-shadow: 0 0 5px rgba(200, 155, 60, 0.3);
}

/* ==========================================
   響應式排版調整 (Responsive Design)
   ========================================== */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 4%;
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        gap: 15px;
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .positions-section, .overview-section, .champions-section {
        padding: 60px 5%;
    }

    .position-display {
        padding: 20px;
    }

    .skill-tabs {
        justify-content: center;
    }

    .skill-info-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
