/* time.css */
.time-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px); /* Account for header */
    padding: 20px;
    font-family: inherit;
    position: relative;
    width: 100%;
}

.search-container {
    position: absolute;
    top: 20px;
    width: 90%;
    max-width: 500px;
    z-index: 10;
}

#timezone-search {
    width: 100%;
    padding: 15px 20px;
    border-radius: 30px;
    border: 1px solid var(--border-color, #ccc);
    font-size: 1.1rem;
    background-color: var(--card-bg, rgba(255, 255, 255, 0.8));
    color: var(--text-color, #333);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

body.dark-mode #timezone-search {
    background-color: var(--card-bg, rgba(30, 30, 30, 0.8));
    color: var(--text-color, #eee);
    border-color: var(--border-color, #444);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#timezone-search:focus {
    outline: none;
    border-color: var(--accent-color, #007bff);
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
}

.search-dropdown {
    list-style: none;
    margin: 5px 0 0 0;
    padding: 0;
    background: var(--card-bg, white);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
    display: none;
    position: absolute;
}

body.dark-mode .search-dropdown {
    background: var(--card-bg, #222);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.search-dropdown li {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color, #eee);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

body.dark-mode .search-dropdown li {
    border-bottom: 1px solid var(--border-color, #333);
}

.search-dropdown li:last-child {
    border-bottom: none;
}

.search-dropdown li:hover {
    background-color: var(--hover-bg, #f5f5f5);
}

body.dark-mode .search-dropdown li:hover {
    background-color: var(--hover-bg, #2a2a2a);
}

.tz-actions {
    display: flex;
    gap: 10px;
}

.tz-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.1s, background-color 0.2s;
    background-color: var(--accent-color, #007bff);
    color: white;
}

.tz-btn.alt {
    background-color: var(--secondary-color, #6c757d);
}

.tz-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.clocks-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
    margin-top: 60px;
}

.clock-box {
    text-align: center;
    position: relative;
    padding: 30px;
    border-radius: 30px;
    background: var(--card-bg, rgba(255, 255, 255, 0.3));
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.5));
    transition: transform 0.3s ease;
    width: 90%;
    max-width: 600px;
}

body.dark-mode .clock-box {
    background: var(--card-bg, rgba(20, 20, 20, 0.4));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border-color: var(--border-color, rgba(255, 255, 255, 0.1));
}

.main-clock-box {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
    width: 100%;
    max-width: 100%;
}

.main-clock-box:hover {
    transform: none;
}

.main-clock {
    font-size: clamp(5rem, 15vw, 12rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    margin: 0;
    background: linear-gradient(135deg, var(--accent-light, #1e90ff), var(--accent-dark, #0047ab));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    letter-spacing: -2px;
}

body.dark-mode .main-clock {
    background: linear-gradient(135deg, #a0d8ef, #1e90ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-date {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 300;
    margin: 10px 0;
    color: var(--text-color, #555);
}

body.dark-mode .main-date {
    color: var(--text-color, #ccc);
}

.timezone-label {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted, #888);
    margin-top: 15px;
}

.alt-clocks-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    width: 100%;
}

.alt-clock-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 15px 60px 15px 30px;
    border-radius: 50px;
    position: relative;
    max-width: 95%;
    width: auto;
    text-align: left;
}

.alt-clock {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin: 0;
    color: var(--text-color, #333);
}

.clock-updating {
    animation: timeSmooth 0.3s ease-out;
}

@keyframes timeSmooth {
    0% {
        opacity: 0.6;
        transform: translateY(-2px);
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

body.dark-mode .alt-clock {
    color: var(--text-color, #fff);
}

.alt-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.alt-date {
    font-size: 1rem;
    font-weight: 300;
    margin: 0;
    color: var(--text-color, #666);
}

body.dark-mode .alt-date {
    color: var(--text-color, #bbb);
}

.alt-info .timezone-label {
    margin: 3px 0 0 0;
    font-size: 0.8rem;
}

.remove-alt-btn {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted, #888);
    cursor: pointer;
    transition: color 0.2s;
}

.remove-alt-btn:hover {
    color: #ff4757;
}

@media (max-width: 600px) {
    .alt-clock-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 40px;
        gap: 10px;
    }
    
    .alt-info {
        align-items: center;
    }
}
