/* ============================================
   Cdhwia - Doodle Comic Theme Common Styles
   Domain: cdhwia.com
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Patrick+Hand&family=Caveat:wght@400;500;600;700&family=Nunito:wght@400;500;600;700;800&display=swap');

/* --- Design Tokens --- */
:root {
    --cd-bg: #faf8f5;
    --cd-bg-alt: #f0ece6;
    --cd-surface: #ffffff;
    --cd-surface-hover: #fef9f2;
    --cd-text: #2d2d2d;
    --cd-text-light: #555555;
    --cd-text-muted: #888888;
    --cd-primary: #e74c3c;
    --cd-primary-dim: rgba(231, 76, 60, 0.1);
    --cd-secondary: #3498db;
    --cd-secondary-dim: rgba(52, 152, 219, 0.1);
    --cd-accent: #f39c12;
    --cd-accent-dim: rgba(243, 156, 18, 0.1);
    --cd-green: #27ae60;
    --cd-green-dim: rgba(39, 174, 96, 0.1);
    --cd-purple: #9b59b6;
    --cd-pink: #e84393;
    --cd-warn: #e67e22;
    --cd-danger: #c0392b;
    --cd-border: #2d2d2d;
    --cd-border-light: #d5cfc6;
    --cd-radius: 14px;
    --cd-radius-lg: 20px;
    --cd-radius-sm: 10px;
    --cd-font-body: 'Nunito', 'Patrick Hand', sans-serif;
    --cd-font-heading: 'Caveat', 'Patrick Hand', cursive;
    --cd-font-hand: 'Patrick Hand', cursive;
    --cd-transition: 0.25s ease;
    --cd-shadow: 3px 3px 0px #2d2d2d;
    --cd-shadow-sm: 2px 2px 0px #2d2d2d;
    --cd-shadow-hover: 5px 5px 0px #2d2d2d;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--cd-font-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--cd-text);
    background-color: var(--cd-bg);
    background-image:
        radial-gradient(circle, #e8e2d8 1px, transparent 1px);
    background-size: 24px 24px;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--cd-primary);
    text-decoration: none;
    transition: color var(--cd-transition);
    font-weight: 600;
}

a:hover {
    color: var(--cd-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: var(--cd-font-body);
    cursor: pointer;
    border: none;
    background: none;
}

/* --- Utility --- */
.cd-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 28px;
}

.cd-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* --- Navbar --- */
.cd-navbar {
    background: var(--cd-surface);
    border-bottom: 3px solid var(--cd-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 3px 0 rgba(0,0,0,0.04);
}

.cd-navbar-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
}

.cd-navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--cd-text);
}

.cd-navbar-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    border: 2.5px solid var(--cd-border);
    transition: transform var(--cd-transition);
    box-shadow: var(--cd-shadow-sm);
}

.cd-navbar-brand:hover .cd-navbar-logo {
    transform: rotate(-8deg) scale(1.15);
}

.cd-navbar-logo {
    animation: cd-logo-bounce 4s ease-in-out infinite;
}

@keyframes cd-logo-bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-2px) rotate(2deg); }
}

.cd-navbar-title {
    font-family: var(--cd-font-heading);
    font-size: 30px;
    font-weight: 700;
    color: var(--cd-primary);
    letter-spacing: 1px;
}

.cd-navbar-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.cd-nav-link {
    font-family: var(--cd-font-hand);
    font-weight: 500;
    font-size: 16px;
    color: var(--cd-text);
    padding: 6px 14px;
    border-radius: var(--cd-radius-sm);
    transition: all var(--cd-transition);
    text-decoration: none;
    position: relative;
    border: 2px solid transparent;
}

.cd-nav-link:hover,
.cd-nav-link[data-active="true"] {
    color: var(--cd-primary);
    background: var(--cd-primary-dim);
    border-color: var(--cd-primary);
    transform: translateY(-2px) rotate(-1deg);
}

.cd-navbar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 2.5px solid var(--cd-border);
    border-radius: var(--cd-radius-sm);
    align-items: center;
    justify-content: center;
    background: var(--cd-surface);
    transition: background var(--cd-transition);
    box-shadow: var(--cd-shadow-sm);
}

.cd-navbar-toggle:hover {
    background: var(--cd-bg-alt);
}

.cd-navbar-toggle-icon {
    display: block;
    width: 18px;
    height: 2.5px;
    background: var(--cd-border);
    border-radius: 2px;
    position: relative;
}

.cd-navbar-toggle-icon::before,
.cd-navbar-toggle-icon::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2.5px;
    background: var(--cd-border);
    border-radius: 2px;
    left: 0;
}

.cd-navbar-toggle-icon::before { top: -6px; }
.cd-navbar-toggle-icon::after { top: 6px; }

/* Mobile Nav */
.cd-mobile-nav {
    display: none;
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 248, 245, 0.98);
    backdrop-filter: blur(10px);
    z-index: 999;
    padding: 20px;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    border-top: 3px solid var(--cd-border);
}

.cd-mobile-nav.cd-mobile-nav--open {
    display: flex;
}

.cd-mobile-nav .cd-nav-link {
    font-size: 18px;
    padding: 14px 18px;
    border: 2.5px solid var(--cd-border);
    border-radius: var(--cd-radius);
    background: var(--cd-surface);
    box-shadow: var(--cd-shadow-sm);
}

/* --- Main Wrapper --- */
.cd-main-wrapper {
    min-height: calc(100vh - 62px);
}

.cd-main {
    padding: 28px 0 48px;
}

/* --- Game Card --- */
.cd-game-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--cd-surface);
    border: 2.5px solid var(--cd-border);
    border-radius: var(--cd-radius);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--cd-shadow-sm);
    animation: cd-card-pop 0.4s ease both;
}

@keyframes cd-card-pop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.cd-game-card:hover {
    transform: translateY(-5px) rotate(-1.5deg) scale(1.02);
    box-shadow: var(--cd-shadow-hover);
    border-color: var(--cd-primary);
}

.cd-game-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-bottom: 2.5px solid var(--cd-border);
}

.cd-game-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cd-game-card:hover .cd-game-card-thumb img {
    transform: scale(1.06);
}

.cd-game-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-family: var(--cd-font-hand);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 2px 10px;
    border-radius: 8px;
    color: #fff;
    border: 2px solid var(--cd-border);
    box-shadow: 1px 1px 0 var(--cd-border);
}

.cd-badge-hot { background: var(--cd-primary); }
.cd-badge-new { background: var(--cd-green); }
.cd-badge-pick { background: var(--cd-purple); }

.cd-game-card-body {
    padding: 8px 10px 10px;
}

.cd-game-card-name {
    font-family: var(--cd-font-hand);
    font-size: 14px;
    font-weight: 500;
    color: var(--cd-text);
    line-height: 1.3;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cd-game-card-meta {
    font-size: 12px;
    color: var(--cd-text-muted);
}

/* --- Game Grid --- */
.cd-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.cd-game-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    gap: 12px;
}

/* --- Section Title --- */
.cd-section-title {
    font-family: var(--cd-font-heading);
    font-size: 32px;
    font-weight: 700;
    color: var(--cd-text);
    margin-bottom: 20px;
    display: inline-block;
    position: relative;
}

.cd-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60%;
    height: 0;
    border-bottom: 4px wavy var(--cd-primary);
    transform: none;
    border-radius: 0;
}

/* --- Channel Banner --- */
.cd-channel-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--cd-surface);
    border: 2.5px solid var(--cd-border);
    border-radius: var(--cd-radius-lg);
    padding: 24px 28px;
    margin-bottom: 28px;
    box-shadow: var(--cd-shadow);
}

.cd-channel-icon-lg {
    font-size: 42px;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cd-accent-dim);
    border: 2.5px solid var(--cd-border);
    border-radius: var(--cd-radius);
    flex-shrink: 0;
    box-shadow: var(--cd-shadow-sm);
}

.cd-channel-info {
    flex: 1;
}

.cd-channel-name {
    font-family: var(--cd-font-heading);
    font-size: 36px;
    font-weight: 700;
    color: var(--cd-text);
    margin-bottom: 2px;
}

.cd-channel-count {
    font-family: var(--cd-font-hand);
    font-size: 16px;
    color: var(--cd-text-muted);
}

.cd-game-count {
    font-family: var(--cd-font-hand);
    font-size: 16px;
    color: var(--cd-text-muted);
    margin-bottom: 18px;
}

/* --- Channel Recommend --- */
.cd-channel-recommend {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 3px dashed var(--cd-border-light);
}

/* --- Back to Top --- */
.cd-back-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 900;
}

.cd-back-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cd-surface);
    border: 2.5px solid var(--cd-border);
    border-radius: var(--cd-radius);
    font-size: 16px;
    color: var(--cd-text);
    text-decoration: none;
    transition: all var(--cd-transition);
    box-shadow: var(--cd-shadow-sm);
}

.cd-back-btn:hover {
    background: var(--cd-primary-dim);
    border-color: var(--cd-primary);
    color: var(--cd-primary);
    transform: translateY(-3px) rotate(-8deg);
    box-shadow: var(--cd-shadow);
}

.cd-back-top.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.cd-back-top:not(.is-visible) {
    opacity: 0;
    pointer-events: none;
}

/* --- Breadcrumb --- */
.cd-breadcrumb {
    font-family: var(--cd-font-hand);
    font-size: 15px;
    color: var(--cd-text-muted);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.cd-breadcrumb a {
    color: var(--cd-text-light);
    text-decoration: none;
    transition: color var(--cd-transition);
    font-weight: 500;
}

.cd-breadcrumb a:hover {
    color: var(--cd-primary);
}

.cd-breadcrumb-sep {
    color: var(--cd-text-muted);
    font-size: 16px;
}

/* --- Game Detail --- */
.cd-game-detail {
    margin-bottom: 40px;
}

.cd-game-detail-main {
    display: flex;
    gap: 32px;
    margin-bottom: 28px;
}

.cd-game-detail-cover {
    width: 320px;
    flex-shrink: 0;
}

.cd-game-detail-cover img {
    width: 100%;
    border-radius: var(--cd-radius);
    border: 2.5px solid var(--cd-border);
    box-shadow: var(--cd-shadow);
}

.cd-game-detail-meta {
    flex: 1;
}

.cd-game-detail-title {
    font-family: var(--cd-font-heading);
    font-size: 40px;
    font-weight: 700;
    color: var(--cd-text);
    margin-bottom: 12px;
}

.cd-game-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.cd-tag {
    font-family: var(--cd-font-hand);
    font-size: 14px;
    font-weight: 500;
    padding: 4px 16px;
    background: var(--cd-surface);
    border: 2px solid var(--cd-border);
    border-radius: 20px;
    color: var(--cd-text);
    box-shadow: 1.5px 1.5px 0 var(--cd-border);
}

.cd-tag--date {
    background: var(--cd-green-dim);
    border-color: var(--cd-green);
    color: var(--cd-green);
}

.cd-game-detail-desc {
    font-size: 15px;
    line-height: 1.8;
    color: var(--cd-text-light);
    margin-bottom: 24px;
}

.cd-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--cd-font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 14px 40px;
    background: var(--cd-primary);
    color: #fff;
    border-radius: var(--cd-radius);
    border: 2.5px solid var(--cd-border);
    text-decoration: none;
    transition: all var(--cd-transition);
    box-shadow: var(--cd-shadow);
}

.cd-play-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--cd-shadow-hover);
    background: #c0392b;
    color: #fff;
}

/* --- Detail Info Bar --- */
.cd-detail-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.cd-detail-info-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--cd-font-hand);
    font-size: 15px;
    padding: 8px 16px;
    background: var(--cd-surface);
    border: 2px solid var(--cd-border);
    border-radius: 24px;
    color: var(--cd-text);
    box-shadow: var(--cd-shadow-sm);
}

.cd-detail-info-chip strong {
    color: var(--cd-text);
}

.cd-detail-info-chip-icon {
    font-size: 15px;
}

/* --- Detail Features --- */
.cd-detail-block-title {
    font-family: var(--cd-font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--cd-text);
    margin-bottom: 16px;
}

.cd-detail-features {
    margin-bottom: 28px;
}

.cd-detail-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.cd-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    background: var(--cd-surface);
    border: 2px solid var(--cd-border);
    border-radius: var(--cd-radius);
    transition: all var(--cd-transition);
    box-shadow: var(--cd-shadow-sm);
}

.cd-feature-item:hover {
    border-color: var(--cd-primary);
    transform: translateY(-2px);
    box-shadow: var(--cd-shadow);
}

.cd-feature-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.cd-feature-text strong {
    display: block;
    font-family: var(--cd-font-hand);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--cd-text);
}

.cd-feature-text p {
    font-size: 13px;
    color: var(--cd-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* --- Detail Sections (How to Play, Tips) --- */
.cd-detail-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

.cd-detail-section-card {
    background: var(--cd-surface);
    border: 2.5px solid var(--cd-border);
    border-radius: var(--cd-radius);
    padding: 22px;
    box-shadow: var(--cd-shadow-sm);
}

.cd-detail-section-card h3 {
    font-family: var(--cd-font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--cd-secondary);
    margin-bottom: 12px;
}

.cd-detail-section-card p {
    font-size: 14px;
    line-height: 1.75;
    color: var(--cd-text-light);
    margin: 0;
}

.cd-detail-section-card ul {
    margin: 8px 0 0 18px;
}

.cd-detail-section-card li {
    font-size: 14px;
    line-height: 1.7;
    color: var(--cd-text-light);
    margin-bottom: 6px;
}

/* --- Detail Controls --- */
.cd-detail-controls {
    margin-bottom: 28px;
}

.cd-controls-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cd-control-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--cd-surface);
    border: 2px solid var(--cd-border);
    border-radius: var(--cd-radius-sm);
    box-shadow: var(--cd-shadow-sm);
}

.cd-control-key {
    font-family: var(--cd-font-hand);
    font-size: 15px;
    color: var(--cd-secondary);
    font-weight: 700;
}

.cd-control-action {
    font-size: 13px;
    color: var(--cd-text-muted);
}

/* --- Detail Related --- */
.cd-detail-related {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 3px dashed var(--cd-border-light);
}

.cd-detail-related-title {
    font-family: var(--cd-font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--cd-text);
    margin-bottom: 18px;
}

/* --- Play Page --- */
.cd-play-frame-wrap {
    position: relative;
    width: 100%;
    max-width: 960px;
    margin: 0 auto 24px;
    border: 3px solid var(--cd-border);
    border-radius: var(--cd-radius-lg);
    overflow: hidden;
    background: #000;
    box-shadow: var(--cd-shadow);
}

.cd-play-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
}

.cd-play-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--cd-surface);
    border-top: 2.5px solid var(--cd-border);
}

.cd-play-info-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.cd-play-back-link {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cd-text);
    text-decoration: none;
    border: 2px solid var(--cd-border);
    border-radius: 20px;
    padding: 6px 16px;
    background: var(--cd-surface);
    transition: all var(--cd-transition);
    box-shadow: var(--cd-shadow-sm);
}

.cd-play-back-link:hover {
    border-color: var(--cd-primary);
    color: var(--cd-primary);
}

/* --- Legal / Content Pages --- */
.cd-legal-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px;
}

.cd-legal-header {
    text-align: center;
    margin-bottom: 36px;
    padding: 36px 24px;
    background: var(--cd-surface);
    border: 2.5px solid var(--cd-border);
    border-radius: var(--cd-radius-lg);
    box-shadow: var(--cd-shadow);
}

.cd-legal-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.cd-legal-title {
    font-family: var(--cd-font-heading);
    font-size: 38px;
    font-weight: 700;
    color: var(--cd-text);
    margin-bottom: 8px;
}

.cd-legal-updated {
    font-family: var(--cd-font-hand);
    font-size: 15px;
    color: var(--cd-text-muted);
}

.cd-legal-body {
    background: var(--cd-surface);
    border: 2.5px solid var(--cd-border);
    border-radius: var(--cd-radius-lg);
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: var(--cd-shadow);
}

.cd-legal-body h2 {
    font-family: var(--cd-font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--cd-secondary);
    margin: 28px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px dashed var(--cd-border-light);
}

.cd-legal-body h2:first-child {
    margin-top: 0;
}

.cd-legal-body h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--cd-text);
    margin: 20px 0 8px;
}

.cd-legal-body p {
    margin-bottom: 14px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--cd-text-light);
}

.cd-legal-body ul {
    margin: 10px 0 16px 20px;
}

.cd-legal-body li {
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--cd-text-light);
}

.cd-legal-body a {
    color: var(--cd-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* --- FAQ --- */
.cd-faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cd-faq-item {
    background: var(--cd-surface);
    border: 2.5px solid var(--cd-border);
    border-radius: var(--cd-radius);
    overflow: hidden;
    transition: all var(--cd-transition);
    box-shadow: var(--cd-shadow-sm);
}

.cd-faq-item:hover {
    border-color: var(--cd-secondary);
}

.cd-faq-question {
    width: 100%;
    text-align: left;
    padding: 18px 22px;
    font-family: var(--cd-font-hand);
    font-weight: 600;
    font-size: 17px;
    color: var(--cd-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: none;
    border: none;
    cursor: pointer;
    transition: background var(--cd-transition);
}

.cd-faq-question:hover {
    background: var(--cd-bg-alt);
}

.cd-faq-arrow {
    font-size: 14px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: var(--cd-secondary);
}

.cd-faq-item.cd-faq-open .cd-faq-arrow {
    transform: rotate(180deg);
}

.cd-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 22px;
    font-size: 14px;
    line-height: 1.75;
    color: var(--cd-text-light);
}

.cd-faq-item.cd-faq-open .cd-faq-answer {
    max-height: 600px;
    padding: 0 22px 18px;
}

/* --- Footer --- */
.cd-footer {
    background: var(--cd-surface);
    border-top: 3px solid var(--cd-border);
    padding: 48px 0 20px;
    margin-top: 48px;
}

.cd-footer-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 28px;
}

.cd-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 32px;
}

.cd-footer-brand-desc {
    font-size: 14px;
    color: var(--cd-text-muted);
    line-height: 1.7;
    margin-top: 12px;
}

.cd-footer-brand-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--cd-font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--cd-primary);
}

.cd-footer-brand-name img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid var(--cd-border);
    object-fit: cover;
}

.cd-footer-col-title {
    font-family: var(--cd-font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--cd-text);
    margin-bottom: 16px;
}

.cd-footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cd-footer-links a {
    font-family: var(--cd-font-hand);
    font-size: 16px;
    color: var(--cd-text-muted);
    text-decoration: none;
    transition: color var(--cd-transition);
    font-weight: 400;
}

.cd-footer-links a:hover {
    color: var(--cd-primary);
}

.cd-footer-bottom {
    border-top: 2.5px dashed var(--cd-border-light);
    padding-top: 20px;
    text-align: center;
}

.cd-footer-bottom p {
    font-size: 13px;
    color: var(--cd-text-muted);
    line-height: 1.7;
    margin-bottom: 4px;
}

.cd-footer-bottom a {
    color: var(--cd-secondary);
}

/* --- 404 Page --- */
.cd-404-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 40px 24px;
    text-align: center;
}

.cd-404-code {
    font-family: var(--cd-font-heading);
    font-size: 120px;
    font-weight: 900;
    color: var(--cd-primary);
    line-height: 1;
    margin-bottom: 16px;
    text-shadow: 4px 4px 0 var(--cd-accent), 8px 8px 0 rgba(0,0,0,0.08);
}

.cd-404-msg {
    font-family: var(--cd-font-hand);
    font-size: 22px;
    color: var(--cd-text-light);
    margin-bottom: 28px;
}

.cd-404-doodle {
    font-size: 72px;
    margin-bottom: 20px;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--cd-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--cd-border-light);
    border-radius: 6px;
    border: 2px solid var(--cd-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cd-text-muted);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .cd-navbar-links { display: none; }
    .cd-navbar-toggle { display: flex; }

    .cd-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .cd-game-detail-main {
        flex-direction: column;
    }

    .cd-game-detail-cover {
        width: 100%;
        max-width: 400px;
    }

    .cd-detail-sections {
        grid-template-columns: 1fr;
    }

    .cd-game-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .cd-navbar-inner { height: 56px; }
    .cd-navbar-title { font-size: 24px; }
    .cd-navbar-logo { width: 34px; height: 34px; }

    .cd-section-title { font-size: 26px; }
    .cd-channel-name { font-size: 28px; }
    .cd-channel-banner { padding: 18px; gap: 14px; }
    .cd-channel-icon-lg { width: 56px; height: 56px; font-size: 32px; }

    .cd-game-detail-title { font-size: 30px; }
    .cd-legal-title { font-size: 28px; }
    .cd-legal-body { padding: 20px; }

    .cd-footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cd-game-grid {
        grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
        gap: 10px;
    }

    .cd-404-code { font-size: 80px; }
    .cd-404-msg { font-size: 18px; }
}

@media (max-width: 380px) {
    .cd-container { padding: 0 14px; }
    .cd-game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .cd-game-card-name { font-size: 13px; }
    .cd-play-btn { padding: 12px 24px; font-size: 18px; }
}
