* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0a;
    color: #ffffff;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    height: 100vh;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(
        135deg,
        rgba(20, 20, 30, 0.9),
        rgba(40, 40, 60, 0.8)
    );
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 40px;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #64ffda, #1de9b6, #00bcd4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(100, 255, 218, 0.3);
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider {
    appearance: none;
    width: 300px;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #333 0%, #555 100%);
    outline: none;
    cursor: pointer;
    position: relative;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #64ffda, #1de9b6);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.5);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 25px rgba(100, 255, 218, 0.8);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #64ffda, #1de9b6);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.5);
}

.value-display {
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
    min-width: 80px;
    text-align: center;
    transition: all 0.3s ease;
}

.stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.stat {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid rgba(138, 43, 226, 0.3);
    color: #9370db;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: grab;
}

#canvas-container:active {
    cursor: grabbing;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(
        135deg,
        rgba(20, 20, 30, 0.9),
        rgba(40, 40, 60, 0.8)
    );
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 40px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.instruction {
    display: inline-block;
    margin: 0 20px;
    padding: 5px 10px;
    background: rgba(138, 43, 226, 0.1);
    border-radius: 5px;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.key {
    color: #9370db;
    font-weight: bold;
}

.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
    font-size: 1.5rem;
    color: #64ffda;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(100, 255, 218, 0.3);
    border-top: 3px solid #64ffda;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

#user-counter-top-right {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #64ffda;
    text-shadow: 0 0 15px rgba(100, 255, 218, 0.5);
    z-index: 50;
    user-select: none;
}

.countdown-resets-highlight {
    background: #800080;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
}

#middle-countdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem; /* Larger font size for countdown */
    font-weight: bold;
    color: #64ffda;
    text-shadow: 0 0 30px rgba(100, 255, 218, 0.5);
    z-index: 50;
    user-select: none;
    text-align: center;
}
