/* ============================================
   CanyonGame - Unified Stylesheet
   Purble Place inspired: purple, airy, playful
   Shared across ALL pages
   ============================================ */

/* --- Google Fonts (Bubblegum Sans for playful headings) --- */
@import url('https://fonts.googleapis.com/css2?family=Bubblegum+Sans&family=Nunito:wght@400;500;600;700;800&display=swap');

/* --- Custom Properties --- */
:root {
    --font-heading: 'Bubblegum Sans', 'Comic Sans MS', cursive;
    --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --color-primary: #9333EA;
    --color-primary-dark: #7C22D0;
    --color-primary-glow: rgba(147, 51, 234, 0.3);
    --color-primary-light: #C084FC;
    --color-secondary: #7C3AED;
    --color-secondary-light: #A78BFA;
    --color-accent: #E879F9;
    --color-yellow: #FBBF24;
    --color-green: #34D399;
    --color-orange: #FB923C;
    --color-pink: #F472B6;

    --bg-header: linear-gradient(180deg, #87CEEB 0%, #B4A0D6 100%);
    --bg-light: #EEF2FF;
    --bg-lighter: #F5F3FF;
    --bg-white: #ffffff;
    --bg-purple: #9333EA;
    --bg-purple-dark: #7C22D0;
    --bg-game-section: linear-gradient(180deg, #1E1040 0%, #2D1B69 50%, #1E1040 100%);

    --text-dark: #2D2235;
    --text-body: #4A4358;
    --text-light: #E8E0F5;
    --text-muted: #8B7FA0;
    --text-white: #ffffff;
    --text-purple: #7C3AED;

    --border-color: #E5E0F0;
    --border-purple: rgba(147, 51, 234, 0.15);

    --shadow-sm: 0 2px 8px rgba(100, 60, 150, 0.08);
    --shadow-md: 0 6px 22px rgba(100, 60, 150, 0.1);
    --shadow-lg: 0 12px 40px rgba(100, 60, 150, 0.14);
    --shadow-glow: 0 0 25px var(--color-primary-glow);
    --shadow-card: 0 4px 16px rgba(100, 60, 150, 0.07);
    --shadow-card-hover: 0 10px 30px rgba(100, 60, 150, 0.15);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 100px;

    --header-height: 80px;
    --sidebar-width: 200px;
    --max-width: 1400px;
    --content-max: 900px;

    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--bg-light);
    overflow-x: hidden;
}

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

a {
    color: var(--text-purple);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

[id] {
    scroll-margin-top: calc(var(--header-height) + 20px);
}

.hidden {
    display: none !important;
}

/* ============================================
   HEADER — Sky-blue gradient (Purble Place style)
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-header);
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(100, 60, 150, 0.15);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 28px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    border: 3px solid var(--bg-white);
    box-shadow: 0 3px 10px rgba(100, 60, 150, 0.2);
}

.site-name {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    color: var(--color-primary);
    letter-spacing: 0.01em;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

.main-nav {
    display: flex;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    color: var(--text-white);
    font-size: 1.05rem;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nav-link:hover {
    background: rgba(255,255,255,0.25);
    color: var(--text-white);
    transform: translateY(-1px);
}

.nav-cta {
    background: var(--color-primary);
    color: var(--text-white) !important;
    font-weight: 800;
    padding: 10px 26px;
    box-shadow: 0 4px 15px var(--color-primary-glow);
    text-shadow: none;
}

.nav-cta:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--color-primary-glow);
}

/* Hamburger */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    z-index: 1001;
}

.hamburger-line {
    width: 26px;
    height: 3px;
    background: var(--text-white);
    border-radius: 3px;
    transition: transform var(--transition-base), opacity var(--transition-base);
    transform-origin: center;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================
   GAME SECTION
   ============================================ */
.game-section {
    background: var(--bg-game-section);
    padding-top: calc(var(--header-height) + 24px);
    padding-bottom: 48px;
    position: relative;
    overflow: hidden;
}

/* Decorative background shapes */
.game-section::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(147,51,234,0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.game-section::after {
    content: '';
    position: absolute;
    bottom: -250px;
    left: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(192,132,252,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.game-section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 28px;
    position: relative;
    z-index: 1;
}

.game-title {
    text-align: center;
    font-family: var(--font-heading);
    color: var(--text-white);
    font-size: 2.6rem;
    font-weight: 400;
    margin-bottom: 6px;
    text-shadow: 0 2px 15px rgba(0,0,0,0.25);
}

.game-subtitle {
    text-align: center;
    color: var(--color-primary-light);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 28px;
}

.game-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr var(--sidebar-width);
    gap: 18px;
    align-items: start;
}

/* --- Sidebars --- */
.game-sidebar {
    display: flex;
    flex-direction: column;
}

.sidebar-heading {
    color: var(--color-yellow);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    padding-left: 8px;
}

.sidebar-games {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-md);
    text-decoration: none;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
    transition: background var(--transition-fast), transform var(--transition-bounce), box-shadow var(--transition-fast);
}

.sidebar-card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(4px) scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.game-card-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.game-card-thumb[data-game="crazy-chicken"] {
    background: linear-gradient(135deg, #FF6B35, #FF9A3D);
}

.game-card-thumb[data-game="cheese-chompers"] {
    background: linear-gradient(135deg, #FFD600, #FFF176);
}

.game-card-name {
    color: var(--text-light);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
}

/* --- Main Game Area --- */
.game-main {
    min-width: 0;
}

.game-iframe-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    background: #0a0a1a;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border: 3px solid rgba(147,51,234,0.25);
}

.game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Loading overlay */
.game-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 16, 64, 0.96);
    z-index: 10;
    transition: opacity 0.5s ease;
}

.game-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    padding: 24px;
}

.loader-cards {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.loader-card {
    width: 26px;
    height: 38px;
    border-radius: 5px;
    animation: cardBounce 1.2s infinite ease-in-out;
}

.loader-card-red { background: #F472B6; animation-delay: 0s; }
.loader-card-blue { background: var(--color-primary); animation-delay: 0.15s; }
.loader-card-green { background: var(--color-green); animation-delay: 0.3s; }
.loader-card-yellow { background: var(--color-yellow); animation-delay: 0.45s; }

@keyframes cardBounce {
    0%, 80%, 100% { transform: translateY(0) rotate(0); }
    40% { transform: translateY(-18px) rotate(-5deg); }
}

.loader-progress-bar {
    width: 260px;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 14px;
}

.loader-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-yellow));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.loader-percentage {
    color: var(--text-white);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.loader-tip {
    color: var(--color-primary-light);
    font-size: 0.95rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Game error */
.game-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 16, 64, 0.96);
    z-index: 11;
}

.error-content {
    text-align: center;
}

.error-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 18px;
}

.error-text {
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 22px;
}

.retry-btn {
    background: var(--color-primary);
    color: var(--text-white);
    font-size: 1.1rem;
    font-weight: 700;
    padding: 14px 36px;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 15px var(--color-primary-glow);
    transition: background var(--transition-fast), transform var(--transition-bounce);
}

.retry-btn:hover {
    background: var(--color-primary-dark);
    transform: scale(1.06);
}

/* Fullscreen button */
.fullscreen-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(0,0,0,0.55);
    color: var(--text-white);
    padding: 10px;
    border-radius: var(--radius-sm);
    z-index: 5;
    transition: background var(--transition-fast), transform var(--transition-bounce);
    line-height: 0;
}

.fullscreen-btn:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.15);
}

/* --- Bottom Games --- */
.bottom-games {
    margin-top: 40px;
}

.bottom-games-heading {
    color: var(--text-light);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 18px;
    padding-left: 4px;
}

.bottom-games-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.bottom-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    border-radius: var(--radius-md);
    padding: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform var(--transition-bounce), background var(--transition-fast), box-shadow var(--transition-fast);
}

.bottom-card:hover {
    transform: translateY(-6px) scale(1.03);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.bottom-card .game-card-thumb {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.bottom-card .game-card-name {
    font-size: 0.88rem;
    text-align: center;
}

/* Game card colors */
.game-card-thumb[data-game="uno-card"] { background: linear-gradient(135deg, #EF4444, #F97316); }
.game-card-thumb[data-game="crazy-chicken"] { background: linear-gradient(135deg, #FF6B35, #FF9A3D); }
.game-card-thumb[data-game="crazy-cattle"] { background: linear-gradient(135deg, #10B981, #6EE7B7); }
.game-card-thumb[data-game="escape-road"] { background: linear-gradient(135deg, #3B82F6, #60A5FA); }
.game-card-thumb[data-game="purble-place"] { background: linear-gradient(135deg, #8B5CF6, #C084FC); }
.game-card-thumb[data-game="block-breaker"] { background: linear-gradient(135deg, #EC4899, #F472B6); }
.game-card-thumb[data-game="brick-breaker"] { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
.game-card-thumb[data-game="sprunki-wenda"] { background: linear-gradient(135deg, #14B8A6, #2DD4BF); }
.game-card-thumb[data-game="sprunki-pyramixed"] { background: linear-gradient(135deg, #6366F1, #818CF8); }
.game-card-thumb[data-game="sprunki-retake"] { background: linear-gradient(135deg, #EF4444, #F87171); }
.game-card-thumb[data-game="sprunki-deluxe"] { background: linear-gradient(135deg, #D946EF, #F0ABFC); }
.game-card-thumb[data-game="sprunked"] { background: linear-gradient(135deg, #0EA5E9, #38BDF8); }
.game-card-thumb[data-game="sprunki-remastered"] { background: linear-gradient(135deg, #F97316, #FB923C); }

/* ============================================
   SEO CONTENT SECTION — Light backgrounds
   ============================================ */
.content-section {
    background: var(--bg-white);
}

.content-block {
    padding: 72px 28px;
}

.content-block:nth-child(even) {
    background: var(--bg-lighter);
}

.content-container {
    max-width: var(--content-max);
    margin: 0 auto;
}

.content-heading {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--color-primary);
    margin-bottom: 22px;
    line-height: 1.25;
}

.content-block p {
    color: var(--text-body);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 18px;
}

.content-block p:last-child {
    margin-bottom: 0;
}

/* --- Features Grid (Purble Place card style) --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin: 36px 0;
}

.feature-item {
    background: var(--bg-white);
    border: none;
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-bounce), box-shadow var(--transition-fast);
}

.feature-item::before {
    display: none;
}

.feature-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin: 0 auto 18px;
    box-shadow: 0 4px 14px var(--color-primary-glow);
}

.feature-item h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.feature-item p {
    font-size: 0.97rem;
    margin-bottom: 0;
    text-align: center;
}

/* --- Steps --- */
.steps-list {
    margin: 32px 0;
}

.step-item {
    display: flex;
    gap: 18px;
    padding: 22px 0;
    border-bottom: 1px solid var(--border-color);
}

.step-item:last-child {
    border-bottom: none;
}

.step-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: var(--text-white);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 3px 10px var(--color-primary-glow);
}

.step-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.step-content p {
    font-size: 1rem;
    margin-bottom: 0;
}

/* --- Tips List --- */
.tips-list {
    list-style: disc;
    padding-left: 24px;
    margin: 18px 0;
}

.tips-list li {
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 8px;
    font-size: 1rem;
}

/* --- Why Grid --- */
.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 32px 0;
}

.why-item {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-bounce), box-shadow var(--transition-fast);
}

.why-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.why-item h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.why-item p {
    font-size: 1rem;
}

/* --- FAQ --- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-fast);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-item[open] {
    box-shadow: var(--shadow-md);
}

.faq-item summary {
    padding: 20px 56px 20px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-body);
    color: var(--text-dark);
    cursor: pointer;
    position: relative;
    list-style: none;
    line-height: 1.4;
    transition: background var(--transition-fast);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    transition: transform var(--transition-base);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item summary:hover {
    background: var(--bg-lighter);
}

.faq-answer {
    padding: 0 24px 20px;
}

.faq-answer p {
    font-size: 1rem;
    margin-bottom: 0;
}

/* ============================================
   FOOTER — Rich purple with wave (Purble Place style)
   ============================================ */
.site-footer {
    background: var(--bg-purple);
    position: relative;
    padding-top: 0;
}

.footer-wave {
    width: 100%;
    height: 50px;
    background: var(--bg-purple);
    position: relative;
    overflow: hidden;
}

.footer-wave::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 50px;
    background: var(--bg-white);
    border-radius: 0 0 50% 50%;
}

.blog-preview-section + .site-footer .footer-wave::before {
    background: var(--bg-light);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 40px 0 36px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-logo-link {
    display: inline-block;
    margin-bottom: 14px;
}

.footer-logo-img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    border: 3px solid var(--text-white);
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

.footer-brand-name {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--text-white);
    font-weight: 400;
    margin-bottom: 10px;
}

.footer-brand-desc {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-col-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-white);
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--color-orange);
    border-radius: 2px;
}

.footer-col-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col-list a {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.footer-col-list a:hover {
    color: var(--text-white);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

/* Legacy footer (simple) - kept for backward compatibility */
.footer-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    padding: 30px 0 12px;
}

.copyright {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
}

.footer-links a {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--text-white);
}

.footer-divider {
    color: rgba(255,255,255,0.25);
    margin: 0 6px;
}

.footer-notice {
    color: rgba(255,255,255,0.55);
    font-size: 0.85rem;
    padding-bottom: 20px;
    text-align: center;
}

/* ============================================
   BLOG SECTION (Homepage)
   ============================================ */
.blog-preview-section {
    background: var(--bg-light);
    padding: 72px 28px;
}

.blog-preview-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 12px;
}

.section-subheading {
    text-align: center;
    color: var(--text-body);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 36px;
}

.blog-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-bounce), box-shadow var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

.blog-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: linear-gradient(135deg, #9333EA, #C084FC);
}

.blog-card-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-tag {
    display: inline-block;
    background: rgba(147,51,234,0.1);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    align-self: flex-start;
}

.blog-card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.blog-card-excerpt {
    color: var(--text-body);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

.blog-card-meta {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.blog-view-all {
    text-align: center;
}

.btn-fun {
    display: inline-block;
    background: var(--color-primary);
    color: var(--text-white);
    font-size: 1.05rem;
    font-weight: 700;
    padding: 14px 36px;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 15px var(--color-primary-glow);
    transition: background var(--transition-fast), transform var(--transition-bounce), box-shadow var(--transition-fast);
    text-decoration: none;
}

.btn-fun:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--color-primary-glow);
    color: var(--text-white);
}

.btn-primary {
    background: var(--color-primary);
    box-shadow: 0 4px 15px var(--color-primary-glow);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 6px 20px var(--color-primary-glow);
}

/* ============================================
   PAGE LAYOUT (Legal Pages, Blog Pages)
   ============================================ */
.page-hero {
    background: var(--bg-header);
    padding-top: calc(var(--header-height) + 48px);
    padding-bottom: 48px;
    text-align: center;
    position: relative;
}

.page-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.7rem;
    font-weight: 400;
    color: var(--color-primary);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.4);
}

.page-hero p {
    color: var(--text-white);
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.page-content {
    background: var(--bg-white);
    padding: 60px 28px;
}

.page-container {
    max-width: var(--content-max);
    margin: 0 auto;
}

.page-container h2 {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 400;
    color: var(--color-primary);
    margin-top: 40px;
    margin-bottom: 16px;
    line-height: 1.3;
}

.page-container h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--color-primary);
    margin-top: 28px;
    margin-bottom: 12px;
}

.page-container p {
    color: var(--text-body);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.page-container ul,
.page-container ol {
    color: var(--text-body);
    font-size: 1.05rem;
    line-height: 1.8;
    padding-left: 28px;
    margin-bottom: 18px;
}

.page-container ul {
    list-style: disc;
}

.page-container ol {
    list-style: decimal;
}

.page-container li {
    margin-bottom: 6px;
}

/* Back to home link for sub-pages */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-white);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 20px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--color-primary-light);
}

/* ============================================
   BLOG LIST PAGE
   ============================================ */
.blog-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
}

/* ============================================
   BLOG POST PAGE
   ============================================ */
.blog-post-hero {
    background: var(--bg-header);
    padding-top: calc(var(--header-height) + 48px);
    padding-bottom: 40px;
    text-align: center;
    position: relative;
}

.blog-post-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--color-primary);
    max-width: 800px;
    margin: 0 auto 12px;
    line-height: 1.25;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.4);
}

.blog-post-meta {
    color: var(--text-white);
    font-size: 0.95rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.blog-post-content {
    background: var(--bg-white);
    padding: 56px 28px;
}

.blog-post-container {
    max-width: var(--content-max);
    margin: 0 auto;
}

.blog-post-container h2 {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 400;
    color: var(--color-primary);
    margin-top: 40px;
    margin-bottom: 16px;
}

.blog-post-container h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--color-primary);
    margin-top: 28px;
    margin-bottom: 12px;
}

.blog-post-container p {
    color: var(--text-body);
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 18px;
}

.blog-post-container ul,
.blog-post-container ol {
    color: var(--text-body);
    font-size: 1.05rem;
    line-height: 1.85;
    padding-left: 28px;
    margin-bottom: 18px;
}

.blog-post-container ul {
    list-style: disc;
}

.blog-post-container ol {
    list-style: decimal;
}

.blog-post-container li {
    margin-bottom: 8px;
}

.blog-post-container img {
    border-radius: var(--radius-lg);
    margin: 28px 0;
    box-shadow: var(--shadow-md);
}

.blog-post-container a {
    color: var(--text-purple);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(147,51,234,0.3);
    text-underline-offset: 3px;
}

.blog-post-container a:hover {
    color: var(--color-primary);
    text-decoration-color: var(--color-primary);
}

/* Blog CTA box */
.blog-cta-box {
    background: linear-gradient(135deg, var(--color-primary), #C084FC);
    border-radius: var(--radius-lg);
    padding: 36px;
    text-align: center;
    margin: 40px 0;
}

.blog-cta-box h3 {
    color: var(--text-white);
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 10px;
    margin-top: 0;
}

.blog-cta-box p {
    color: rgba(255,255,255,0.9);
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.blog-cta-box .btn-fun {
    background: var(--text-white);
    color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.blog-cta-box .btn-fun:hover {
    background: #f0f0f0;
    color: var(--color-primary-dark);
}

/* Related posts */
.related-posts {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 2px solid var(--border-color);
}

.related-posts h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-bottom: 24px;
    margin-top: 0;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.related-post-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: var(--bg-lighter);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: transform var(--transition-bounce), box-shadow var(--transition-fast);
}

.related-post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.related-post-card h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-dark);
    line-height: 1.3;
}

.related-post-card span {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.88rem;
}

/* Blog FAQ */
.blog-faq-section {
    margin: 40px 0;
    padding: 32px;
    background: var(--bg-lighter);
    border-radius: var(--radius-lg);
}

.blog-faq-section h2 {
    margin-top: 0;
}

.blog-faq-section details {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
}

.blog-faq-section summary {
    padding: 18px 52px 18px 22px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    position: relative;
    list-style: none;
}

.blog-faq-section summary::-webkit-details-marker {
    display: none;
}

.blog-faq-section summary::after {
    content: '+';
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-primary);
}

.blog-faq-section details[open] summary::after {
    content: '−';
}

.blog-faq-section details p {
    padding: 0 22px 18px;
    margin-bottom: 0;
}

/* ============================================
   GAME-SECTION FULLSCREEN
   ============================================ */
.game-iframe-wrapper.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding-bottom: 0;
    border-radius: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.game-iframe-wrapper.is-fullscreen .fullscreen-btn {
    bottom: 20px;
    right: 20px;
}

/* ============================================
   RESPONSIVE — Tablet ≤ 1100px
   ============================================ */
@media (max-width: 1100px) {
    .game-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .game-sidebar { order: 2; }
    .game-sidebar-left { order: 2; }
    .game-sidebar-right { order: 3; }
    .game-main { order: 1; }

    .sidebar-games {
        flex-direction: row;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-card {
        flex-direction: column;
        min-width: 110px;
        text-align: center;
        gap: 8px;
        padding: 12px;
    }

    .sidebar-card:hover {
        transform: translateY(-3px) scale(1.02);
    }

    .bottom-games-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-list-grid {
        grid-template-columns: 1fr;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

/* ============================================
   RESPONSIVE — Mobile ≤ 768px
   ============================================ */
@media (max-width: 768px) {
    :root {
        --header-height: 64px;
        --sidebar-width: 100%;
    }

    body {
        font-size: 16px;
    }

    .logo-img {
        width: 42px;
        height: 42px;
    }

    .site-name {
        font-size: 1.5rem;
    }

    /* Hamburger visible */
    .hamburger-btn {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: rgba(50, 20, 100, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 20px 28px;
        transform: translateY(-110%);
        opacity: 0;
        visibility: hidden;
        transition: transform var(--transition-base), opacity var(--transition-base), visibility var(--transition-base);
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: 6px;
    }

    .nav-link {
        display: block;
        padding: 14px 18px;
        font-size: 1.05rem;
        border-radius: var(--radius-sm);
    }

    .nav-cta {
        text-align: center;
        margin-top: 6px;
    }

    /* Game section */
    .game-title {
        font-size: 1.85rem;
    }

    .game-subtitle {
        font-size: 1rem;
        margin-bottom: 18px;
    }

    .game-iframe-wrapper {
        border-radius: var(--radius-md);
    }

    .bottom-games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .bottom-card .game-card-thumb {
        font-size: 1.6rem;
    }

    /* Content */
    .content-block {
        padding: 48px 22px;
    }

    .content-heading {
        font-size: 1.75rem;
    }

    .features-grid,
    .why-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .step-item {
        gap: 14px;
    }

    .step-number {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .section-heading {
        font-size: 1.75rem;
    }

    /* Pages */
    .page-hero h1 {
        font-size: 2.1rem;
    }

    .blog-post-hero h1 {
        font-size: 1.95rem;
    }

    .page-container h2,
    .blog-post-container h2 {
        font-size: 1.4rem;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-main {
        flex-direction: column;
        gap: 12px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* ============================================
   RESPONSIVE — Small mobile ≤ 480px
   ============================================ */
@media (max-width: 480px) {
    .game-section-inner {
        padding: 0 14px;
    }

    .bottom-games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .game-title {
        font-size: 1.55rem;
    }

    .content-heading {
        font-size: 1.5rem;
    }

    .feature-item {
        padding: 24px 18px;
    }

    .faq-item summary {
        padding: 16px 46px 16px 18px;
        font-size: 1rem;
    }

    .page-hero h1 {
        font-size: 1.75rem;
    }

    .blog-post-hero h1 {
        font-size: 1.6rem;
    }

    .blog-cta-box {
        padding: 28px 22px;
    }
}
