/**
 * Components CSS - UI Components
 */

/* ==========================================================================
   HEADER
   ========================================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--color-bg-header);
    z-index: var(--z-fixed);
    box-shadow: var(--shadow-lg);
}

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

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-logo img {
    height: 40px;
    width: auto;
}

.header-logo-text {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.02em;
}

/* Navigation */
.nav-main {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text-white);
    font-weight: var(--font-medium);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
}

.nav-link svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.nav-item:hover .nav-link svg {
    transform: rotate(180deg);
}

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    padding: var(--space-sm);
    z-index: var(--z-dropdown);
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-link {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.nav-dropdown-link:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

.nav-dropdown-link.active {
    background: var(--color-primary);
    color: var(--color-bg-dark);
    font-weight: 600;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text-white);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ==========================================================================
   HERO SECTION - Layered Design
   ========================================================================== */

.hero {
    position: relative;
    overflow: hidden;
    margin-top: calc(var(--header-height) * -1);
}

/* Layer 1: Base gradient background */
.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        #4C1F7A 0%,
        #3A1860 35%,
        #2A1245 65%,
        #1a0a30 100%);
}

/* Layer 2: Ambient light spots */
.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 35% at 20% 20%, rgba(107, 47, 168, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 40% 30% at 85% 25%, rgba(255, 128, 0, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 35% 25% at 10% 70%, rgba(33, 155, 157, 0.08) 0%, transparent 50%);
}

/* Layer 3: Subtle texture */
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.025;
    mix-blend-mode: overlay;
}

/* Casino decorations - Top left cluster */
.hero-decor-left {
    position: absolute;
    left: 0;
    top: var(--header-height);
    width: 400px;
    height: 450px;
    pointer-events: none;
    z-index: 1;
}

/* Large chip */
.hero-decor-left::before {
    content: '';
    position: absolute;
    width: 240px;
    height: 240px;
    left: -60px;
    top: 20px;
    border: 6px solid rgba(255, 128, 0, 0.25);
    border-radius: 50%;
    background:
        radial-gradient(circle at center, transparent 40%, rgba(255, 128, 0, 0.15) 41%, rgba(255, 128, 0, 0.15) 50%, transparent 51%),
        radial-gradient(circle at center, transparent 60%, rgba(255, 255, 255, 0.1) 61%, rgba(255, 255, 255, 0.1) 70%, transparent 71%);
}

/* Card shape */
.hero-decor-left::after {
    content: '';
    position: absolute;
    width: 110px;
    height: 150px;
    left: 130px;
    top: 200px;
    border: 4px solid rgba(255, 128, 0, 0.2);
    border-radius: 12px;
    transform: rotate(-25deg);
    background: linear-gradient(135deg, rgba(255, 128, 0, 0.08) 0%, transparent 100%);
}

/* Casino decorations - Bottom right cluster */
.hero-decor-right {
    position: absolute;
    right: 0;
    bottom: 100px;
    width: 420px;
    height: 380px;
    pointer-events: none;
    z-index: 1;
}

/* Large chip */
.hero-decor-right::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    right: -40px;
    bottom: 30px;
    border: 5px solid rgba(255, 128, 0, 0.22);
    border-radius: 50%;
    background:
        radial-gradient(circle at center, transparent 35%, rgba(255, 128, 0, 0.18) 36%, rgba(255, 128, 0, 0.18) 48%, transparent 49%),
        radial-gradient(circle at center, transparent 58%, rgba(255, 255, 255, 0.1) 59%, rgba(255, 255, 255, 0.1) 68%, transparent 69%);
}

/* Diamond suit */
.hero-decor-right::after {
    content: '';
    position: absolute;
    width: 90px;
    height: 90px;
    right: 150px;
    bottom: 210px;
    border: 4px solid rgba(255, 128, 0, 0.2);
    transform: rotate(45deg);
    background: rgba(255, 128, 0, 0.08);
}

/* Spade suit - top right area */
.hero-decor-spade {
    position: absolute;
    right: 10%;
    top: calc(var(--header-height) + 80px);
    width: 90px;
    height: 105px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.2;
}

.hero-decor-spade::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 120'%3E%3Cpath d='M50 0 C50 0 0 40 0 70 C0 90 20 100 35 100 C42 100 47 97 50 92 C53 97 58 100 65 100 C80 100 100 90 100 70 C100 40 50 0 50 0 Z M35 102 L50 120 L65 102 C58 105 42 105 35 102 Z' fill='%23FF8000'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* Heart suit - left side middle */
.hero-decor-heart {
    position: absolute;
    left: 6%;
    top: 48%;
    width: 85px;
    height: 78px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.18;
    transform: rotate(-12deg);
}

.hero-decor-heart::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 90'%3E%3Cpath d='M50 90 C50 90 0 50 0 25 C0 5 15 0 25 0 C35 0 45 10 50 20 C55 10 65 0 75 0 C85 0 100 5 100 25 C100 50 50 90 50 90 Z' fill='%23FF8000'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* Club suit - bottom left */
.hero-decor-club {
    position: absolute;
    left: 14%;
    bottom: 150px;
    width: 75px;
    height: 85px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.16;
    transform: rotate(8deg);
}

.hero-decor-club::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 110'%3E%3Ccircle cx='50' cy='25' r='22' fill='%23FF8000'/%3E%3Ccircle cx='25' cy='55' r='22' fill='%23FF8000'/%3E%3Ccircle cx='75' cy='55' r='22' fill='%23FF8000'/%3E%3Cpath d='M40 55 L40 95 L60 95 L60 55 Z' fill='%23FF8000'/%3E%3Cpath d='M35 95 L50 110 L65 95 Z' fill='%23FF8000'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* Dice - right side */
.hero-decor-dice {
    position: absolute;
    right: 5%;
    top: 40%;
    width: 95px;
    height: 95px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.18;
    transform: rotate(18deg);
}

.hero-decor-dice::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 5px solid #FF8000;
    border-radius: 16px;
    background: rgba(255, 128, 0, 0.05);
}

.hero-decor-dice::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    background: #FF8000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: -22px -22px 0 #FF8000, 22px 22px 0 #FF8000;
}

/* Scattered chips - center left */
.hero-decor-chips {
    position: absolute;
    left: 2%;
    top: 28%;
    width: 180px;
    height: 180px;
    pointer-events: none;
    z-index: 1;
}

.hero-decor-chips::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border: 5px solid rgba(255, 128, 0, 0.22);
    border-radius: 50%;
    top: 0;
    left: 0;
    background: radial-gradient(circle at center, transparent 45%, rgba(255, 128, 0, 0.12) 46%, rgba(255, 128, 0, 0.12) 58%, transparent 59%);
}

.hero-decor-chips::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 128, 0, 0.25);
    border-radius: 50%;
    bottom: 0;
    right: 10px;
    background: radial-gradient(circle at center, transparent 40%, rgba(255, 128, 0, 0.15) 41%, rgba(255, 128, 0, 0.15) 55%, transparent 56%);
}

/* Stacked cards - bottom right area */
.hero-decor-cards {
    position: absolute;
    right: 14%;
    bottom: 120px;
    width: 140px;
    height: 110px;
    pointer-events: none;
    z-index: 1;
}

.hero-decor-cards::before {
    content: '';
    position: absolute;
    width: 75px;
    height: 100px;
    border: 4px solid rgba(255, 128, 0, 0.2);
    border-radius: 10px;
    transform: rotate(-12deg);
    left: 0;
    top: 0;
    background: linear-gradient(135deg, rgba(255, 128, 0, 0.08) 0%, transparent 100%);
}

.hero-decor-cards::after {
    content: '';
    position: absolute;
    width: 75px;
    height: 100px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transform: rotate(10deg);
    left: 40px;
    top: -10px;
    background: linear-gradient(135deg, rgba(255, 128, 0, 0.06) 0%, transparent 100%);
}

/* Small accent chip - top right */
.hero-decor-accent {
    position: absolute;
    right: 20%;
    top: calc(var(--header-height) + 35px);
    width: 70px;
    height: 70px;
    border: 4px solid rgba(255, 128, 0, 0.25);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle at center, transparent 35%, rgba(255, 128, 0, 0.2) 36%, rgba(255, 128, 0, 0.2) 50%, transparent 51%);
}

/* Additional decorations via background SVG on hero-bg */
.hero-decor-extra {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
        /* Chip top center */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='45' fill='none' stroke='rgba(255,128,0,0.18)' stroke-width='4'/%3E%3Ccircle cx='50' cy='50' r='30' fill='none' stroke='rgba(255,128,0,0.12)' stroke-width='3'/%3E%3C/svg%3E"),
        /* Small diamond left */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Crect x='10' y='10' width='30' height='30' fill='rgba(255,128,0,0.15)' transform='rotate(45 25 25)'/%3E%3C/svg%3E"),
        /* Chip bottom center-left */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Ccircle cx='40' cy='40' r='35' fill='none' stroke='rgba(255,128,0,0.2)' stroke-width='4'/%3E%3Ccircle cx='40' cy='40' r='22' fill='none' stroke='rgba(255,128,0,0.12)' stroke-width='3'/%3E%3C/svg%3E"),
        /* Spade small right */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 48'%3E%3Cpath d='M20 0 C20 0 0 16 0 28 C0 36 8 40 14 40 C17 40 19 39 20 37 C21 39 23 40 26 40 C32 40 40 36 40 28 C40 16 20 0 20 0 Z' fill='rgba(255,128,0,0.15)'/%3E%3C/svg%3E"),
        /* Heart small */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 36'%3E%3Cpath d='M20 36 C20 36 0 20 0 10 C0 2 6 0 10 0 C14 0 18 4 20 8 C22 4 26 0 30 0 C34 0 40 2 40 10 C40 20 20 36 20 36 Z' fill='rgba(255,128,0,0.12)'/%3E%3C/svg%3E"),
        /* Card outline */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 84'%3E%3Crect x='2' y='2' width='56' height='80' rx='6' fill='none' stroke='rgba(255,128,0,0.15)' stroke-width='3'/%3E%3C/svg%3E"),
        /* Extra chip */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Ccircle cx='30' cy='30' r='27' fill='none' stroke='rgba(255,128,0,0.16)' stroke-width='3'/%3E%3C/svg%3E"),
        /* Extra diamond */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Crect x='8' y='8' width='24' height='24' fill='rgba(255,128,0,0.12)' transform='rotate(45 20 20)'/%3E%3C/svg%3E");
    background-position:
        28% 12%,
        22% 62%,
        38% 78%,
        72% 52%,
        82% 68%,
        7% 72%,
        55% 25%,
        65% 82%;
    background-size:
        100px 100px,
        55px 55px,
        85px 85px,
        45px 54px,
        50px 45px,
        60px 84px,
        70px 70px,
        50px 50px;
    background-repeat: no-repeat;
}

/* Roulette segment - decorative arc */
.hero-decor-roulette {
    position: absolute;
    left: -80px;
    bottom: 40px;
    width: 320px;
    height: 320px;
    pointer-events: none;
    z-index: 1;
    border: 6px solid rgba(255, 128, 0, 0.15);
    border-radius: 50%;
    border-right-color: transparent;
    border-bottom-color: transparent;
    transform: rotate(-30deg);
}

.hero-decor-roulette::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 25px;
    right: 25px;
    bottom: 25px;
    border: 4px solid rgba(255, 128, 0, 0.12);
    border-radius: 50%;
    border-right-color: transparent;
    border-bottom-color: transparent;
}

/* Second roulette arc - right side */
.hero-decor-roulette2 {
    position: absolute;
    right: -60px;
    top: 28%;
    width: 220px;
    height: 220px;
    pointer-events: none;
    z-index: 1;
    border: 5px solid rgba(255, 128, 0, 0.14);
    border-radius: 50%;
    border-left-color: transparent;
    border-top-color: transparent;
    transform: rotate(20deg);
}

.hero-decor-roulette2::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    border-left-color: transparent;
    border-top-color: transparent;
}

/* Small floating chip - top right */
.hero-decor-accent {
    position: absolute;
    right: 15%;
    top: calc(var(--header-height) + 60px);
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
}

/* Main content wrapper */
.hero-main {
    position: relative;
    z-index: 3;
    padding: calc(var(--header-height) + var(--space-3xl)) 0 0;
}

/* Content panel - visual anchor */
.hero-content {
    position: relative;
    max-width: 780px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
}

/* Soft glow behind content */
.hero-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110%;
    height: 120%;
    background: radial-gradient(ellipse at center,
        rgba(76, 31, 122, 0.4) 0%,
        rgba(76, 31, 122, 0.2) 30%,
        transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.hero-title {
    font-size: var(--text-4xl);
    color: var(--color-text-white);
    margin-bottom: var(--space-md);
    line-height: var(--leading-tight);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-title span {
    color: var(--color-primary);
    position: relative;
    display: inline-block;
    text-shadow:
        0 0 30px rgba(255, 128, 0, 0.6),
        0 0 60px rgba(255, 128, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Subtle underline accent for highlighted text */
.hero-title span::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 5%;
    right: 5%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 128, 0, 0.5), transparent);
    border-radius: 2px;
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: var(--leading-relaxed);
    letter-spacing: 0.015em;
}

/* CTA Section with visual grouping */
.hero-buttons {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Premium Primary CTA */
.hero .btn-primary {
    background: linear-gradient(135deg, #FF8000 0%, #E67300 50%, #CC6600 100%);
    color: #fff;
    padding: var(--space-md) var(--space-2xl);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    border: none;
    border-radius: var(--radius-md);
    box-shadow:
        0 4px 20px rgba(255, 128, 0, 0.45),
        0 2px 6px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.hero .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.hero .btn-primary:hover::before {
    left: 100%;
}

.hero .btn-primary:hover {
    background: linear-gradient(135deg, #FFA040 0%, #FF8000 50%, #E67300 100%);
    transform: translateY(-3px);
    box-shadow:
        0 8px 30px rgba(255, 128, 0, 0.55),
        0 4px 10px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Minimal Secondary CTA */
.hero .btn-secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    box-shadow: none;
    position: relative;
}

.hero .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    transform: translateY(-2px);
}

/* Gradient separator line */
.hero-divider {
    width: 180px;
    height: 1px;
    margin: 0 auto var(--space-lg);
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 128, 0, 0.4) 30%,
        rgba(33, 155, 157, 0.4) 70%,
        transparent 100%);
}

/* Trust Signals */
.hero-trust {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    padding: var(--space-md) var(--space-lg);
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-lg);
    max-width: fit-content;
    margin: 0 auto;
}

.hero-trust-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--text-sm);
    padding: var(--space-xs) 0;
}

.hero-trust-item svg {
    width: 18px;
    height: 18px;
    fill: var(--color-accent);
    flex-shrink: 0;
}

.hero-trust-item span {
    white-space: nowrap;
}

/* Bottom transition zone */
.hero-bottom {
    position: relative;
    z-index: 2;
    height: 120px;
    margin-top: var(--space-2xl);
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(238, 238, 238, 0.05) 30%,
        rgba(238, 238, 238, 0.15) 60%,
        var(--color-bg) 100%);
}

/* Decorative line at transition */
.hero-bottom::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    width: min(80%, 600px);
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 20%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.1) 80%,
        transparent 100%);
}

/* ==========================================================================
   PAGE DECORATIONS (for non-hero pages)
   ========================================================================== */

.page-decor {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: 0.5;
}

.page-decor .hero-decor-spade,
.page-decor .hero-decor-heart,
.page-decor .hero-decor-club,
.page-decor .hero-decor-dice,
.page-decor .hero-decor-chips,
.page-decor .hero-decor-cards {
    position: fixed;
}

.page-decor .hero-decor-spade {
    right: 5%;
    top: 15%;
}

.page-decor .hero-decor-heart {
    left: 3%;
    top: 35%;
}

.page-decor .hero-decor-club {
    right: 8%;
    bottom: 30%;
}

.page-decor .hero-decor-dice {
    left: 5%;
    bottom: 20%;
}

.page-decor .hero-decor-chips {
    right: 15%;
    top: 50%;
}

.page-decor .hero-decor-cards {
    left: 10%;
    top: 60%;
}

.page-decor .hero-decor-roulette {
    left: -80px;
    top: 20%;
}

.page-decor .hero-decor-roulette2 {
    right: -60px;
    top: 40%;
}

.page-decor .hero-decor-accent {
    right: 10%;
    top: 25%;
}

.page-decor .hero-decor-extra {
    left: 8%;
    bottom: 25%;
}

.page-decor .hero-decor-left {
    left: -100px;
    top: 30%;
}

.page-decor .hero-decor-right {
    right: -100px;
    top: 50%;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    min-height: 44px;
    min-width: 44px;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-text-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-primary);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-white);
    border-color: var(--color-text-white);
}

.btn-secondary:hover {
    background: var(--color-text-white);
    color: var(--color-secondary);
}

.btn-accent {
    background: var(--gradient-accent);
    color: var(--color-text-white);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-accent);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-text-white);
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-sm);
    min-height: 36px;
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-lg);
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: all var(--transition-base);
}

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

.card-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.card-body {
    padding: var(--space-lg);
}

.card-title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-sm);
    color: var(--color-secondary);
}

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

.card-text {
    color: var(--color-text-light);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-bg);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* Category Card */
.category-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.category-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.category-card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-md);
    background: var(--gradient-secondary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--color-text-white);
}

.category-card-title {
    font-size: var(--text-lg);
    color: var(--color-secondary);
    margin-bottom: var(--space-xs);
}

.category-card-count {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* Casino Card (for article pages) */
.casino-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.casino-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f6fa 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-md) var(--space-md);
    text-align: center;
    box-shadow: 0 4px 15px rgba(76, 31, 122, 0.08);
    position: relative;
    border: 1px solid rgba(76, 31, 122, 0.1);
    transition: all var(--transition-base);
    overflow: hidden;
}

.casino-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.casino-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(76, 31, 122, 0.15);
    border-color: rgba(255, 128, 0, 0.3);
}

.casino-card:hover::before {
    opacity: 1;
}

.casino-card-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-secondary) 0%, #6B2FA0 100%);
    color: var(--color-text-white);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(76, 31, 122, 0.3);
}

/* Top 3 special styling */
.casino-card:nth-child(1) .casino-card-rank {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    box-shadow: 0 3px 12px rgba(255, 165, 0, 0.4);
}

.casino-card:nth-child(2) .casino-card-rank {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    box-shadow: 0 3px 10px rgba(160, 160, 160, 0.4);
}

.casino-card:nth-child(3) .casino-card-rank {
    background: linear-gradient(135deg, #CD7F32 0%, #B87333 100%);
    box-shadow: 0 3px 10px rgba(184, 115, 51, 0.4);
}

.casino-card-logo {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
}

.casino-card-logo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.casino-card-name {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--color-secondary);
    margin-bottom: var(--space-xs);
    margin-top: var(--space-md);
}

.casino-card-bonus {
    font-size: var(--text-sm);
    color: var(--color-text);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: linear-gradient(135deg, rgba(255, 128, 0, 0.1) 0%, rgba(255, 128, 0, 0.05) 100%);
    border-radius: var(--radius-md);
    border: 1px dashed rgba(255, 128, 0, 0.3);
}

.casino-card-rating {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: var(--space-md);
}

.casino-card-rating svg {
    width: 16px;
    height: 16px;
    fill: var(--color-warning);
    filter: drop-shadow(0 1px 2px rgba(255, 193, 7, 0.3));
}

.casino-card .btn {
    width: 100%;
    font-size: var(--text-sm);
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, var(--color-primary) 0%, #E67300 100%);
    border-radius: var(--radius-md);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 128, 0, 0.3);
}

.casino-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 128, 0, 0.4);
}

/* Compact casino card without logo */
.casino-card-compact {
    padding: var(--space-lg) var(--space-md) var(--space-md);
}

.casino-card-compact .casino-card-name {
    font-size: var(--text-base);
    margin-top: var(--space-sm);
}

/* Decorative icon for compact cards */
.casino-card-compact::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(76,31,122,0.15)'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* ==========================================================================
   NEW CASINO CARDS DESIGN
   ========================================================================== */

.casino-grid-new {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px 24px;
    margin-bottom: var(--space-2xl);
    padding-top: 44px;
}

.casino-card-new {
    background: #fff;
    border-radius: 16px;
    padding: 54px 0 0;
    position: relative;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.casino-card-new:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(76, 31, 122, 0.18);
}

/* Badge icon circle */
.casino-card-new-badge {
    position: absolute;
    top: -44px;
    left: 50%;
    transform: translateX(-50%);
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 128, 0, 0.3);
}

.casino-card-new-badge svg {
    width: 46px;
    height: 46px;
    fill: #fff;
}

/* Alternating badge colors */
.casino-card-new:nth-child(2n) .casino-card-new-badge {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%);
    box-shadow: 0 4px 15px rgba(76, 31, 122, 0.3);
}

.casino-card-new:nth-child(3n) .casino-card-new-badge {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    box-shadow: 0 4px 15px rgba(33, 155, 157, 0.3);
}

.casino-card-new:nth-child(5n) .casino-card-new-badge {
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.casino-card-new-name {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--color-text);
    line-height: 1.2;
    padding: 0 var(--space-md);
    margin-bottom: var(--space-sm);
}

.casino-card-new-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: var(--space-sm) var(--space-md) var(--space-lg);
}

.casino-card-new-rating svg {
    width: 16px;
    height: 16px;
    fill: #FFB800;
}

.casino-card-new-rating .rating-value {
    margin-left: var(--space-sm);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--color-text);
    background: rgba(255, 184, 0, 0.15);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.casino-card-new-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--color-secondary) 0%, #6B2FA0 100%);
    color: #fff;
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 0 0 16px 16px;
    transition: all 0.3s ease;
}

.casino-card-new-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.casino-card-new-btn:hover {
    background: linear-gradient(135deg, var(--color-primary) 0%, #E67300 100%);
}

.casino-card-new-btn:hover svg {
    transform: translateX(4px);
}

/* ==========================================================================
   CAROUSEL
   ========================================================================== */

.carousel-section {
    background: var(--color-bg);
    padding: var(--space-2xl) 0;
    overflow: hidden;
}

.carousel-wrapper {
    position: relative;
}

/* Static layout (1-4 keywords) */
.carousel-static {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* Single row (5-8 keywords) */
.carousel-row {
    display: flex;
    gap: var(--space-md);
    animation: carousel-scroll var(--carousel-speed-row1) linear infinite;
    width: max-content;
}

.carousel-row.reverse {
    animation-direction: reverse;
    animation-duration: var(--carousel-speed-row2);
}

.carousel-row.slow {
    animation-duration: var(--carousel-speed-row3);
}

/* Triple row layout (9+ keywords) */
.carousel-triple {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.carousel-wrapper:hover .carousel-row {
    animation-play-state: paused;
}

@keyframes carousel-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Keyword Pill */
.kw-pill {
    display: inline-flex;
    align-items: center;
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-bg-card);
    border: 2px solid var(--color-bg-dark);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.kw-pill:hover {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary);
    transform: scale(1.05);
}

/* ==========================================================================
   MODAL
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    overflow: hidden;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-bg);
}

.modal-title {
    font-size: var(--text-xl);
    color: var(--color-secondary);
}

.modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    transition: background var(--transition-fast);
}

.modal-close:hover {
    background: var(--color-bg);
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
    max-height: calc(85vh - 80px);
}

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-md) 0;
    font-size: var(--text-sm);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-muted);
}

.breadcrumb-item a {
    color: var(--color-secondary);
    transition: color var(--transition-fast);
}

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

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    color: var(--color-text-muted);
}

.breadcrumb-item:last-child {
    color: var(--color-text);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    margin-top: var(--space-2xl);
}

.pagination-list {
    display: flex;
    gap: var(--space-xs);
}

.pagination-list li a,
.pagination-list li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 var(--space-md);
    background: var(--color-bg-card);
    border: 2px solid var(--color-bg-dark);
    border-radius: var(--radius-md);
    font-weight: var(--font-medium);
    transition: all var(--transition-fast);
}

.pagination-list li a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pagination-current {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: var(--color-text-white) !important;
}

.pagination-ellipsis {
    border: none !important;
    background: transparent !important;
}

/* ==========================================================================
   TAGS
   ========================================================================== */

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: var(--color-text-light);
    transition: all var(--transition-fast);
}

.tag:hover {
    background: var(--color-primary);
    color: var(--color-text-white);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

/* ==========================================================================
   TAGS SECTION - Homepage
   ========================================================================== */

.tags-section {
    padding: var(--space-3xl) 0;
    background: linear-gradient(180deg, var(--color-bg) 0%, #e8e4ed 50%, var(--color-bg) 100%);
    position: relative;
}

.tags-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(76, 31, 122, 0.2), transparent);
}

.tags-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(76, 31, 122, 0.2), transparent);
}

.tags-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.tag-card {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(76, 31, 122, 0.1);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.tag-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-secondary);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.tag-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 31, 122, 0.15);
    border-color: rgba(76, 31, 122, 0.2);
}

.tag-card:hover::before {
    opacity: 1;
}

.tag-card-featured {
    background: linear-gradient(135deg, var(--color-secondary) 0%, #5a2d8a 100%);
    border-color: transparent;
}

.tag-card-featured .tag-card-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.tag-card-featured .tag-card-name {
    color: #fff;
    font-weight: var(--font-semibold);
}

.tag-card-featured .tag-card-count {
    background: rgba(255, 128, 0, 0.9);
    color: #fff;
}

.tag-card-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(76, 31, 122, 0.3);
}

.tag-card-featured::before {
    background: var(--color-primary);
}

.tag-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(76, 31, 122, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-secondary);
    flex-shrink: 0;
}

.tag-card-icon svg {
    width: 18px;
    height: 18px;
}

.tag-card-name {
    flex: 1;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-card-count {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 var(--space-sm);
    background: rgba(76, 31, 122, 0.1);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-secondary);
}

/* ==========================================================================
   ARTICLE CONTENT
   ========================================================================== */

/* Article page title */
article header h1 {
    font-size: var(--text-3xl);
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
}

.article-content {
    line-height: var(--leading-relaxed);
}

.article-content h2 {
    font-size: var(--text-2xl);
    color: var(--color-secondary);
    margin: var(--space-xl) 0 var(--space-md);
}

.article-content h3 {
    font-size: var(--text-xl);
    color: var(--color-secondary);
    margin: var(--space-lg) 0 var(--space-md);
}

.article-content h4 {
    font-size: var(--text-lg);
    color: var(--color-secondary);
    margin: var(--space-md) 0 var(--space-sm);
}

.article-content p {
    margin-bottom: var(--space-md);
}

.article-content ul,
.article-content ol {
    margin: var(--space-md) 0;
    padding-left: var(--space-xl);
}

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content li {
    margin-bottom: var(--space-sm);
}

.article-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--color-primary-dark);
}

.article-content table {
    margin: var(--space-lg) 0;
    border: 1px solid var(--color-bg-dark);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.article-content th,
.article-content td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--color-bg-dark);
}

.article-content th {
    background: var(--color-secondary);
    color: var(--color-text-white);
    font-weight: var(--font-semibold);
}

.article-content tr:last-child td {
    border-bottom: none;
}

.article-content tr:nth-child(even) {
    background: var(--color-bg);
}

.article-content blockquote {
    margin: var(--space-lg) 0;
    padding: var(--space-md) var(--space-lg);
    border-left: 4px solid var(--color-primary);
    background: var(--color-bg);
    font-style: italic;
}

.article-content img {
    border-radius: var(--radius-md);
    margin: var(--space-md) 0;
}

/* Article inner wrapper */
.article-content .article {
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-bg-dark);
}

.article-content .article:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Hide duplicate H1s in article content */
.article-content .article h1 {
    display: none;
}

/* Figure and Figcaption */
.article-content figure {
    margin: var(--space-lg) 0;
    padding: 0;
}

.article-content figure img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.article-content figcaption {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-align: center;
    margin-top: var(--space-sm);
    font-style: italic;
}

/* Image positioning classes */
.article-content figure.image.left {
    float: left;
    max-width: 45%;
    margin: var(--space-sm) var(--space-lg) var(--space-sm) 0;
}

.article-content figure.image.right {
    float: right;
    max-width: 45%;
    margin: var(--space-sm) 0 var(--space-sm) var(--space-lg);
}

.article-content figure.image.fullwidth {
    width: 100%;
    clear: both;
}

/* Clear floats after images */
.article-content figure.image.left + p,
.article-content figure.image.right + p {
    overflow: hidden;
}

.article-content::after {
    content: '';
    display: table;
    clear: both;
}

/* AIO content wrapper */
.article-content #aio_content {
    overflow: hidden;
}

/* ==========================================================================
   ARTICLE TAGS SECTION
   ========================================================================== */

.article-tags-section {
    margin-top: var(--space-2xl);
    padding: var(--space-xl);
    background: linear-gradient(135deg, rgba(76, 31, 122, 0.03) 0%, rgba(255, 128, 0, 0.03) 100%);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(76, 31, 122, 0.1);
    position: relative;
    overflow: hidden;
}

.article-tags-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-primary), var(--color-accent));
}

.article-tags-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.article-tags-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--color-secondary) 0%, #6B2FA0 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(76, 31, 122, 0.25);
}

.article-tags-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.article-tags-title {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--color-secondary);
    margin: 0;
}

.article-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.article-tag {
    display: inline-flex;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-light);
    border: 1px solid rgba(76, 31, 122, 0.15);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-secondary);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.article-tag::before {
    content: '#';
    margin-right: 4px;
    color: var(--color-primary);
    font-weight: var(--font-bold);
}

.article-tag:hover {
    background: linear-gradient(135deg, var(--color-secondary) 0%, #6B2FA0 100%);
    border-color: transparent;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 31, 122, 0.3);
}

.article-tag:hover::before {
    color: var(--color-primary-light);
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.sidebar-widget {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-card);
}

.sidebar-title {
    font-size: var(--text-lg);
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-primary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    background: var(--color-bg-footer);
    color: var(--color-text-white);
    padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--space-md);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.footer-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-lg);
    text-align: center;
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.5);
}

.footer-disclaimer {
    max-width: 800px;
    margin: 0 auto var(--space-md);
    line-height: var(--leading-relaxed);
}

/* ==========================================================================
   FORMS
   ========================================================================== */

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-weight: var(--font-medium);
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-card);
    border: 2px solid var(--color-bg-dark);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    transition: border-color var(--transition-fast);
    min-height: 44px;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-error {
    color: var(--color-error);
    font-size: var(--text-sm);
    margin-top: var(--space-xs);
}

.form-success {
    color: var(--color-success);
    font-size: var(--text-sm);
    margin-top: var(--space-xs);
}

/* ==========================================================================
   STATS SECTION
   ========================================================================== */

.stats-section {
    background: var(--gradient-secondary);
    padding: var(--space-2xl) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    text-align: center;
}

.stat-item {
    color: var(--color-text-white);
}

.stat-number {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: var(--color-primary);
}

.stat-label {
    font-size: var(--text-base);
    opacity: 0.8;
}

/* ==========================================================================
   404 PAGE
   ========================================================================== */

.error-page {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-2xl);
}

.error-code {
    font-size: clamp(6rem, 20vw, 12rem);
    font-weight: var(--font-bold);
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: var(--space-md);
}

.error-title {
    font-size: var(--text-2xl);
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
}

.error-text {
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
}

/* ==========================================================================
   RELATED ARTICLES
   ========================================================================== */

.related-articles {
    margin-top: var(--space-2xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--color-bg-dark);
}

.related-title {
    font-size: var(--text-xl);
    color: var(--color-secondary);
    margin-bottom: var(--space-lg);
}

/* ==========================================================================
   SEO CONTENT
   ========================================================================== */

.seo-content {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-top: var(--space-2xl);
}

.seo-content h2 {
    font-size: var(--text-xl);
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
}

.seo-content h3 {
    font-size: var(--text-lg);
    color: var(--color-text);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.seo-content p {
    color: var(--color-text-light);
    line-height: var(--leading-relaxed);
}

.seo-content p + p {
    margin-top: var(--space-md);
}

/* SEO Content in Tags Section */
.seo-content-tags {
    background: transparent;
    padding: 0;
    margin-top: 0;
    margin-bottom: var(--space-2xl);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.seo-content-tags h2 {
    font-size: var(--text-2xl);
    color: var(--color-secondary);
    margin-bottom: var(--space-lg);
    line-height: var(--leading-tight);
}

.seo-content-tags h3 {
    font-size: var(--text-lg);
    color: var(--color-secondary);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
    position: relative;
    display: inline-block;
}

.seo-content-tags h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 2px;
}

.seo-content-tags p {
    color: var(--color-text);
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.seo-content-tags p:last-of-type {
    text-align: center;
    margin-top: var(--space-xl);
    font-weight: var(--font-medium);
    color: var(--color-secondary);
}

/* ==========================================================================
   PRELOADED CONTENT (Hidden)
   ========================================================================== */

.preloaded-content {
    display: none !important;
}

/* ==========================================================================
   MOBILE MENU
   ========================================================================== */

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg-header);
    z-index: calc(var(--z-fixed) + 1);
    padding: var(--space-sm) var(--space-xl) var(--space-xl);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    display: flex;
    flex-direction: column;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-header {
    display: flex;
    justify-content: flex-end;
    padding-bottom: var(--space-md);
}

.mobile-nav-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-white);
}

.mobile-nav-close svg {
    width: 24px;
    height: 24px;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.mobile-nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    color: var(--color-text-white);
    font-weight: var(--font-medium);
    font-size: var(--text-lg);
}

.mobile-nav-link svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.mobile-nav-item.open .mobile-nav-link svg {
    transform: rotate(180deg);
}

.mobile-nav-dropdown {
    display: none;
    padding: 0 var(--space-md) var(--space-md);
}

.mobile-nav-item.open .mobile-nav-dropdown {
    display: block;
}

.mobile-nav-dropdown a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
}

.mobile-nav-dropdown a:hover {
    color: var(--color-primary);
}

.mobile-nav-link.active {
    color: var(--color-primary);
}

.mobile-nav-dropdown a.active {
    color: var(--color-primary);
    font-weight: 600;
}

.mobile-nav-dropdown .mobile-nav-all {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--space-xs);
    padding-bottom: var(--space-sm);
}

.mobile-nav-dropdown .mobile-nav-all.active {
    color: var(--color-primary);
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-fixed);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   NOTIFICATIONS
   ========================================================================== */

.notification {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
    animation: notificationSlideIn 0.3s ease-out;
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-success .notification-icon {
    background: var(--color-success);
    color: white;
}

.notification-icon svg {
    width: 20px;
    height: 20px;
}

.notification-content {
    flex: 1;
}

.notification-content strong {
    display: block;
    font-size: var(--text-lg);
    color: var(--color-text-white);
    margin-bottom: var(--space-xs);
}

.notification-content p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.notification-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-white);
}

.notification-close svg {
    width: 18px;
    height: 18px;
}

/* Toast Notification - Fixed position */
.toast-notification {
    position: fixed;
    top: calc(var(--header-height) + var(--space-md));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    animation: toastSlideIn 0.4s ease-out;
    max-width: 90%;
    width: auto;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toast-notification.toast-hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

.toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon svg {
    width: 18px;
    height: 18px;
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toast-content strong {
    font-size: var(--text-base);
}

.toast-content span {
    font-size: var(--text-sm);
    opacity: 0.9;
}

.toast-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: white;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.toast-close:hover {
    opacity: 1;
}

.toast-close svg {
    width: 16px;
    height: 16px;
}
