:root {
    --bg-dark: #0f111a;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-purple: #a855f7;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --grad-header: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
    /* 日本語が主なので、英字専用のWebフォントは読み込まず端末の日本語フォントを使う */
    --font-sans: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
    --font-display: var(--font-sans);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

.glass-bg {
    position: fixed;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at 20% 30%, rgba(168, 85, 247, 0.12) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.12) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background: var(--grad-header);
    padding: 36px 0 28px;
    position: relative;
    border-bottom: 1px solid var(--card-border);
    text-align: center;
}

header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-purple), var(--accent-cyan), transparent);
}

.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    background: linear-gradient(to right, var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.logo a {
    color: inherit;
    text-decoration: none;
    -webkit-text-fill-color: inherit;
}

.genre-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

.genre-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 9999px;
    border: 1px solid var(--card-border);
}

.genre-nav a:hover,
.genre-nav a[aria-current="page"] {
    color: var(--text-primary);
    border-color: var(--accent-cyan);
}

.date-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.35;
    background: linear-gradient(to right, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 600px;
}

main {
    padding: 32px 0 60px;
}

section {
    margin-bottom: 80px;
}

.section-title {
    margin-bottom: 40px;
}

.section-title h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title h2 span {
    font-size: 1.8rem;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1rem;
}

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

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.card-img {
    display: block;
    width: calc(100% + 60px);
    margin: -30px -30px 20px;
    aspect-ratio: 460 / 215;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.04);
}

.anime-section .card-img {
    /* AniList のキービジュアルは縦長なので、顔が入りやすい上寄りで切り出す */
    object-position: center 25%;
}

.pick-img {
    display: block;
    width: 100%;
    max-width: 460px;
    aspect-ratio: 460 / 215;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 16px;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.game-section .card:hover {
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.08);
}

.free-section .card:hover {
    box-shadow: 0 20px 40px rgba(34, 197, 94, 0.08);
}

.anime-section .card:hover {
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.08);
}

.gadget-section .card:hover {
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.badge-sale {
    background: rgba(236, 72, 153, 0.15);
    color: var(--accent-pink);
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.badge-topseller {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.badge-gadget {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.badge-free {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-next {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
}

.free-period {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.badge-anime {
    background: rgba(236, 72, 153, 0.15);
    color: var(--accent-pink);
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.source {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #ffffff;
    line-height: 1.4;
}

.description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-box {
    margin-bottom: 24px;
}

.price-sale-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-original {
    font-size: 0.85rem;
    text-decoration: line-through;
    color: var(--text-secondary);
}

.price-current {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-discount {
    font-size: 0.9rem;
    font-weight: 700;
    background: var(--accent-pink);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 6px;
}

.price-normal {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
}

.btn-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: #ffffff;
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.no-data {
    color: var(--text-secondary);
    font-style: italic;
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
}

.history-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.history-badges:empty {
    display: none;
}

.badge-new {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-streak {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.25);
}

.badge-regular {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.25);
}

.badge-repeat {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.sale-history {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.table-wrap {
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.ranking-table th,
.ranking-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--card-border);
    text-align: left;
}

.ranking-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
}

.ranking-table a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

.ranking-table a:hover {
    color: var(--accent-cyan);
}

.ranking-table .rank {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
}

.ranking-table .num {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.ranking-table .of {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

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

.pick-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 3px solid var(--accent-pink);
    border-radius: 16px;
    padding: 28px 32px;
    backdrop-filter: blur(12px);
}

.pick-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.pick-reason {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 16px;
}

.pick-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
}

.pick-card .btn {
    width: auto;
    display: inline-flex;
    padding: 10px 28px;
}

.affiliate-notice {
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--card-border);
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

.disclosure {
    font-size: 0.85rem;
    color: var(--text-secondary) !important;
}

.archive-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.archive-list a {
    display: block;
    padding: 14px 18px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.archive-list a:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

footer {
    border-top: 1px solid var(--card-border);
    padding: 60px 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
}

.footer-container p {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.credit {
    font-size: 0.85rem;
    color: var(--text-secondary) !important;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.35rem;
    }

    header {
        padding: 20px 0 16px;
    }

    .subtitle {
        font-size: 0.85rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
}