body {
    margin: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(45deg, #1a2a6c, #b21f1f, #fdbb2d);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

canvas {
    display: block;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background: linear-gradient(to bottom, #70c5ce, #ffffff);
}

.game-container {
    margin-top: 5rem;
    position: relative;
}

.start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 10px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.start-button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 18px;
    background: linear-gradient(to right, #ff416c, #ff4b2b);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.start-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 65, 108, 0.7);
}

.score-display {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.controls-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    background-color: rgba(0, 0, 0, 0.3);
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 14px;
}

.key {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    padding: 1px 6px;
    margin: 0 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Navbar */
.navbar {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    display: flex;
    justify-content: flex-start;
}

/* Back Button */
.back-button {
    background: #2867f0;
    color: white;
    border: none;
    padding: 0.8rem 20px;
    width: 4rem;
    height: 2.5rem;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: #0190f6;
    transform: scale(1.05);
}

.toggle-btn {
    position: fixed;
    top: 0;
    right: 30px;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 30px;
    cursor: pointer;
    transition: 0.3s;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toggle theme style */
#toggleTheme {
    background: transparent;
    box-shadow: none;
    position: absolute;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Click animation (subtle scaling effect) */
#toggleTheme:active {
    transform: scale(0.9);
    opacity: 0.7;
}

/* Dark mode effect */
.dark-mode #toggleTheme {
    background: transparent;
    box-shadow: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Click animation in dark mode */
.dark-mode #toggleTheme:active {
    transform: scale(0.9);
    opacity: 0.7;
}

.toggle-btn:hover {
    background: #0056b3;
}

body.dark-mode {
    background: #121212;
    color: #fff;
}

/* Dark mode for header */
.dark-mode nav {
    background: linear-gradient(135deg, #1e1e1e, #333);
}
