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

body {
    font-family: 'Comic Sans MS', 'Chalkboard', 'Marker Felt', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light theme (default) */
:root {
    --bg-color: #fffef5;
    --text-color: #333;
    --button-bg: #f0f0f0;
    --button-hover: #e0e0e0;
    --button-text: #333;
}

/* Dark theme - OLED friendly */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #000000;
        --text-color: #ffffff;
        --button-bg: #222222;
        --button-hover: #333333;
        --button-text: #ffffff;
    }
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.container {
    text-align: center;
    padding: 20px;
}

.shape-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto 10px;
}

#shape-svg {
    max-width: 90vw;
    max-height: 50vh;
}

#sides-label {
    font-size: 2.5rem;
    margin-bottom: 5px;
    font-weight: bold;
    letter-spacing: 2px;
}

#shape-name {
    font-size: 3rem;
    margin-top: 0;
    margin-bottom: 40px;
    font-weight: bold;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.controls button {
    font-size: 2rem;
    padding: 15px 30px;
    border: none;
    border-radius: 15px;
    background-color: var(--button-bg);
    color: var(--button-text);
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.controls button:hover {
    background-color: var(--button-hover);
    transform: scale(1.05);
}

.controls button:active {
    transform: scale(0.95);
}

/* Fun animation for shape name */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#shape-name {
    animation: bounce 0.5s ease;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #sides-label {
        font-size: 1.6rem;
    }

    #shape-name {
        font-size: 2rem;
    }

    #shape-svg {
        width: 250px;
        height: 250px;
    }

    .controls button {
        font-size: 1.5rem;
        padding: 12px 24px;
    }
}
