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

*, *::before, *::after {
    box-sizing: inherit;
}

html, body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 100vw;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    background-color: #110022;
    color: #ffffff;
    font-family: 'Mukta', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

img, canvas, iframe {
    max-width: 100%;
    display: block;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
}

p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

a {
    color: #ff00ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #00ffff;
}

/* ==========================================================================
   Layout System
   ========================================================================== */
.c3a8kf-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Header & Navigation (MANDATORY STRICT STYLES)
   ========================================================================== */
.c3a8kf-header-l-r-r {
    background: rgba(17, 0, 34, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 0, 255, 0.2);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.c3a8kf-desktop-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: center;
}

.c3a8kf-desktop-nav a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
}

.c3a8kf-desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: #00ffff;
    transition: width 0.3s ease;
}

.c3a8kf-desktop-nav a:hover::after {
    width: 100%;
}

.c3a8kf-desktop-nav a:hover {
    color: #00ffff;
}

.c3a8kf-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.c3a8kf-age-flag {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 0, 255, 0.5);
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(255, 0, 255, 0.1);
    font-weight: 700;
    font-size: 0.9rem;
}

.c3a8kf-hamburger {
    background: transparent;
    border: none;
    color: #00ffff;
    font-size: 28px;
    cursor: pointer;
    display: none;
}

/* ==========================================================================
   Hero Section (MANDATORY STRICT STYLES)
   ========================================================================== */
.c3a8kf-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 60px 20px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.c3a8kf-hero-text {
    flex: 1;
    min-width: 300px;
}

.c3a8kf-hero-text h1 {
    font-size: 3.5rem;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
    margin-bottom: 20px;
}

.c3a8kf-hero-text h1 span {
    color: #00ffff;
}

.c3a8kf-hero-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.c3a8kf-hero-image {
    flex: 1;
    max-width: 600px;
    min-width: 480px;
    display: flex;
    justify-content: center;
    position: relative;
}

.c3a8kf-hero-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle, rgba(255,0,255,0.2) 0%, rgba(17,0,34,0) 70%);
    z-index: 0;
}

.c3a8kf-hero-image img {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(255, 0, 255, 0.2);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Game Grid & Cards (MANDATORY STRICT STYLES)
   ========================================================================== */
.c3a8kf-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 350px));
    justify-content: center;
    gap: 30px;
    margin: 60px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.c3a8kf-game-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.c3a8kf-game-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #ff00ff, #00ffff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.c3a8kf-game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 0, 255, 0.15);
    border-color: rgba(255, 0, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.c3a8kf-game-card:hover::before {
    opacity: 1;
}

.c3a8kf-game-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.c3a8kf-game-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.c3a8kf-game-card p {
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.c3a8kf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: linear-gradient(135deg, #ff00ff 0%, #aa00ff 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.c3a8kf-btn:hover {
    background: linear-gradient(135deg, #aa00ff 0%, #ff00ff 100%);
    box-shadow: 0 6px 25px rgba(255, 0, 255, 0.5);
    transform: translateY(-2px);
    color: #ffffff;
}

.c3a8kf-btn-outline {
    background: transparent;
    border: 2px solid #00ffff;
    color: #00ffff;
    box-shadow: none;
}

.c3a8kf-btn-outline:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
    color: #ffffff;
}

/* ==========================================================================
   Footer (MANDATORY STRICT STYLES)
   ========================================================================== */
.c3a8kf-footer-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background-color: #080010;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
}

.c3a8kf-footer-centered ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.c3a8kf-footer-centered ul a {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
}

.c3a8kf-footer-centered ul a:hover {
    color: #ff00ff;
}

/* ==========================================================================
   Game Application UI (Play Page)
   ========================================================================== */
.c3a8kf-game-app-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.c3a8kf-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.c3a8kf-balance-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #00ffff;
}

.c3a8kf-canvas-wrapper {
    position: relative;
    width: 100%;
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 0, 255, 0.3);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.1) inset;
}

#game-canvas {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
}

.c3a8kf-game-controls {
    display: flex;
    justify-content: center;
    padding: 30px 0 10px;
}

#spin-button {
    font-size: 1.5rem;
    padding: 15px 50px;
    border-radius: 50px;
}

.c3a8kf-toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 255, 255, 0.9);
    color: #000;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.5);
    transition: bottom 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
    pointer-events: none;
}

.c3a8kf-toast.show {
    bottom: 30px;
}

/* ==========================================================================
   Content Pages (Privacy, Terms, Responsible Gaming)
   ========================================================================== */
.c3a8kf-legal-content {
    max-width: 800px;
    margin: 60px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.c3a8kf-legal-content h1 {
    color: #ff00ff;
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
}

.c3a8kf-legal-content h2 {
    color: #00ffff;
    margin-top: 30px;
    font-size: 1.5rem;
}

.c3a8kf-legal-content ul, .c3a8kf-legal-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.c3a8kf-legal-content li {
    margin-bottom: 8px;
}

/* ==========================================================================
   Trust Badges & Visuals
   ========================================================================== */
.c3a8kf-trust-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 40px;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
}

.c3a8kf-trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 700;
}

.c3a8kf-trust-badge svg {
    fill: #00ffff;
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   Mobile Responsive Fixes
   ========================================================================== */
@media (max-width: 768px) {
    .c3a8kf-desktop-nav {
        display: none;
    }

    .c3a8kf-hamburger {
        display: block;
    }

    .c3a8kf-hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }

    .c3a8kf-hero-text h1 {
        font-size: 2.5rem;
    }

    .c3a8kf-game-grid {
        grid-template-columns: 1fr;
    }

    .c3a8kf-legal-content {
        margin: 20px;
        padding: 20px;
    }
}