/* ============================================
   動漫學習頁面 - 現代動漫雜誌風格 (Modern Anime Aesthetic)
   ============================================ */

:root {
    --anime-card-bg: rgba(255, 255, 255, 0.8);
    --anime-accent: #4A6985;
    --anime-accent-light: rgba(74, 105, 133, 0.1);
    --glass-border: rgba(255, 255, 255, 0.3);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

[data-theme="dark"] {
    --anime-card-bg: rgba(30, 30, 40, 0.8);
    --anime-accent: #F59E0B;
    --anime-accent-light: rgba(245, 158, 11, 0.1);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* 背景裝飾字體 */
.bg-decoration {
    position: fixed;
    font-size: 20vw;
    font-weight: 900;
    color: var(--anime-accent-light);
    z-index: -1;
    user-select: none;
    pointer-events: none;
    line-height: 1;
    opacity: 0.5;
}

.bg-deco-left { top: 10%; left: -5%; writing-mode: vertical-rl; }
.bg-deco-right { bottom: 5%; right: -5%; }

/* 主容器 */
.anime-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 0;
    position: relative;
}

/* 標題設計 */
.hero-section {
    text-align: center;
    margin-bottom: 5rem;
    animation: fadeInDown 0.8s ease-out;
}

.hero-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--anime-accent);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* 功能導航卡片 */
.anime-nav-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 100%;
}

.anime-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    perspective: 1000px;
}

.anime-nav-card {
    background: var(--anime-card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 2rem 1.5rem;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.anime-nav-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0; width: 100px; height: 100px;
    background: radial-gradient(circle at top right, var(--anime-accent-light), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.anime-card-link:hover .anime-nav-card {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: var(--anime-accent);
}

.anime-card-link:hover .anime-nav-card::after {
    opacity: 1;
}

.card-icon-wrapper {
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.anime-nav-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.anime-nav-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 1.2rem;
}

.card-btn {
    padding: 0.5rem 1rem;
    background: var(--text-primary);
    color: var(--bg-secondary);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.anime-card-link:hover .card-btn {
    background: var(--anime-accent);
    transform: scale(1.05);
}

/* MyGO 系列頁面特定樣式 */
.mygo-theme {
    --anime-accent: #4ade80; /* MyGO 特色綠色/藍色調 */
}

/* 列表樣式優化 */
.anime-series-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 100%;
    padding: 0 1.5rem;
}

.anime-series-card {
    background: var(--anime-card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none;
    color: inherit;
}

.anime-series-card.coming-soon {
    opacity: 0.5;
}

.anime-series-card .hero-tag {
    padding: 0.2rem 0.6rem;
    font-size: 0.6rem;
    margin-bottom: 0.3rem;
    background: #4A6985;
}

.anime-series-card:hover {
    transform: scale(1.01);
    background: var(--bg-secondary);
    border-color: var(--anime-accent);
    box-shadow: var(--card-shadow);
}

.series-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.anime-series-card h3 {
    font-size: 1.3rem;
    margin: 0.3rem 0;
    font-weight: 600;
}

.anime-series-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* 動畫 */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 麵包屑 */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--accent-primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 返回按鈕 */
.btn-back {
    display: block;
    width: fit-content;
    margin: 0 auto 1.5rem auto;
    padding: 0.5rem 1.5rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.btn-back:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* 單字卡片樣式 */
.vocab-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 100%;
    padding: 0 1.5rem;
}

.vocab-card {
    background: var(--anime-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 1.2rem 1.5rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vocab-card:hover {
    background: var(--bg-secondary);
    border-color: var(--anime-accent);
    transform: translateX(4px);
}

.vocab-card-content {
    flex: 1;
}

.vocab-word {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.vocab-romaji {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
}

.vocab-meaning {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

.vocab-tags {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.vocab-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}

.card-arrow {
    font-size: 1.5rem;
    color: var(--text-light);
    transition: all 0.2s;
}

.vocab-card:hover .card-arrow {
    color: var(--anime-accent);
    transform: translateX(3px);
}

.coming-soon-badge {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* 日文小標點符號樣式 */
.jp-punct {
    vertical-align: sub;
    line-height: 0;
}

.mygo-zh {
    display: inline-block;
    font-size: 0.9em;
    opacity: 0.8;
}

/* ============================================
   標籤顏色系統
   ============================================ */

/* 標籤通用樣式 (微調字體與圓角) */
.vocab-tag {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 🟢 N5: 入門 (輕鬆綠) */
.tag-n5 {
    background-color: #E6F4EA;
    color: #1E8E3E;
}

/* 🔵 N4: 初級 (穩重藍) */
.tag-n4 {
    background-color: #E8F0FE;
    color: #1967D2;
}

/* 🟠 N3: 中級 (活力橘) */
.tag-n3 {
    background-color: #FEF7E0;
    color: #F9AB00;
}

/* 🟣 特殊: 名台詞/梗 (神秘紫 - MyGO 風格) */
.tag-special {
    background-color: #F3E5F5;
    color: #9C27B0;
}

/* 🔤 文法/詞性標籤 (中性灰) */
.tag-grammar {
    background-color: #F5F5F5;
    color: #5F6368;
}

/* 響應式 */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .anime-nav-cards { grid-template-columns: 1fr; gap: 1rem; }
    .anime-nav-card { padding: 1.5rem 1.2rem; }
    .anime-nav-card h2 { font-size: 1.2rem; }
    .anime-nav-card p { font-size: 0.85rem; }
    .anime-series-card { flex-direction: column; text-align: center; }
    .series-image { width: 100%; height: 120px; }
    .vocab-word { font-size: 1.3rem; }
}
