
:root {
    --background-color: #f8f9fa;
    --card-background-color: #ffffff;
    --primary-text-color: #2d3436;
    --secondary-text-color: #636e72;
    --button-bg-color: #0984e3;
    --button-text-color: #ffffff;
    --button-hover-glow: 0 0 20px rgba(9, 132, 227, 0.4);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --ball-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    --font-family: 'Poppins', sans-serif;
    --navbar-bg: #ffffff;
    --footer-bg: #2d3436;
    --footer-text: #dfe6e9;
}

[data-theme="dark"] {
    --background-color: #1a1a2e;
    --card-background-color: #16213e;
    --primary-text-color: #e94560;
    --secondary-text-color: #b2bec3;
    --button-bg-color: #e94560;
    --button-text-color: #ffffff;
    --button-hover-glow: 0 0 20px rgba(233, 69, 96, 0.4);
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --ball-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    --navbar-bg: #16213e;
    --footer-bg: #0f3460;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--primary-text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navbar Styles */
.navbar {
    position: sticky;
    top: 0;
    background-color: var(--navbar-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 1rem 0;
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--button-bg-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-text-color);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--button-bg-color);
}

.theme-toggle-inline {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s;
}

.theme-toggle-inline:hover {
    background: rgba(0,0,0,0.05);
}

/* Layout */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px;
    text-align: center;
}

.interactive-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* PC Version Layout */
@media (min-width: 992px) {
    .interactive-wrapper {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
    }

    .generator-section, .game-section {
        flex: 1;
        max-width: 500px;
    }

    .hero-section h1 {
        font-size: 4.5rem;
    }

    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.hero-section {
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    word-break: keep-all;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--secondary-text-color);
}

.card {
    background-color: var(--card-background-color);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .card {
        padding: 1.5rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
}

.info-card {
    text-align: left;
}

.info-card h2 {
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--button-bg-color);
    padding-left: 1rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    text-align: center;
}

.step-num {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--button-bg-color);
    color: white;
    border-radius: 50%;
    line-height: 40px;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Generator & Form Styles (Restored and Refined) */
.numbers-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}

.number-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    box-shadow: var(--ball-shadow);
}

.generate-btn {
    font-family: var(--font-family);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--button-text-color);
    background-color: var(--button-bg-color);
    border: none;
    border-radius: 12px;
    padding: 1rem 2.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--button-hover-glow);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: var(--background-color);
    color: var(--primary-text-color);
    font-family: inherit;
}

.submit-btn {
    background: var(--button-bg-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

/* Game Styles */
.game-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 400px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.6);
    color: white;
    z-index: 10;
}

.game-overlay h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.game-overlay p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.hidden {
    display: none !important;
}

.game-controls {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--secondary-text-color);
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0;
    margin-top: 5rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
}

/* Ball Colors */
.color-1 { background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%); }
.color-2 { background: linear-gradient(135deg, #fad0c4 0%, #ffd1ff 100%); }
.color-3 { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }
.color-4 { background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%); }
.color-5 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.color-6 { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
