/* =========================
   Base / Theme
========================= */
:root {
    --bg: linear-gradient(135deg, #f0f7ffab 0%, #e6fff5 100%);
    --card: rgba(255, 255, 255, 0.7);
    --card-strong: rgba(255, 255, 255, 0.471);
    --text: #1f2937;
    --muted: #4b5563;
    --primary: #1d4ed8;
    --accent: #059669;
    --border: rgba(31, 41, 55, 0.15);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 24px;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
    text-align: center;
    background-image: url(/img/istockphoto-1279833180-612x612.jpg);
    overflow-y: hidden;
}

/* =========================
   Top Header
========================= */
nav {
    max-width: 900px;
    margin: 0 auto 20px auto;
    padding: 14px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    background: var(--card-strong);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow);
    backdrop-filter: blur(4px);
}

nav h1 {
    margin: 0;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.5px;
}

nav h2 {
    margin: 0;
    font-size: clamp(1.2rem, 2.2vw, 1.8rem);
    color: var(--muted);
}

/* =========================
   Main Section
========================= */
section {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(4px);
}

.player-container {
    margin: 12px auto 24px auto;
    padding: 24px;
    display: flex;
    justify-content: center;
    gap: clamp(1rem, 6vw, 6rem);
    background: rgba(29, 78, 216, 0.08);
    border: 1px solid rgba(29, 78, 216, 0.18);
    border-radius: var(--radius-md);
}

.p1 h2,
.p2 h2 {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    color: var(--muted);
}

/* Score box */
.counter {
    height: 110px;
    width: 110px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(31, 41, 55, 0.2);
    border-radius: 14px;
    background: white;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

.counter p {
    margin: 0;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

/* =========================
   Buttons
========================= */
/* If you wrapped ADD buttons in .button-row */
.button-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 12px 0;
}

button {
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(1px);
}

#increment {
    min-width: 8rem;
    background: #ffffff;
    color: var(--primary);
    border: 1px solid rgba(29, 78, 216, 0.25);
    box-shadow: 0 6px 14px rgba(29, 78, 216, 0.15);
}

#save {
    margin: 10px auto 0 auto;
    width: min(320px, 90%);
    text-align: left;
    list-style: decimal inside;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(31, 41, 55, 0.15);
    background: rgba(255, 255, 255, 0.75);
    color: var(--text);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.06);
}

.history-title {
    margin: 14px 0 6px 0;
    color: var(--muted);
    font-weight: 700;
}

.history-list li {
    padding: 2px 0;
}

/* Text under buttons */
section > p {
    margin-top: 14px;
    font-size: 1rem;
    color: var(--muted);
}

/* =========================
   Responsive
========================= */
@media (max-width: 640px) {
    body {
        padding: 14px;
    }

    nav {
        gap: 1rem;
        padding: 10px 14px;
    }

    .player-container {
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
    }

    .counter {
        width: 96px;
        height: 96px;
    }

    .counter p {
        font-size: 2.4rem;
    }
}