:root {
    --primary-color: #1d1d1f;
    --accent-color: #007aff; /* Apple's blue accent color */
    --background-color: #f8f8f8;
    --text-color: #1d1d1f;
    --border-color: #d1d1d6;
    --error-color: #ff3b30;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    margin: 0;
    padding: 20px;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

h1 {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

h2 {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 20px;
    margin-top: 30px;
}

input[type="number"] {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    width: 100px;
    transition: border-color 0.2s;
    outline: none;
}

input[type="number"]:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 4px rgba(0, 122, 255, 0.3);
}

button {
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3);
}

button:hover {
    background-color: #005bb5;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

button:disabled {
    background-color: #d1d1d6;
    cursor: not-allowed;
    box-shadow: none;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background-color: var(--error-color);
    color: white;
    padding: 12px;
    border-radius: 12px;
    margin: 10px 0;
    text-align: center;
    font-weight: 500;
}

#results {
    display: none;
}

.results {
    margin-top: 30px;
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.results-section {
    margin-bottom: 30px;
}

.leave-days, .holiday-periods {
    list-style: none;
    padding: 0;
}

.leave-days li, .holiday-periods li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 16px;
    color: var(--primary-color);
}

.leave-days li:last-child, .holiday-periods li:last-child {
    border-bottom: none;
}

.summary {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.summary p {
    font-weight: bold;
    color: var(--primary-color);
}

.footer {
    text-align: center;
    padding: 20px;
    color: var(--text-color);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    button {
        margin-top: 10px;
        width: 100%;
        margin-left: 0;
    }

    input[type="number"] {
        width: 100%;
        margin-bottom: 10px;
    }
}
