:root {
    --primary: #6C5CE7;
    --secondary: #00B894;
    --accent: #FDCB6E;
    --background: #2D3436;
    --text: #FFFFFF;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] {
    --primary: #6C5CE7;
    --secondary: #00B894;
    --accent: #FDCB6E;
    --background: #F5F6FA;
    --text: #2D3436;
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
    transition: background-color 0.3s ease;
}

.hero {
    height: 30vh;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.game-presets {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.preset-btn {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
    font-weight: 600;
}

.preset-btn:hover {
    transform: translateY(-2px);
    background: var(--accent);
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    top: 30%;
    right: 15%;
    animation-delay: 1s;
}

.floating-icon:nth-child(3) {
    bottom: 20%;
    left: 15%;
    animation-delay: 2s;
}

.floating-icon:nth-child(4) {
    bottom: 30%;
    right: 10%;
    animation-delay: 3s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--card-bg);
    margin: 1rem 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    gap: 2rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-btn {
    background: var(--primary);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.control-btn:hover {
    transform: scale(1.1);
    background: var(--secondary);
}

.player-count {
    font-size: 1.1rem;
    font-weight: 600;
}

.scoreboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.player {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.player:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.name-field {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--card-border);
    color: var(--text);
    font-size: 1.2rem;
    padding: 0.5rem;
    width: 100%;
    transition: border-color 0.2s ease;
}

.name-field:focus {
    outline: none;
    border-color: var(--primary);
}

.score {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text);
    width: 100%;
}

.line-add-sub {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.sub,
.add {
    background: var(--primary);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.sub:hover,
.add:hover {
    transform: scale(1.1);
    background: var(--secondary);
}

.quick-actions {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 1rem;
}

.action-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    background: var(--secondary);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .scoreboard {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .controls {
        margin: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .quick-actions {
        position: static;
        justify-content: center;
        margin-top: 2rem;
    }
}

.theme-toggle button {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0.2em 0.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.theme-toggle button:hover {
    transform: scale(1.2) rotate(-10deg);
}

#themeIcon {
    font-size: 2.2rem;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
    transition: color 0.2s, filter 0.2s;
}