:root {
    --primary: #6366f1;
    --accent: #a855f7;
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b0f1a;
        --surface: #161b22;
        --border: #30363d;
        --text-main: #f0f6fc;
        --text-muted: #8b949e;
    }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    padding: 2rem 0;
}

.dashboard-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- 1. HERO CARD --- */
.hero-container { margin-bottom: 2rem; }
.hero-card {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 4rem 2rem;
    border-radius: 32px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
}

.status-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#hero-tz { font-size: 1.5rem; margin-top: 1.5rem; font-weight: 400; opacity: 0.9; }
.hero-offset { font-size: 1.2rem; font-weight: 300; margin: 0.5rem 0; opacity: 0.8; }

.hero-main-clock {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 10px;
    letter-spacing: -2px;
}

.ampm-small { font-size: 1.5rem; opacity: 0.8; font-family: 'Inter', sans-serif; }

/* --- 2. ADSENSE BANNER --- */
.adsense-wrapper {
    margin-bottom: 3rem;
}
.adsense-placeholder {
    width: 100%;
    min-height: 250px;
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* --- 3. WORLD CLOCK --- */
.world-clock-section { margin-bottom: 3rem; }
.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem;
}

.clock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.clock-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: 20px;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.clock-card:hover { transform: translateY(-2px); }

.city-info { flex: 1; min-width: 0; }
.city-info h4 { font-size: 1rem; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-info p { font-size: 0.75rem; color: var(--text-muted); }

/* Perbaikan: Container waktu dan tombol hapus */
.clock-time-group { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    flex-shrink: 0;
}

.time-display {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: baseline;
    gap: 4px;
    min-width: 110px; /* Menjaga agar elemen tetap sejajar saat detik berganti */
    justify-content: flex-end;
}

/* Perbaikan: Tombol X sejajar horizontal */
.remove-btn {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: #ef4444;
    color: white;
}

/* --- 4. DIAGNOSTICS (3 BOX) --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.diag-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.diag-header {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.diag-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.diag-item:last-child { border: none; }
.diag-item span { color: var(--text-muted); }
.diag-item b { color: var(--text-main); font-weight: 600; }

@media (max-width: 600px) {
    .hero-main-clock { font-size: 2.8rem; }
    .grid-container { grid-template-columns: 1fr; }
    .clock-card { padding: 1rem; }
}

/* Styling untuk Dropdown Select */
#city-selector {
    appearance: none; /* Menghilangkan style default browser */
    -webkit-appearance: none;
    -moz-appearance: none;
    
    background-color: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 12px; /* Membuat sudut membulat seperti gambar 2 */
    padding: 10px 40px 10px 20px; /* Padding yang lebih lega */
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    
    /* Background arrow kustom (menggunakan SVG agar konsisten) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    
    min-width: 220px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

#city-selector:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

#city-selector:focus {
    border-color: var(--primary);
    ring: 2px solid var(--primary);
}