/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d4ff;
    --secondary-color: #ff00ff;
    --accent-color: #7b2ff7;
    --bg-dark: #0a0a0f;
    --bg-darker: #050507;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --glow-color: #00ffff;
    --card-bg: rgba(20, 20, 30, 0.8);
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a0033 50%, #0a0a0f 100%);
    z-index: -1;
}

.dice-rain {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent);
    background-size: 500px 500px;
    animation: moveStars 200s linear infinite;
}

@keyframes moveStars {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-500px, -500px); }
}

.glow-orbs {
    position: absolute;
    width: 100%;
    height: 100%;
}

.glow-orbs::before,
.glow-orbs::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(100px);
    animation: floatOrb 20s infinite ease-in-out;
}

.glow-orbs::before {
    background: radial-gradient(circle, rgba(0,212,255,0.4) 0%, transparent 70%);
    top: -200px;
    left: -200px;
}

.glow-orbs::after {
    background: radial-gradient(circle, rgba(255,0,255,0.3) 0%, transparent 70%);
    bottom: -200px;
    right: -200px;
    animation-delay: 10s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(100px, -50px) scale(1.1); }
    50% { transform: translate(-50px, 100px) scale(0.9); }
    75% { transform: translate(50px, 50px) scale(1.05); }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 900;
    font-family: 'Orbitron', monospace;
}

.logo-dice {
    font-size: 2rem;
    animation: rotateDice 4s infinite linear;
}

@keyframes rotateDice {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
    font-weight: 500;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    position: relative;
    z-index: 1;
    background: transparent;
    margin-bottom: 0;
}

.hero-content {
    max-width: 1200px;
    text-align: center;
    z-index: 2;
}

.glitch-wrapper {
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

/* Glitch Effect */
.glitch {
    position: relative;
    animation: glitch 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--primary-color);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--secondary-color);
    z-index: -2;
}

@keyframes glitch {
    0%, 100% { text-shadow: 0 0 30px rgba(0, 212, 255, 0.5); }
    50% { text-shadow: 0 0 40px rgba(255, 0, 255, 0.5); }
}

@keyframes glitch-1 {
    0%, 100% { clip: rect(44px, 9999px, 56px, 0); transform: translate(0); }
    20% { clip: rect(24px, 9999px, 90px, 0); transform: translate(-2px, 2px); }
    40% { clip: rect(60px, 9999px, 30px, 0); transform: translate(2px, -2px); }
    60% { clip: rect(80px, 9999px, 45px, 0); transform: translate(-1px, 1px); }
    80% { clip: rect(10px, 9999px, 100px, 0); transform: translate(1px, -1px); }
}

@keyframes glitch-2 {
    0%, 100% { clip: rect(10px, 9999px, 100px, 0); transform: translate(0); }
    20% { clip: rect(80px, 9999px, 45px, 0); transform: translate(2px, -1px); }
    40% { clip: rect(60px, 9999px, 30px, 0); transform: translate(-2px, 2px); }
    60% { clip: rect(24px, 9999px, 90px, 0); transform: translate(1px, -2px); }
    80% { clip: rect(44px, 9999px, 56px, 0); transform: translate(-1px, 1px); }
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: fadeInUp 1s ease-out;
    animation-fill-mode: both;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.4s;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    font-family: 'Orbitron', monospace;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    position: relative;
    padding: 1rem 3rem;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.5);
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover .btn-glow {
    width: 300px;
    height: 300px;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.3);
}

/* 3D Floating Dice Animation */
.dice-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible; /* Changed from hidden to visible to prevent clipping */
    pointer-events: none;
    z-index: 0;
    perspective: 1000px;
}

.floating-dice {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    perspective: 1000px;
}

.dice {
    position: absolute;
    width: 60px;
    height: 60px;
    transform-style: preserve-3d;
    will-change: transform, opacity;
    opacity: 0.6;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* Removed contain property to prevent clipping */
}

/* Mobile optimizations for dice */
@media (max-width: 768px) {
    .dice {
        width: 45px;
        height: 45px;
    }

    .dice-cube {
        transition: none; /* Disable transitions on mobile for better performance */
    }

    .dice-face {
        box-shadow: inset 0 0 8px rgba(0, 212, 255, 0.15); /* Lighter shadow */
    }

    .dice-background {
        opacity: 0.9; /* Slightly more transparent on mobile */
    }
}

.dice-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(0deg) rotateY(0deg);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.dice-face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #1a1a2e;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 8px;
    gap: 2px;
    box-shadow:
        0 0 50px rgba(0, 212, 255, 0.3),
        inset 0 0 20px rgba(0, 212, 255, 0.1),
        inset 2px 2px 5px rgba(255, 255, 255, 0.1),
        inset -2px -2px 5px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    backface-visibility: hidden;
}

/* 3D Face Positions - exactly half the width/height for perfect cube */
.dice-face.front  { transform: translateZ(30px); }
.dice-face.back   { transform: rotateY(180deg) translateZ(30px); }
.dice-face.right  { transform: rotateY(90deg) translateZ(30px); }
.dice-face.left   { transform: rotateY(-90deg) translateZ(30px); }
.dice-face.top    { transform: rotateX(90deg) translateZ(30px); }
.dice-face.bottom { transform: rotateX(-90deg) translateZ(30px); }

/* Adjust face positions for mobile */
@media (max-width: 768px) {
    .dice-face.front  { transform: translateZ(22.5px); }
    .dice-face.back   { transform: rotateY(180deg) translateZ(22.5px); }
    .dice-face.right  { transform: rotateY(90deg) translateZ(22.5px); }
    .dice-face.left   { transform: rotateY(-90deg) translateZ(22.5px); }
    .dice-face.top    { transform: rotateX(90deg) translateZ(22.5px); }
    .dice-face.bottom { transform: rotateX(-90deg) translateZ(22.5px); }
}

/* Dice Face Dot Styling */
.dice-face .dot {
    width: 10px;
    height: 10px;
    background: #00d4ff;
    border-radius: 50%;
    box-shadow:
        0 0 10px rgba(0, 212, 255, 1),
        0 0 20px rgba(0, 212, 255, 0.8);
    margin: auto;
}

/* Dice face layouts for different numbers */
.dice-face:has(.dot:only-child) .dot {
    grid-column: 2;
    grid-row: 2;
}

.dice-face:has(.dot:nth-child(2):last-child) .dot:first-child {
    grid-column: 1;
    grid-row: 1;
}

.dice-face:has(.dot:nth-child(2):last-child) .dot:last-child {
    grid-column: 3;
    grid-row: 3;
}

.dice-face:has(.dot:nth-child(3):last-child) .dot:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.dice-face:has(.dot:nth-child(3):last-child) .dot:nth-child(2) {
    grid-column: 2;
    grid-row: 2;
}

.dice-face:has(.dot:nth-child(3):last-child) .dot:nth-child(3) {
    grid-column: 3;
    grid-row: 3;
}

.dice-face:has(.dot:nth-child(4):last-child) .dot:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.dice-face:has(.dot:nth-child(4):last-child) .dot:nth-child(2) {
    grid-column: 3;
    grid-row: 1;
}

.dice-face:has(.dot:nth-child(4):last-child) .dot:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
}

.dice-face:has(.dot:nth-child(4):last-child) .dot:nth-child(4) {
    grid-column: 3;
    grid-row: 3;
}

.dice-face:has(.dot:nth-child(5):last-child) .dot:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.dice-face:has(.dot:nth-child(5):last-child) .dot:nth-child(2) {
    grid-column: 3;
    grid-row: 1;
}

.dice-face:has(.dot:nth-child(5):last-child) .dot:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

.dice-face:has(.dot:nth-child(5):last-child) .dot:nth-child(4) {
    grid-column: 1;
    grid-row: 3;
}

.dice-face:has(.dot:nth-child(5):last-child) .dot:nth-child(5) {
    grid-column: 3;
    grid-row: 3;
}

.dice-face:has(.dot:nth-child(6):last-child) .dot:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.dice-face:has(.dot:nth-child(6):last-child) .dot:nth-child(2) {
    grid-column: 3;
    grid-row: 1;
}

.dice-face:has(.dot:nth-child(6):last-child) .dot:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
}

.dice-face:has(.dot:nth-child(6):last-child) .dot:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
}

.dice-face:has(.dot:nth-child(6):last-child) .dot:nth-child(5) {
    grid-column: 1;
    grid-row: 3;
}

.dice-face:has(.dot:nth-child(6):last-child) .dot:nth-child(6) {
    grid-column: 3;
    grid-row: 3;
}

/* Dice glow effects */
.dice {
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.4));
}

.dice:nth-child(3n+1) {
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.4));
}

.dice:nth-child(3n+2) {
    filter: drop-shadow(0 0 20px rgba(255, 0, 255, 0.4));
}

.dice:nth-child(3n) {
    filter: drop-shadow(0 0 20px rgba(123, 47, 247, 0.4));
}

@keyframes rotateDice1 {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    20% {
        transform: rotateX(120deg) rotateY(180deg) rotateZ(90deg);
    }
    40% {
        transform: rotateX(240deg) rotateY(90deg) rotateZ(180deg);
    }
    60% {
        transform: rotateX(180deg) rotateY(270deg) rotateZ(270deg);
    }
    80% {
        transform: rotateX(300deg) rotateY(180deg) rotateZ(180deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}

@keyframes rotateDice2 {
    0% {
        transform: rotateX(45deg) rotateY(45deg) rotateZ(0deg);
    }
    25% {
        transform: rotateX(135deg) rotateY(270deg) rotateZ(120deg);
    }
    50% {
        transform: rotateX(270deg) rotateY(180deg) rotateZ(240deg);
    }
    75% {
        transform: rotateX(180deg) rotateY(90deg) rotateZ(180deg);
    }
    100% {
        transform: rotateX(405deg) rotateY(405deg) rotateZ(360deg);
    }
}

@keyframes rotateDice3 {
    0% {
        transform: rotateX(30deg) rotateY(30deg) rotateZ(30deg);
    }
    33% {
        transform: rotateX(180deg) rotateY(120deg) rotateZ(270deg);
    }
    66% {
        transform: rotateX(270deg) rotateY(300deg) rotateZ(180deg);
    }
    100% {
        transform: rotateX(390deg) rotateY(390deg) rotateZ(390deg);
    }
}

/* Features Section */
.features {
    padding: 8rem 2rem 5rem;
    background: linear-gradient(180deg,
        rgba(10, 10, 15, 0) 0%,
        rgba(10, 10, 15, 0.3) 20%,
        rgba(10, 10, 15, 0.6) 50%,
        rgba(10, 10, 15, 0.3) 80%,
        rgba(10, 10, 15, 0) 100%
    );
    position: relative;
    z-index: 2;
    margin-top: -100px;
    padding-top: 12rem;
}

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

.section-title {
    font-size: 3rem;
    font-family: 'Orbitron', monospace;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: scanLine 3s infinite;
}

@keyframes scanLine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* How to Play Section */
.how-to-play {
    padding: 8rem 2rem 5rem;
    background: linear-gradient(180deg,
        rgba(10, 10, 15, 0) 0%,
        rgba(10, 10, 15, 0.2) 10%,
        rgba(10, 10, 15, 0.4) 50%,
        rgba(10, 10, 15, 0.2) 90%,
        rgba(10, 10, 15, 0) 100%
    );
    position: relative;
    z-index: 2;
}

.steps-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 2rem;
}

.steps-timeline::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
}

.step {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0 auto 1rem;
    position: relative;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(0, 212, 255, 0);
    }
}

.step-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
}

/* Wiki Section */
.wiki {
    padding: 8rem 2rem 5rem;
    background: linear-gradient(180deg,
        rgba(10, 10, 15, 0) 0%,
        rgba(10, 10, 15, 0.3) 15%,
        rgba(10, 10, 15, 0.5) 50%,
        rgba(10, 10, 15, 0.3) 85%,
        rgba(10, 10, 15, 0) 100%
    );
    position: relative;
    z-index: 2;
}

.wiki-header {
    text-align: center;
    margin-bottom: 40px;
}

.wiki-header p {
    color: #a0a0b8;
    font-size: 18px;
    margin-bottom: 24px;
}

.btn-wiki-full {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #0a0a0f;
    font-weight: 700;
    font-size: 16px;
    border-radius: 12px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-wiki-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.5);
}

.btn-wiki-full span {
    position: relative;
    z-index: 1;
}

.btn-wiki-full .btn-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn-wiki-full:hover .btn-glow {
    transform: translateX(100%);
}

.wiki-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.wiki-tab {
    padding: 0.8rem 2rem;
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wiki-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.wiki-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
}

.wiki .wiki-content {
    max-width: 800px;
    margin: 0 auto;
}

.wiki-panel {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    padding: 32px;
}

.wiki-panel {
    display: none;
    animation: fadeIn 0.5s ease-out;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wiki-panel.active {
    display: block;
}

.wiki-panel h3 {
    color: #00d4ff;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
}

.wiki-panel h4 {
    color: #ff00ff;
    margin: 1.5rem 0 1rem;
    font-weight: 600;
}

.wiki-panel p {
    color: #a0a0b8;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.wiki-panel ul, .wiki-panel ol {
    color: #a0a0b8;
    line-height: 1.8;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.wiki-panel ul li, .wiki-panel ol li {
    margin-bottom: 0.5rem;
}

.warning {
    background: rgba(255, 200, 0, 0.1);
    border-left: 4px solid #ffc800;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 5px;
}

.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Stats Section */
.stats {
    padding: 8rem 2rem 5rem;
    background: linear-gradient(180deg,
        rgba(10, 10, 15, 0) 0%,
        rgba(10, 10, 15, 0.3) 10%,
        rgba(10, 10, 15, 0.5) 50%,
        rgba(10, 10, 15, 0.3) 90%,
        rgba(10, 10, 15, 0) 100%
    );
    position: relative;
    z-index: 2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.stat-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-box h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.leaderboard, .game-logs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.leaderboard::-webkit-scrollbar, .game-logs::-webkit-scrollbar {
    width: 6px;
}

.leaderboard::-webkit-scrollbar-track, .game-logs::-webkit-scrollbar-track {
    background: rgba(0, 212, 255, 0.05);
    border-radius: 10px;
}

.leaderboard::-webkit-scrollbar-thumb, .game-logs::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 10px;
}

.player-row, .game-log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    transition: all 0.3s;
}

.player-row:hover, .game-log-item:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateX(5px);
}

.game-log-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.game-log-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.game-log-players {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.9rem;
}

.game-log-winner {
    color: #4ade80;
    font-weight: 600;
}

.game-log-loser {
    color: var(--text-secondary);
}

.game-log-vs {
    color: var(--primary-color);
    font-weight: 700;
}

.game-log-bet {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.game-log-time {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.rank {
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-family: 'Orbitron', monospace;
}

.player-name {
    flex-grow: 1;
    margin: 0 1rem;
    color: var(--text-primary);
}

.player-wins {
    color: var(--primary-color);
    font-weight: 600;
}

/* Loading and error states */
.loading-text, .error-text, .no-data {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

.error-text {
    color: #ff6b6b;
}

.no-data {
    opacity: 0.7;
}

/* Footer */
.footer {
    background: var(--bg-darker);
    padding: 3rem 2rem 1rem;
    margin-top: 5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

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

.play-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
}

.play-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.5);
        padding: 2rem 0;
        z-index: 998;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hamburger {
        display: flex;
    }

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

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

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

    .hero-title {
        font-size: 3rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

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

    .steps-timeline::before {
        display: none;
    }

    .steps-timeline {
        flex-direction: column;
    }

    .wiki-nav {
        flex-direction: column;
        align-items: center;
    }

    .wiki-tab {
        width: 200px;
        text-align: center;
    }

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

    .lobbies-container {
        grid-template-columns: 1fr !important;
    }
}

/* Active Lobbies Section */
.lobbies {
    padding: 6rem 0;
    background: linear-gradient(135deg,
        rgba(10, 10, 15, 0.95) 0%,
        rgba(26, 0, 51, 0.9) 25%,
        rgba(15, 15, 30, 0.95) 50%,
        rgba(0, 20, 40, 0.9) 75%,
        rgba(10, 10, 15, 0.95) 100%
    );
    position: relative;
    backdrop-filter: blur(10px);
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.lobbies-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.lobby-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.lobby-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

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

.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lobby-creator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.creator-icon {
    font-size: 1.2rem;
}

.creator-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.lobby-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.lobby-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.lobby-content > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.bet-label,
.choice-label,
.players-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bet-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.choice-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.players-count {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.lobby-footer {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-join {
    padding: 0.6rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-join:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.lobby-status {
    padding: 0.6rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
}

.lobby-status.full {
    background: rgba(255, 0, 0, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.lobbies-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(20, 20, 35, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.1);
}

.lobbies-empty p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.loading-text,
.error-text {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.error-text {
    color: #ff6b6b;
}