@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

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

:root {
    --mario-sky: #5C94FC;
    --mario-sky-light: #87CEEB;
    --mario-red: #E52521;
    --mario-red-dark: #B01815;
    --mario-blue: #1B3FE0;
    --mario-yellow: #FBD000;
    --mario-yellow-dark: #B8860B;
    --mario-green: #43B047;
    --mario-green-dark: #2E7D32;
    --mario-brown: #5D3A1A;
    --mario-brown-light: #8B5A2B;
    --mario-white: #FFFFFF;
    --mario-cream: #FFF8DC;
    --mario-dark: #1a1a2e;
    --mario-gray: #666;
    --bg: #5C94FC;
    --bg-card: #FFF8DC;
    --bg-hover: #FFE4B5;
    --text: #1a1a2e;
    --text-muted: #5a5a7a;
    --accent: #E52521;
    --accent-hover: #FF4444;
    --border: #1a1a2e;
    --radius: 4px;
    --header-h: 64px;
    --block-shadow: 0 4px 0 #1a1a2e;
    --block-shadow-hover: 0 2px 0 #1a1a2e;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--mario-sky);
    background-image:
        radial-gradient(ellipse at 20% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
        linear-gradient(180deg, #5C94FC 0%, #87CEEB 50%, #B0E0E6 100%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background-image:
        radial-gradient(circle at 10% 40%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.9) 20px, transparent 21px),
        radial-gradient(circle at 10% 30%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.9) 15px, transparent 16px),
        radial-gradient(circle at 10% 50%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.9) 18px, transparent 19px),
        radial-gradient(circle at 85% 30%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.9) 25px, transparent 26px),
        radial-gradient(circle at 85% 20%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.9) 18px, transparent 19px),
        radial-gradient(circle at 85% 45%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.9) 20px, transparent 21px),
        radial-gradient(circle at 50% 15%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.9) 12px, transparent 13px);
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

/* Header - Mario Question Block Style */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--mario-yellow);
    background-image:
        linear-gradient(180deg, #FFD700 0%, #FBD000 40%, #FFA500 100%);
    border-bottom: 4px solid var(--border);
    border-top: 4px solid var(--border);
    border-left: 4px solid var(--border);
    border-right: 4px solid var(--border);
    height: var(--header-h);
    box-shadow: 0 4px 0 var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    height: var(--header-h);
}

.logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--border);
    text-shadow:
        2px 2px 0 #FFFFFF,
        -1px -1px 0 #FFFFFF,
        1px -1px 0 #FFFFFF,
        -1px 1px 0 #FFFFFF;
    letter-spacing: 1px;
}

/* Main */
.site-main {
    flex: 1;
    padding: 24px 0 32px;
    position: relative;
    z-index: 1;
}

/* Filters */
.filters {
    margin-bottom: 24px;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.75fr) auto;
    gap: 12px;
    align-items: end;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.filter-field-platform {
    min-width: 0;
}

.filter-field-action {
    width: 96px;
    justify-content: flex-end;
}

.filter-control {
    width: 100%;
    min-height: 44px;
}

.filter-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    color: var(--border);
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

.platform-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.platform-tabs::-webkit-scrollbar {
    display: none;
}

.platform-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.1s, box-shadow 0.1s;
    flex-shrink: 0;
    box-shadow: 0 3px 0 var(--border);
}

.platform-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 var(--border);
}

.platform-tab.active {
    background: var(--mario-red);
    color: var(--mario-white);
    box-shadow: 0 3px 0 var(--border);
}

.platform-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: contain;
}

.platform-picker {
    position: relative;
    width: 100%;
}

.platform-picker-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.9375rem;
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.25;
    cursor: pointer;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: 0 3px 0 var(--border);
    transition: transform 0.1s, box-shadow 0.1s;
}

.platform-picker-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 0 var(--border);
    background: var(--bg-hover);
}

.platform-picker-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
}

.platform-picker img.platform-picker-icon {
    display: block;
    max-width: 20px;
}

.platform-picker-icon-empty,
.platform-picker-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    flex-shrink: 0;
    font-size: 0.875rem;
    line-height: 1;
}

.platform-picker-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.platform-picker-caret {
    width: 0;
    height: 0;
    margin-left: auto;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--border);
    flex-shrink: 0;
}

.platform-picker-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 120;
    min-width: 200px;
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    background: var(--mario-cream);
    box-shadow: 0 6px 0 var(--border);
}

.platform-picker-menu[hidden] {
    display: none !important;
}

.platform-picker-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9375rem;
    white-space: nowrap;
    transition: background 0.15s;
}

.platform-picker-option span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.platform-picker-option:hover {
    background: var(--bg-hover);
}

.platform-picker-option.active {
    background: var(--mario-red);
    color: var(--mario-white);
    font-weight: 700;
}

.lang-select,
.filter-select {
    width: 100%;
    padding: 10px 14px;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.9375rem;
    font-family: 'Noto Sans TC', sans-serif;
    min-height: 44px;
    box-shadow: 0 3px 0 var(--border);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.search-input {
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.9375rem;
    font-family: 'Noto Sans TC', sans-serif;
    box-shadow: 0 3px 0 var(--border);
    transition: transform 0.1s, box-shadow 0.1s;
}

.search-input:focus {
    outline: none;
    border-color: var(--mario-red);
    transform: translateY(-1px);
    box-shadow: 0 4px 0 var(--border);
}

.btn-search {
    width: 100%;
    padding: 10px 16px;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    background: var(--mario-red);
    color: var(--mario-white);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--border);
    transition: transform 0.1s, box-shadow 0.1s, background 0.15s;
    text-shadow: 1px 1px 0 var(--border);
}

.btn-search:hover {
    background: var(--mario-red-dark);
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--border);
}

.btn-search:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--border);
}

/* List */
.list-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
    padding: 16px 20px;
    background: var(--mario-yellow);
    border: 3px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 0 var(--border);
}

.page-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.1rem;
    color: var(--border);
    text-shadow: 2px 2px 0 #FFFFFF;
}

.total-count {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: var(--border);
    text-shadow: 1px 1px 0 rgba(255,255,255,0.8);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.card {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 0 var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 0 var(--border);
    background: var(--bg-hover);
}

.card-cover-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--mario-sky-light);
}

.card-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card:hover .card-cover {
    transform: scale(1.05);
}

.corner-mark {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 2px 0 var(--border);
}

.corner-mark.hot {
    background: var(--mario-red);
}

.corner-mark.new {
    background: var(--mario-green);
}

.card-body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-title {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.card-platform-icon {
    width: 18px;
    height: 18px;
    border-radius: 3px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
}

.page-btn {
    padding: 10px 20px;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: var(--border);
    cursor: pointer;
    box-shadow: 0 4px 0 var(--border);
    transition: transform 0.1s, box-shadow 0.1s, background 0.15s;
}

.page-btn:hover {
    background: var(--mario-yellow);
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--border);
}

.page-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--border);
}

.page-info {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: var(--border);
    padding: 8px 14px;
    background: var(--mario-yellow);
    border: 3px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 3px 0 var(--border);
}

/* Empty & Error */
.empty-state,
.error-page {
    text-align: center;
    padding: 60px 20px;
    color: var(--border);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    text-shadow: 2px 2px 0 rgba(255,255,255,0.6);
}

.error-page h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    color: var(--border);
    margin-bottom: 16px;
    text-shadow: 3px 3px 0 var(--mario-yellow);
}

.error-page p {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 1rem;
    margin-bottom: 24px;
    text-shadow: none;
}

.btn-back {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    background: var(--mario-green);
    color: #fff;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
    box-shadow: 0 4px 0 var(--border);
    transition: transform 0.1s, box-shadow 0.1s;
    text-shadow: 1px 1px 0 var(--border);
}

.btn-back:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--border);
}

.btn-back:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--border);
}

/* Detail */
.detail-page {
    max-width: 1200px;
    margin: 0 auto;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

.detail-left {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detail-right {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.player-wrap {
    position: relative;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 9 / 16;
    background: #000;
    border: 4px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0 auto 20px;
    box-shadow: 0 6px 0 var(--border);
}

.player-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: var(--mario-yellow);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
}

.player-loading.hidden {
    display: none;
}

.player-loading-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid var(--border);
    border-top-color: var(--mario-yellow);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.detail-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--border);
    text-shadow: 2px 2px 0 var(--mario-yellow);
    line-height: 1.5;
}

.detail-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9375rem;
    color: var(--border);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.detail-platform-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
}

.tag-badge {
    padding: 4px 12px;
    background: var(--mario-red);
    color: #fff;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 0 var(--border);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag {
    padding: 6px 12px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: var(--border);
    font-weight: 500;
    box-shadow: 0 2px 0 var(--border);
}

.detail-desc {
    font-size: 0.9375rem;
    color: var(--border);
    line-height: 1.8;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 0 var(--border);
}

.theater-link {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--mario-red);
    margin-bottom: 20px;
}

.episodes {
    margin-bottom: 0;
    width: 100%;
}

.episodes-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--border);
    text-shadow: 2px 2px 0 var(--mario-yellow);
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.episode-btn {
    padding: 12px 6px;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--border);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.65rem;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s, background 0.15s;
    text-align: center;
    box-shadow: 0 4px 0 var(--border);
}

.episode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--border);
    background: var(--mario-yellow);
}

.episode-btn.active {
    border-color: var(--border);
    background: var(--mario-red);
    color: var(--mario-white);
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--border);
    text-shadow: 1px 1px 0 var(--border);
}

/* Promotion guide */
.promotion-guide {
    margin-bottom: 0;
    padding: 24px;
    background: var(--mario-cream);
    border: 3px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 0 var(--border);
}

.promotion-skeleton {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promotion-placeholder {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
    color: var(--border);
}

.promotion-guide-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.promotion-icon {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    flex-shrink: 0;
}

.promotion-guide-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--border);
    text-shadow: 1px 1px 0 var(--mario-yellow);
}

.promotion-guide-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.promotion-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.promo-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.1s;
    box-shadow: 0 4px 0 var(--border);
}

.promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--border);
}

.promo-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--border);
}

.promo-btn-primary {
    background: var(--mario-red);
    color: var(--mario-white);
    text-shadow: 1px 1px 0 var(--border);
}

.promo-btn-secondary {
    background: var(--mario-blue);
    color: var(--mario-white);
    text-shadow: 1px 1px 0 var(--border);
}

.promo-btn-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.promo-btn-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.promo-btn-text strong {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
}

.promo-btn-text small {
    font-size: 0.8125rem;
    opacity: 0.9;
}

.promo-code-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border: 3px dashed var(--border);
    border-radius: var(--radius);
}

.promo-code-info strong {
    display: block;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.75rem;
    margin-bottom: 4px;
    color: var(--border);
}

.promo-code-info small {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Share buttons */
.share-section {
    margin-bottom: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 0 var(--border);
}

.share-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--border);
    text-shadow: 1px 1px 0 var(--mario-yellow);
}

.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.1s, box-shadow 0.1s;
    box-shadow: 0 4px 0 var(--border);
    text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.share-btn:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--border);
    opacity: 0.95;
}

.share-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--border);
}

.share-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 700;
}

.share-btn-facebook {
    background: #1877f2;
    color: #fff;
}

.share-btn-facebook .share-btn-icon {
    background: rgba(255, 255, 255, 0.25);
    font-family: Georgia, serif;
}

.share-btn-tiktok {
    background: #010101;
    color: #fff;
}

.share-btn-tiktok .share-btn-icon {
    background: linear-gradient(135deg, #25f4ee, #fe2c55);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1rem;
}

.share-feedback {
    margin-top: 12px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: var(--mario-green-dark);
}

/* Book detail */
.book-layout {
    display: grid;
    gap: 24px;
}

.book-cover-wrap {
    max-width: 220px;
    margin: 0 auto 20px;
}

.book-cover {
    width: 100%;
    border: 4px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 6px 0 var(--border);
}

.book-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--border);
    text-shadow: 2px 2px 0 var(--mario-yellow);
    line-height: 1.5;
}

.book-author {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 0.9375rem;
}

.book-chapters {
    margin-top: 20px;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    margin-bottom: 16px;
    padding-right: 4px;
}

.chapter-btn {
    padding: 12px 14px;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--border);
    font-size: 0.9375rem;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 3px 0 var(--border);
    transition: transform 0.1s, box-shadow 0.1s, background 0.15s;
}

.chapter-btn:hover {
    transform: translateX(4px);
    background: var(--bg-hover);
    box-shadow: 0 3px 0 var(--border);
}

.chapter-btn.active {
    border-color: var(--border);
    background: var(--mario-red);
    color: var(--mario-white);
    box-shadow: 0 3px 0 var(--border);
    text-shadow: 1px 1px 0 var(--border);
}

.chapter-content {
    display: none;
    padding: 24px;
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 0 var(--border);
}

.chapter-content.active {
    display: block;
}

.chapter-content-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--border);
    text-shadow: 2px 2px 0 var(--mario-yellow);
}

.chapter-content-body {
    white-space: pre-wrap;
    line-height: 1.85;
    font-size: 1rem;
    color: var(--text);
}

.promo-code-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    border: 3px solid var(--border);
    border-radius: var(--radius);
    background: var(--mario-yellow);
    color: var(--border);
    cursor: pointer;
    box-shadow: 0 4px 0 var(--border);
    transition: transform 0.1s, box-shadow 0.1s;
    font-family: 'Press Start 2P', cursive;
}

.promo-code-btn:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--border);
}

.promo-code-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--border);
}

.promo-code-label {
    font-size: 0.7rem;
    color: var(--border);
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

.promo-code-value {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--mario-red);
}

.promo-code-action {
    font-size: 0.7rem;
    color: var(--border);
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

/* Footer - Mario Ground Pipe Style */
.site-footer {
    border-top: 4px solid var(--border);
    padding: 20px 0;
    text-align: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: var(--border);
    background: var(--mario-green);
    background-image: linear-gradient(180deg, #43B047 0%, #2E7D32 100%);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

/* Coin sparkle animation */
@keyframes coin-sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.card .corner-mark {
    animation: coin-sparkle 2s ease-in-out infinite;
}

/* Question block pulse for logo */
@keyframes logo-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo {
    display: inline-block;
    animation: logo-pulse 3s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .filter-field-search {
        grid-column: 1;
    }

    .filter-field-action {
        grid-column: 2;
        width: 100%;
        align-self: end;
    }

    body::before {
        background-size: 80% 80%;
    }
}

@media (max-width: 480px) {
    .filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-field:nth-child(3) {
        grid-column: 1 / -1;
    }

    .platform-picker-menu {
        min-width: 100%;
        width: max-content;
        max-width: min(280px, calc(100vw - 32px));
    }

    .logo {
        font-size: 0.85rem;
    }

    .page-title {
        font-size: 0.85rem;
    }

    .filter-label {
        font-size: 0.55rem;
    }

    .btn-search {
        font-size: 0.65rem;
    }
}

@media (min-width: 640px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 900px) {
    .detail-layout,
    .book-layout {
        grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
        gap: 28px;
    }

    .detail-left {
        align-items: stretch;
    }

    .book-left {
        position: sticky;
        top: calc(var(--header-h) + 16px);
        align-self: start;
    }

    .player-wrap {
        max-width: none;
        margin: 0 0 20px;
    }

    .detail-right {
        position: sticky;
        top: calc(var(--header-h) + 16px);
    }
}

@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .page-title {
        font-size: 1.3rem;
    }
}