body {
    font-family: "Arial", sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    background-color: #f4f4f4;
    color: #333;
    transition:
        background-color 0.3s,
        color 0.3s;
    position: relative;
}
body.dark-mode {
    background-color: #1e1e1e;
    color: #f0f0f0;
}
#header {
    position: absolute;
    top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 400px;
    padding: 0 15px;
    z-index: 10;
    box-sizing: border-box;
}
#card {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 60%; /* Flexible width */
    height: auto;
    margin-top: 80px; /* Space below the header */
    animation: fadeIn 0.5s ease-in-out forwards;
    transition:
        background-color 0.3s,
        transform 0.3s;
    box-sizing: border-box; /* Include padding in size */
}
body.dark-mode #card {
    background-color: #444;
}

h2 {
    margin: 0;
    font-size: 1.5em;
    animation: slideDown 0.5s ease-in-out forwards;
}
#options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 20px;
    animation: fadeIn 0.8s ease-in forwards;
}
button {
    padding: 12px;
    border: none;
    background-color: #3498db;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition:
        background-color 0.3s,
        transform 0.2s;
}
button:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
}
button:active {
    transform: translateY(0);
}
body.dark-mode button {
    background-color: #556cd6;
}
#feedback {
    margin-top: 15px;
    font-weight: bold;
    font-size: 1.2em;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}
#type-input {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s;
}
#type-input:focus {
    border-color: #3498db;
    outline: none;
}
#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 380px;
    position: absolute;
    top: 10px;
    padding: 0 10px;
    box-sizing: border-box;
}
#theme-toggle,
#export-import {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5em;
    color: inherit;
    transition: transform 0.3s;
}
#theme-toggle:hover {
    transform: rotate(30deg);
}
#mode-select {
    font-size: 1.2em;
    background-color: white;
    border-color: white;
    color: black;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

body.dark-mode #mode-select {
    background-color: #1e1e1e;
    border-color: #1e1e1e;
    color: #f0f0f0;
}

#mode-select:hover {
    background: lightgrey;
    border-color: lightgrey;
}

body.dark-mode #mode-select:hover {
    background: darkslategrey;
    border-color: darkslategrey;
}

#export-import:hover {
    transform: rotate(-30deg);
}

#circles {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc; /* You can change the color */
    display: inline-block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    #card {
        height: auto;
        padding: 15px;
        width: 90%;
        max-width: 90%;
    }
    h2 {
        font-size: 1.4em;
    }
    button {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    #header {
        padding: 0 10px;
    }
    #card {
        padding: 15px;
        height: auto;
        margin-top: 100px;
        width: 90%;
        max-width: 95%;
        max-height: 85vh;
    }
    h2 {
        font-size: 1.3em;
    }
    button {
        padding: 12px;
        font-size: 0.9em;
    }
}
