:root {
    --bg-color: #f8f9fa;
    --card-bg-color: #ffffff;
    --text-color: #212529;
    --muted-text-color: #6c757d;
    --primary-color: #0056b3;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    margin: 0;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.7;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem;
}

header {
    text-align: center;
    margin: 1rem 0 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    color: var(--primary-color);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
}

header .hint {
    color: var(--muted-text-color);
    font-size: 1.1rem;
}

.ad-container {
    text-align: center;
    min-height: 90px;
    margin: 2rem 0;
}

.errors {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab {
    flex: 1;
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    background: var(--card-bg-color);
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    text-align: center;
    transition: background-color 0.2s, color 0.2s;
}

.tab:hover {
    background-color: #e9ecef;
}

.tab[aria-selected=true] {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.card {
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
    align-items: end;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.date-selector-group {
    display: flex;
    gap: 0.5rem;
}

select, input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #ced4da;
    background: #fff;
    color: var(--text-color);
    font-size: 1rem;
    font-family: var(--font-family);
}

.date-selector-group select {
    flex: 1;
}

.full-width {
    grid-column: 1 / -1;
}

.half-width {
    grid-column: span 1;
}

button {
    cursor: pointer;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.85rem;
    font-size: 1.1rem;
    font-weight: 500;
    width: 100%;
    border-radius: 8px;
    transition: background-color 0.2s;
}

button:hover {
    background: #004a99;
}

.result {
    margin-top: 1rem;
    padding: 1.25rem;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    background: #f8f9fa;
    text-align: center;
    font-size: 1.1rem;
}

.result strong {
    color: var(--primary-color);
}

.result small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted-text-color);
}

/* Info Section */
.info-section {
    margin-top: 3rem;
}

.info-section h2 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.info-section article {
    margin-bottom: 2.5rem;
}

.info-section h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #343a40;
}

.info-section p, .info-section ul {
    font-size: 1.05rem;
    color: #495057;
}

.info-section ul {
    padding-left: 20px;
}

.info-section li {
    margin-bottom: 0.75rem;
}

footer {
    color: var(--muted-text-color);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .grid {
        grid-template-columns: 1fr;
    }
    .half-width {
        grid-column: span 1;
    }
    header h1 { font-size: 1.8rem; }
    header .hint { font-size: 1rem; }
    .card { padding: 1.5rem; }
}