body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

header,
footer {
    background-color: #333;
    color: white;
    padding: 1em;
    text-align: center;
}

footer a {
    color: white;
    /* Keeps the link color white */
    text-decoration: none;
    /* Removes the default underline */
}

footer a:hover {
    text-decoration: underline;
    /* Adds underline on hover for discoverability */
}

main {
    flex-grow: 1;
    padding: 1em 2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.countdown-container {
    display: flex;
    justify-content: center;
    margin: 1em 0;
    padding: 1em;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timer-controls {
    display: flex;
    align-items: center;
    gap: 1.5em;
    /* Increased gap for better spacing */
}

.clockwork-display {
    font-size: 2em;
    /* Larger for better visibility */
    font-family: 'Courier New', Courier, monospace;
    padding: 0.5em 1em;
    min-width: 150px;
    /* Adjusted min-width */
    text-align: center;
    background-color: #e9ecef;
    border-radius: 4px;
    color: #495057;
}

.button {
    padding: 0.6em 1.2em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease;
}

.button.success {
    background-color: #28a745;
    color: white;
}

.button.success:hover {
    background-color: #218838;
}

.button.error {
    background-color: #dc3545;
    color: white;
}

.button.error:hover {
    background-color: #c82333;
}

.button:disabled {
    background-color: #6c757d;
    color: #ccc;
    cursor: not-allowed;
}

.text-display-container {
    width: clamp(300px, 60%, 800px);
    /* Responsive width */
    margin-top: 2em;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5em;
}

.markdown-content {
    min-height: 150px;
    text-align: left;
}

.markdown-content h2 {
    margin-top: 0;
}

.markdown-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #f8f9fa;
    padding: 1em;
    border-radius: 4px;
}

#textInput {
    display: none;
    width: 100%;
    height: 200px;
    margin-top: 1em;
    padding: 0.5em;
    box-sizing: border-box;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1em;
}
