body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background-color: white;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1 {
    font-size: 2rem;
    color: #333;
    text-align: center;
    transition: color 0.3s ease;
}

#target-date {
    font-size: 0.8rem;
    text-align: center;
    transition: color 0.3s ease;
}

.main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#time-left {
    font-size: 3.5rem;
    font-weight: bold;
    line-height: 1.4;
    max-width: 80%;
    color: black;
    margin: auto;
    align-self: center;
    justify-self: center;
    text-align: center;
    transition: color 0.3s ease;
}

ul#menu {
    font-size: 2rem;
    text-align: center;
    list-style-type: none;
}

.info {
    text-decoration: none;
    cursor: pointer;
    margin-left: 1rem;
    transition: color 0.3s ease;
}

.github-link {
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px;
    transition: opacity 0.2s;
}

.github-link:hover {
    opacity: 0.7;
}

.github-link svg {
    width: 32px;
    height: 32px;
    fill: #333;
    transition: fill 0.3s ease;
}

footer {
    font-size: small;
    opacity: 80%;
    text-align: center;
    padding: 1em 4em;
    transition: color 0.3s ease;
}

@media (max-width: 768px) {
    #time-left {
        font-size: 2rem;
        padding: 1.5rem;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    ul#menu {
        font-size: 1.6rem;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    h1 {
        color: #e0e0e0;
    }

    ul#menu a {
        color: #8bb4fe;
    }

    #target-date, .info, footer {
        color: #b0b0b0;
    }

    #time-left, .info:hover {
        color: #ffffff;
    }

    .github-link svg {
        fill: #e0e0e0;
    }

    footer a {
        color: #8bb4fe;
    }

    footer a:hover {
        color: #a9c7fe;
    }
}