/* ============================================
   Dubai7 Casino Theme - Main Stylesheet
   Mobile-First, Magazine/Blog Style
   ============================================ */

/* CSS Variables */
:root {
    /* Colors - Casino Theme */
    --color-primary: #D4AF37;
    --color-primary-dark: #B8941F;
    --color-secondary: #1A1A2E;
    --color-accent: #E94560;
    --color-accent-alt: #667eea;
    
    /* Text Colors */
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-inverse: #FFFFFF;
    
    /* Background Colors */
    --color-bg: #FFFFFF;
    --color-bg-alt: #F5F5F5;
    --color-bg-dark: #1A1A2E;
    
    /* Border */
    --color-border: #E0E0E0;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-heading: "Montserrat", "Arial Black", sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Container */
    --container-mobile: 100%;
    --container-tablet: 720px;
    --container-desktop: 1200px;
    --container-wide: 1440px;
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 隱藏 body 開頭的文字節點（來自 code injection 的多餘字元） */
body::before {
    content: none;
}

body > style:first-child::before {
    display: none;
}

/* Skip Link - 隱藏但保持可訪問性 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
}

.skip-link:focus {
    top: 0;
    opacity: 1;
    pointer-events: auto;
}

/* Visually Hidden */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

/* Container */
.container {
    width: var(--container-mobile);
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* ============================================
   Header Styles
   ============================================ */

.site-header {
    background: var(--color-bg-dark);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
}

.site-logo {
    color: var(--color-text-inverse);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.logo-image {
    height: 4rem;
    width: auto;
}

/* Mobile Menu Toggle - 只在手機版顯示 */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hamburger-icon span {
    width: 24px;
    height: 2px;
    background: var(--color-text-inverse);
    transition: all 0.3s ease;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-left: auto;
}

.social-links {
    display: none;
}

@media (min-width: 1024px) {
    .social-links {
        display: flex;
        gap: var(--spacing-xs);
    }
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-text-inverse);
    text-decoration: none;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.social-icon {
    width: 20px;
    height: 20px;
}

.search-toggle {
    display: none;
}

@media (min-width: 1024px) {
    .search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        color: var(--color-text-inverse);
        cursor: pointer;
        border-radius: 50%;
        transition: background-color 0.2s ease;
    }

    .search-toggle:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

.search-icon {
    width: 20px;
    height: 20px;
}

/* ============================================
   Navigation Styles
   ============================================ */

.main-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (min-width: 1024px) {
    .main-navigation {
        display: block !important;
        position: static;
        background: transparent;
        box-shadow: none;
        flex: 1;
        max-width: 600px;
    }
}

.main-navigation[aria-hidden="false"] {
    display: block;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .nav-list {
        flex-direction: row;
        align-items: center;
        gap: 0.25rem;
        justify-content: center;
    }
}

.nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 1024px) {
    .nav-item {
        border-bottom: none;
        position: relative;
    }
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm);
    color: var(--color-text-inverse);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 44px;
    position: relative;
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--font-primary);
}

@media (min-width: 1024px) {
    .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 4px;
        width: auto;
    }
}

.nav-link:hover,
.nav-link:focus {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-primary);
}

/* Dropdown Menu */
.nav-item--has-dropdown {
    position: relative;
}

.nav-link--dropdown {
    justify-content: space-between;
}

.dropdown-icon {
    width: 12px;
    height: 12px;
    margin-left: var(--spacing-xs);
    transition: transform 0.2s ease;
}

.nav-item--has-dropdown[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(26, 26, 46, 0.95);
}

@media (min-width: 1024px) {
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 220px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border-radius: 4px;
        margin-top: 0;
        background: var(--color-bg);
        border: 1px solid var(--color-border);
    }
}

.nav-item--has-dropdown[aria-expanded="true"] .dropdown-menu {
    display: block;
}

@media (min-width: 1024px) {
    .nav-item--has-dropdown:hover .dropdown-menu,
    .nav-item--has-dropdown:focus-within .dropdown-menu {
        display: block;
    }
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem var(--spacing-sm);
    color: var(--color-text-inverse);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    font-size: 0.9375rem;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

@media (min-width: 1024px) {
    .dropdown-menu a {
        color: var(--color-text);
        border-bottom: 1px solid var(--color-border);
    }
    
    .dropdown-menu a:hover {
        background: var(--color-primary);
        color: var(--color-text-inverse);
    }
    
    .dropdown-menu li:first-child a {
        border-radius: 4px 4px 0 0;
    }
    
    .dropdown-menu li:last-child a {
        border-radius: 0 0 4px 4px;
        border-bottom: none;
    }
}

/* Mobile Search in Navigation */
.nav-item--mobile-only {
    display: block;
}

@media (min-width: 1024px) {
    .nav-item--mobile-only {
        display: none !important;
    }
}

.search-toggle-mobile {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.search-toggle-mobile .search-icon {
    width: 20px;
    height: 20px;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    min-height: 44px;
    text-align: center;
}

.btn-login {
    background: var(--color-accent);
    color: var(--color-text-inverse);
}

.btn-login:hover {
    background: #d6304a;
    transform: translateY(-2px);
}

.btn-hero {
    background: var(--color-accent);
    color: var(--color-text-inverse);
    font-size: 1.125rem;
    padding: 1rem 2rem;
}

.btn-hero:hover {
    background: #d6304a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
}

.btn-primary {
    background: var(--color-secondary);
    color: var(--color-text-inverse);
}

.btn-primary:hover {
    background: #0f0f1e;
}

.btn-link {
    background: transparent;
    color: var(--color-secondary);
    border: 2px solid var(--color-secondary);
}

.btn-link:hover {
    background: var(--color-secondary);
    color: var(--color-text-inverse);
}

/* Mobile Only */
.mobile-only {
    display: block;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
}

/* Desktop Only */
.desktop-only {
    display: none;
}

@media (min-width: 1024px) {
    .desktop-only {
        display: inline-block;
    }
}

.btn-signup {
    background: var(--color-primary);
    color: var(--color-secondary);
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-signup:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* ============================================
   Hero Section (Default Style)
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--color-text-inverse);
    padding: var(--spacing-xl) var(--spacing-sm);
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .hero-section {
        min-height: 500px;
        padding: var(--spacing-xl) var(--spacing-md);
    }
}

.hero-container {
    max-width: var(--container-wide);
    margin: 0 auto;
    width: 100%;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4rem;
    }
}

.hero-title-line {
    display: block;
    color: var(--color-text-inverse);
}

.hero-title-accent {
    display: block;
    color: var(--color-accent);
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

/* ============================================
   Dubai7 Introduction Section
   ============================================ */

.dubai7-intro {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #16213e 75%, #1a1a2e 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    color: var(--color-text-inverse);
    padding: var(--spacing-lg) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.intro-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.intro-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-inverse);
}

@media (min-width: 768px) {
    .intro-title {
        font-size: 2.25rem;
    }
}

@media (min-width: 1024px) {
    .intro-title {
        font-size: 2.5rem;
    }
}

.intro-description {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

@media (min-width: 768px) {
    .intro-description {
        font-size: 1.25rem;
    }
}

.intro-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .intro-actions {
        flex-direction: row;
        gap: var(--spacing-md);
    }
}

.btn-download {
    background: rgba(233, 69, 96, 0.3);
    color: var(--color-text-inverse);
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-download:hover {
    background: rgba(233, 69, 96, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-signup-large {
    background: rgba(212, 175, 55, 0.3);
    color: var(--color-text-inverse);
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-signup-large:hover {
    background: rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Highlight Header Style
   ============================================ */

.header-highlight {
    background: var(--color-bg-alt);
    padding: var(--spacing-md) 0;
}

.highlight-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

@media (min-width: 1024px) {
    .highlight-grid {
        grid-template-columns: 3fr 1fr 1fr;
        gap: var(--spacing-md);
    }
}

.highlight-main {
    grid-column: 1 / -1;
}

@media (min-width: 1024px) {
    .highlight-main {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }
}

.highlight-main .post-card {
    height: 100%;
}

.highlight-main .post-card__image {
    aspect-ratio: 16 / 10;
}

@media (min-width: 1024px) {
    .highlight-main .post-card__image {
        aspect-ratio: 16 / 9;
    }
}

.highlight-main .post-card__title {
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .highlight-main .post-card__title {
        font-size: 1.75rem;
    }
}

@media (min-width: 1024px) {
    .highlight-main .post-card__title {
        font-size: 2rem;
    }
}

.highlight-secondary {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

@media (min-width: 768px) {
    .highlight-secondary {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .highlight-secondary {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        grid-template-columns: 1fr;
    }
}

.highlight-secondary .post-card__title {
    font-size: 1rem;
    margin-top: 0;
}

@media (min-width: 1024px) {
    .highlight-secondary .post-card__title {
        font-size: 1.125rem;
    }
}

.highlight-secondary .post-card__excerpt {
    display: none;
}

.highlight-secondary .post-card__content {
    padding: 0.5rem 1rem;
}

.highlight-secondary .post-card:last-child .post-card__image-link {
    display: none;
}

@media (min-width: 1024px) {
    .highlight-secondary .post-card:last-child .post-card__image-link {
        display: none;
    }
}

.highlight-sidebar {
    grid-column: 1 / -1;
}

@media (min-width: 1024px) {
    .highlight-sidebar {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
    }
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--color-secondary);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--color-primary);
}

.sidebar-posts {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.sidebar-post {
    background: var(--color-bg);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-post:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-post-link {
    display: flex;
    gap: var(--spacing-xs);
    text-decoration: none;
    color: var(--color-text);
    padding: var(--spacing-xs);
}

.sidebar-post-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 4px;
}

.sidebar-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-post-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--color-secondary);
}

.sidebar-post-title:hover {
    color: var(--color-accent);
}

.sidebar-post .post-card__tag {
    font-size: 0.75rem;
    margin: 0;
    color: var(--color-accent);
    font-weight: 600;
}

.sidebar-post .post-card__meta {
    font-size: 0.7rem;
    color: var(--color-text-light);
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
}

.sidebar-post .post-card__author {
    display: none;
}

@media (min-width: 1024px) {
    .sidebar-post .post-card__author {
        display: inline;
    }
}

/* ============================================
   Magazine Header Style
   ============================================ */

.header-magazine {
    background: var(--color-bg);
    padding: var(--spacing-md) 0;
}

.magazine-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .magazine-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .magazine-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
}

.magazine-featured {
    grid-column: 1 / -1;
}

@media (min-width: 1024px) {
    .magazine-featured {
        grid-column: 1 / 3;
        grid-row: 1 / 3;
    }
}

.magazine-featured .post-card {
    height: 100%;
}

.magazine-featured .post-card__image {
    aspect-ratio: 16 / 9;
}

.magazine-featured .post-card__title {
    font-size: 1.75rem;
}

@media (min-width: 768px) {
    .magazine-featured .post-card__title {
        font-size: 2rem;
    }
}

.magazine-left,
.magazine-right {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .magazine-left,
    .magazine-right {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .magazine-left {
        grid-column: 3 / 4;
        grid-row: 1 / 3;
        grid-template-columns: 1fr;
    }
    
    .magazine-right {
        grid-column: 4 / 5;
        grid-row: 1 / 3;
        grid-template-columns: 1fr;
    }
}

.magazine-left .post-card__title,
.magazine-right .post-card__title {
    font-size: 1.125rem;
}

.magazine-left .post-card__excerpt,
.magazine-right .post-card__excerpt {
    display: none;
}

@media (min-width: 1024px) {
    .magazine-left .post-card__excerpt,
    .magazine-right .post-card__excerpt {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ============================================
   Sections
   ============================================ */

section {
    padding: var(--spacing-lg) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--color-secondary);
}

.title-accent {
    color: var(--color-accent);
}

.section-title--accent {
    color: var(--color-accent);
}

.section-description {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
}

/* Steps Section */
.steps-section {
    background: var(--color-bg-alt);
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.step-card {
    background: var(--color-bg);
    padding: var(--spacing-md);
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.step-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--color-secondary);
}

.step-description {
    color: var(--color-text-light);
    line-height: 1.6;
}

/* Promotions Section */
.promotions-section {
    background: var(--color-bg);
    overflow: hidden;
}

.promo-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    align-items: center;
}

@media (min-width: 1024px) {
    .promo-content {
        grid-template-columns: 1fr 1fr;
    }
}

.promo-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md);
}

@media (min-width: 1024px) {
    .promo-image {
        order: -1;
    }
}

.roulette-wheel {
    width: 100%;
    max-width: 400px;
    height: auto;
    transition: transform 0.1s ease-out;
}

/* 輪盤旋轉動畫 */
@keyframes spin-roulette {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(1440deg); /* 4 圈 */
    }
}

@keyframes spin-slow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 桌面版：hover 按鈕時輪盤旋轉 */
@media (min-width: 1024px) {
    .promo-content:hover .roulette-wheel {
        animation: spin-roulette 3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
    }
    
    .btn-promo:hover ~ .promo-image .roulette-wheel,
    .promo-text:has(.btn-promo:hover) ~ .promo-image .roulette-wheel {
        animation: spin-roulette 3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
    }
}

/* 手機版：hover 整個區域時輪盤旋轉 */
@media (max-width: 1023px) {
    .promotions-section:hover .roulette-wheel,
    .promotions-section:active .roulette-wheel {
        animation: spin-roulette 3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
    }
}

.promo-text {
    text-align: center;
}

@media (min-width: 1024px) {
    .promo-text {
        text-align: left;
    }
}

/* Statistics Section */
.stats-section {
    background: var(--color-secondary);
    color: var(--color-text-inverse);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Games Section */
.games-section {
    background: var(--color-bg);
}

.games-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Post Card */
.post-card {
    background: var(--color-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.post-card__image-link {
    display: block;
    overflow: hidden;
}

.post-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card__image {
    transform: scale(1.05);
}

.post-card__content {
    padding: 1rem 2rem;
}

.post-card__tag {
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
}

.post-card__tag a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
}

.post-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: var(--spacing-sm) 0;
    line-height: 1.3;
}

.post-card__title a {
    color: var(--color-secondary);
    text-decoration: none;
}

.post-card__title a:hover {
    color: var(--color-accent);
}

.post-card__excerpt {
    color: var(--color-text-light);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.post-card__meta {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.post-card__read-more {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
}

.post-card__read-more:hover {
    text-decoration: underline;
}

/* Blog Section */
.blog-section {
    background: var(--color-bg-alt);
}

.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Partners Section */
.partners-section {
    background: var(--color-bg);
    padding: var(--spacing-md) 0;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    align-items: center;
}

@media (min-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ============================================
   FAQ Section
   ============================================ */

.faq-section {
    background: var(--color-bg-alt);
    padding: var(--spacing-lg) 0;
}

.faq-grid {
    display: grid;
    gap: var(--spacing-lg);
}

.faq-preview {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    align-items: center;
    background: var(--color-bg);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .faq-preview {
        grid-template-columns: 1fr 2fr;
    }
}

.faq-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.faq-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.faq-excerpt {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--color-text);
}

.faq-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .faq-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

.faq-item {
    background: var(--color-bg);
    padding: var(--spacing-md);
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.faq-question {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--color-secondary);
    line-height: 1.4;
}

.faq-answer {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-light);
    margin: 0;
}

.faq-cta {
    text-align: center;
    margin-top: var(--spacing-md);
}

.faq-cta .btn-link {
    font-size: 1.125rem;
    padding: 1rem 2rem;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    background: var(--color-secondary);
    color: var(--color-text-inverse);
    padding: var(--spacing-lg) 0 var(--spacing-sm);
}

.footer-container {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-newsletter {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .footer-newsletter {
        grid-column: auto;
    }
}

.newsletter-form {
    margin-top: var(--spacing-sm);
}

.form-group {
    display: flex;
    gap: var(--spacing-xs);
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-inverse);
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-sm);
    text-align: center;
    font-size: 0.875rem;
}

.copyright {
    margin-bottom: var(--spacing-xs);
    opacity: 0.8;
}

.disclaimer {
    opacity: 0.7;
}

.disclaimer a {
    color: var(--color-primary);
    text-decoration: none;
}

/* ============================================
   Koenig Editor Styles (Required)
   ============================================ */

/* Wide width images - 85% of viewport width */
.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin-left: auto;
    margin-right: auto;
    transform: translateX(calc((100% - 85vw) / 2));
    max-width: 1200px;
}

@media (max-width: 767px) {
    .kg-width-wide {
        width: 100%;
        transform: none;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Full width images - 100% of viewport width */
.kg-width-full {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    transform: translateX(calc(50vw - 50%));
}

@media (max-width: 767px) {
    .kg-width-full {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        transform: none;
    }
}

/* Ensure images in content are responsive */
.post-content img,
.page-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: var(--spacing-md) auto;
}

.post-content .kg-width-wide img,
.page-content .kg-width-wide img {
    width: 100%;
}

.post-content .kg-width-full img,
.page-content .kg-width-full img {
    width: 100%;
}

/* ============================================
   Post & Page Article Styles
   ============================================ */

.post-article,
.page-article {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-sm);
}

@media (min-width: 768px) {
    .post-article,
    .page-article {
        padding: var(--spacing-lg) var(--spacing-md);
    }
}

.post-header,
.page-header {
    margin-bottom: var(--spacing-md);
}

.post-tag {
    margin-bottom: var(--spacing-xs);
}

.post-tag a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.post-title,
.page-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--color-secondary);
}

@media (min-width: 768px) {
    .post-title,
    .page-title {
        font-size: 2.5rem;
    }
}

.post-meta {
    display: flex;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--color-text-light);
    flex-wrap: wrap;
}

.post-author a {
    color: var(--color-accent);
    text-decoration: none;
}

.post-feature-image,
.page-feature-image {
    margin-bottom: var(--spacing-md);
    border-radius: 8px;
    overflow: hidden;
}

.post-feature-image img,
.page-feature-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content,
.page-content {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--color-text);
}

.post-content p,
.page-content p {
    margin-bottom: var(--spacing-md);
}

.post-content h2,
.page-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--color-secondary);
}

.post-content h3,
.page-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    color: var(--color-secondary);
}

.post-content ul,
.post-content ol,
.page-content ul,
.page-content ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-md);
}

.post-content li,
.page-content li {
    margin-bottom: var(--spacing-xs);
}

.post-footer {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    align-items: center;
}

.tags-label {
    font-weight: 600;
    color: var(--color-text-light);
}

.tag-link {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-bg-alt);
    color: var(--color-accent);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.tag-link:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.related-posts {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--color-border);
}

.featured-section {
    background: var(--color-bg-alt);
    padding: var(--spacing-lg) 0;
}

/* ============================================
   Responsive Typography
   ============================================ */

@media (min-width: 768px) {
    html {
        font-size: 18px;
    }
}

/* ============================================
   Utility Classes
   ============================================ */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }


/* ============================================
   Contact Form Styles
   ============================================ */

.contact-form-wrapper {
    max-width: 600px;
    margin: var(--spacing-xl) auto;
    padding: var(--spacing-lg);
    background: var(--color-bg-alt);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
}

.form-group .required {
    color: var(--color-accent);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn-primary {
    padding: 0.875rem 2rem;
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    align-self: flex-start;
}

.contact-form .btn-primary:hover {
    background: var(--color-accent);
    transform: translateY(-1px);
}

.contact-form .btn-primary:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .contact-form-wrapper {
        padding: var(--spacing-md);
        margin: var(--spacing-md) 0;
    }
    
    .contact-form .btn-primary {
        width: 100%;
    }
}

/* ============================================
   Breadcrumbs Navigation
   ============================================ */

.breadcrumbs {
    padding: var(--spacing-sm) 0;
    margin-bottom: var(--spacing-md);
    background: transparent;
}

.breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumbs-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumbs-link {
    color: var(--color-text);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.breadcrumbs-link:hover {
    opacity: 1;
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-primary);
}

.breadcrumbs-separator {
    color: var(--color-text);
    opacity: 0.4;
    margin: 0 0.25rem;
    user-select: none;
}

.breadcrumbs-item--active {
    color: var(--color-text);
    font-weight: 500;
    opacity: 1;
}

.breadcrumbs-item--active span {
    padding: 0.25rem 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .breadcrumbs {
        padding: var(--spacing-xs) 0;
        margin-bottom: var(--spacing-sm);
    }
    
    .breadcrumbs-list {
        font-size: 0.8125rem;
        gap: 0.25rem;
    }
    
    .breadcrumbs-link,
    .breadcrumbs-item--active span {
        padding: 0.125rem 0.375rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .breadcrumbs-link:hover {
        background: rgba(212, 175, 55, 0.15);
    }
}

/* ============================================
   Table of Contents (TOC)
   ============================================ */

/* Post Layout with TOC Sidebar */
.post-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Desktop layout - TOC on the left side */
@media (min-width: 1200px) {
    .post-layout {
        grid-template-columns: 280px 1fr;
        gap: var(--spacing-xl);
        padding: 0 var(--spacing-lg);
    }
}

/* TOC Container */
.toc-container {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--spacing-md);
    order: 2;
}

/* Desktop - Sticky TOC on left */
@media (min-width: 1200px) {
    .toc-container {
        position: sticky;
        top: 100px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        align-self: start;
        order: 1;
    }
}

/* Mobile - TOC at top */
@media (max-width: 1199px) {
    .toc-container {
        order: 1;
        margin-bottom: var(--spacing-md);
    }
}

/* Article takes full width on mobile, constrained on desktop */
.post-article {
    order: 1;
    max-width: 100%;
}

@media (min-width: 1200px) {
    .post-article {
        order: 2;
        max-width: 800px;
    }
}

.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-border);
}

.toc-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-text);
}

.toc-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--color-text);
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toc-toggle:hover {
    opacity: 1;
}

.toc-toggle[aria-expanded="false"] .toc-toggle-icon {
    transform: rotate(-90deg);
}

.toc-nav {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.toc-container[data-collapsed="true"] .toc-nav {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-list li {
    margin: 0;
    padding: 0;
}

.toc-list a {
    display: block;
    padding: 0.5rem 0;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9375rem;
    line-height: 1.5;
    opacity: 0.8;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
}

.toc-list a:hover {
    opacity: 1;
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    padding-left: 1rem;
}

.toc-list a.active {
    opacity: 1;
    color: var(--color-primary);
    font-weight: 600;
    border-left-color: var(--color-primary);
    background: rgba(212, 175, 55, 0.05);
}

/* Nested headings indentation */
.toc-list .toc-h3 {
    padding-left: 1.5rem;
}

.toc-list .toc-h4 {
    padding-left: 2.25rem;
    font-size: 0.875rem;
}

.toc-list .toc-h5 {
    padding-left: 3rem;
    font-size: 0.8125rem;
}

.toc-list .toc-h6 {
    padding-left: 3.75rem;
    font-size: 0.8125rem;
}

/* Tablet - TOC collapsible */
@media (max-width: 1199px) {
    .toc-nav {
        max-height: 400px;
        overflow-y: auto;
    }
}

/* Hide TOC if no headings found */
.toc-container.toc-empty {
    display: none;
}

/* Smooth scroll behavior for TOC links */
html {
    scroll-behavior: smooth;
}

/* Add scroll padding to account for sticky header */
html {
    scroll-padding-top: 100px;
}
