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

:root {
    --bg-gradient: linear-gradient(135deg, #f0f4f8, #d0e2ff);
    --card-bg: rgba(255, 255, 255, 0.8);
    --primary: #6c63ff;
    --accent: #00b894;
    --text-dark: #333;
    --white: #ffffff;
    --btn-shadow: rgba(108, 99, 255, 0.2);
}

body {
    background: var(--bg-gradient);
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    text-align: center;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
}

header {
    margin-bottom: 30px;
}

h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary);
}

h2 {
    margin-bottom: 15px;
    font-size: 1.6rem;
    color: var(--accent);
}

/* === Rules Box === */
.rules-container {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    width: 100%;
    max-width: 600px;
    text-align: left;
    color: var(--text-dark);
}

.rules-container summary {
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary);
}

ul {
    list-style-type: disc;
    margin-left: 20px;
}

/* === Score Board === */
.score-container {
    display: flex;
    justify-content: space-around;
    margin: 25px 0;
    font-size: 1.2rem;
    width: 100%;
    max-width: 600px;
}

.score {
    font-weight: bold;
    color: var(--accent);
}

/* === Game Options === */
.options-container {
    margin: 30px 0;
}

.btn-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    background-color: var(--primary);
    color: var(--white);
    font-weight: 600;
    padding: 14px 24px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: 0 6px 12px var(--btn-shadow);
    font-size: 1rem;
}

.btn:hover {
    background-color: #574b90;
    transform: translateY(-3px);
}

/* === Results Display === */
.results-container {
    margin: 30px 0;
    font-size: 1.3rem;
}

#winner-msg {
    margin-top: 20px;
    font-weight: bold;
    font-size: 1.4rem;
    color: var(--primary);
}

#reset-game-btn {
    margin-top: 20px;
    display: none;
    background-color: var(--accent);
    color: var(--white);
    border-radius: 12px;
    font-weight: 600;
    padding: 12px 24px;
    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 184, 148, 0.3);
}

#reset-game-btn:hover {
    background-color: #019875;
    transform: scale(1.05);
}

/* === Responsive Design === */
@media (max-width: 600px) {
    .score-container {
        flex-direction: column;
        gap: 10px;
    }

    .btn-container {
        flex-direction: column;
        gap: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    .btn {
        width: 100%;
        font-size: 1rem;
    }

    .rules-container {
        font-size: 0.95rem;
    }
}