:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --text-muted: #888888;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Subtle dot grid for a "dynamic" technical feel without being distracting */
    background-image: radial-gradient(#e5e5e5 1.5px, transparent 1.5px);
    background-size: 24px 24px;
}

.container {
    text-align: center;
    padding: 2rem;
    width: 100%;
    /* Smooth breathing interaction on hover */
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.container:hover {
    transform: scale(1.02);
}

#time-display {
    /* Fluid typography: auto-scales seamlessly between mobile and desktop */
    font-size: clamp(2.5rem, 14vw, 12rem);
    font-weight: 200;
    letter-spacing: -0.06em;
    line-height: 1;
    margin-bottom: 1.5rem;
    /* Keeps numbers aligned to prevent jittering */
    font-variant-numeric: tabular-nums; 
    color: var(--text-color);
}

.details {
    display: flex;
    flex-direction: column; /* Stack vertically on phones */
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.details p {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.4s ease;
    cursor: default;
}

/* Details light up on hover */
.details p:hover {
    color: var(--text-color);
}

.details p.clickable {
    cursor: pointer;
    position: relative;
}

/* Subtle underline for the clickable location on hover */
.details p.clickable::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-color);
    transition: width 0.3s ease;
}

.details p.clickable:hover::after {
    width: 100%;
}

.separator {
    /* Horizontal line on mobile */
    width: 40px;
    height: 1px;
    background-color: var(--text-muted);
    opacity: 0.2;
    transition: all 0.4s ease;
}

@media (min-width: 600px) {
    .details {
        flex-direction: row; /* Horizontal on tablets/desktops */
        gap: 1.5rem;
    }
    .separator {
        /* Vertical line on desktop */
        width: 1px;
        height: 16px;
    }
}

/* Elegant Entry Animation */
.fade-in-up {
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(40px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- Search Modal Styles --- */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.96); /* Minimalist bright overlay */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    transform: translateY(-20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.search-header {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #000;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

#tz-search {
    flex: 1;
    border: none;
    background: transparent;
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 200;
    font-family: 'Inter', sans-serif;
    color: #000;
    outline: none;
}

#tz-search::placeholder {
    color: #ccc;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 2.5rem;
    font-weight: 200;
    color: #888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
    padding-left: 1rem;
}

.close-btn:hover {
    color: #000;
}

#tz-results {
    list-style: none;
    max-height: 60vh;
    overflow-y: auto;
    /* Custom thin scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

#tz-results::-webkit-scrollbar {
    width: 4px;
}
#tz-results::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 4px;
}

#tz-results li {
    padding: 1rem 0;
    font-size: 1.1rem;
    color: #666;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.25s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#tz-results li:hover {
    color: #000;
    padding-left: 10px;
    border-bottom-color: #000;
}

.tz-city {
    font-weight: 500;
}

.tz-region {
    font-size: 0.85rem;
    color: #aaa;
}
