/* Reset & base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #f6f8fc;
    color: #0d0d0d;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: white;
    border-bottom: 1px solid #e5e5e5;
    padding: 16px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

header h1 {
    font-weight: 500;
    font-size: 1.4rem;
    letter-spacing: -0.3px;
}

nav {
    display: flex;
    gap: 24px;
}

nav a {
    text-decoration: none;
    color: #555;
    font-size: 0.95rem;
    font-weight: 450;
    transition: color 0.15s;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

nav a:hover {
    color: #0d0d0d;
}

nav a.active {
    color: #0d0d0d;
    border-bottom-color: #4d6bfe;
}

/* Local time */
.local-time {
    background: white;
    border-radius: 16px;
    padding: 28px 24px;
    margin: 28px 0 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border: 1px solid #e5e5e5;
    text-align: center;
}

.local-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 4px;
}

.local-display {
    font-size: 3.2rem;
    font-weight: 500;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
    color: #0d0d0d;
    line-height: 1.2;
}

.local-date {
    font-size: 1rem;
    color: #777;
    margin-top: 6px;
}

/* Controls */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-bottom: 28px;
    align-items: center;
}

.search-box {
    flex: 1 1 260px;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 40px;
    padding: 0 16px;
    transition: border 0.15s;
}

.search-box:focus-within {
    border-color: #4d6bfe;
}

#searchInput {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 0;
    font-size: 0.95rem;
    background: transparent;
    color: #0d0d0d;
}

#searchInput::placeholder {
    color: #aaa;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1rem;
    color: #999;
    cursor: pointer;
    padding: 8px 4px;
    transition: color 0.15s;
}

.btn-icon:hover {
    color: #333;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    background: transparent;
    border: 1px solid #e5e5e5;
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 0.9rem;
    cursor: pointer;
    color: #555;
    transition: all 0.15s;
    background: white;
}

.filter-btn:hover {
    border-color: #b0b8d0;
}

.filter-btn.active {
    background: #4d6bfe;
    border-color: #4d6bfe;
    color: white;
}

/* Region grid */
.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 40px;
}

.region-card {
    background: white;
    border-radius: 14px;
    padding: 18px 20px 20px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    transition: box-shadow 0.15s, border-color 0.15s;
    display: flex;
    flex-direction: column;
}

.region-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
    border-color: #d1d9e6;
}

.region-card .region-name {
    font-weight: 500;
    font-size: 1.05rem;
    margin-bottom: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.region-card .region-country {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 8px;
}

.region-card .region-time {
    font-size: 1.8rem;
    font-weight: 450;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    margin: 6px 0 4px;
}

.region-card .region-date {
    font-size: 0.85rem;
    color: #777;
}

.region-card .card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

.card-actions button {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.1s;
    color: #999;
}

.card-actions button:hover {
    background: #f0f2f8;
}

.card-actions .fav-btn.active {
    color: #f5b342;
}

.card-actions .fav-btn.active:hover {
    color: #e09d2f;
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    color: #888;
    font-size: 1rem;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 24px 0;
    border-top: 1px solid #e5e5e5;
    background: white;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

/* About & contacts pages */
.page-content {
    background: white;
    border-radius: 16px;
    padding: 40px 32px;
    border: 1px solid #e5e5e5;
    margin: 28px 0 40px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.page-content h2 {
    font-weight: 500;
    font-size: 1.8rem;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.page-content p {
    line-height: 1.7;
    color: #333;
    margin-bottom: 14px;
}

.page-content ul {
    margin: 12px 0 18px 24px;
    color: #333;
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 600px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    nav {
        width: 100%;
        gap: 16px;
        flex-wrap: wrap;
    }
    .local-display {
        font-size: 2.4rem;
    }
    .region-grid {
        grid-template-columns: 1fr;
    }
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-buttons {
        justify-content: center;
    }
}
