/* World Time Page Styles - Atmospheric Clock Cards */

.time-page {
    /* max-width inherits from .container (1200px) to match sun/moon pages */
}

/* Map Container */
.map-container {
    position: relative;
    width: 100%;
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.time-page #map {
    width: 100%;
    height: 40vh;
}

/* World Clocks Section */
.world-clocks {
    margin-top: 40px;
    padding: 0 20px;
}

.world-clocks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    max-width: 1200px;
    margin: 0 auto 25px auto;
}

.world-clocks h2 {
    font-size: 1.8rem;
    margin: 0;
    color: #333;
}

.reset-cities-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.reset-cities-btn:hover {
    background: #45a049;
}

.reset-cities-btn:active {
    transform: scale(0.98);
}

/* Clock Cards Grid */
.clock-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 4 columns on PC */
@media (min-width: 1024px) {
    .clock-cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Individual Clock Card */
.clock-card {
    position: relative;
    border-radius: 24px;
    padding: 18px 16px;
    min-height: 145px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    color: #fff;
}

.clock-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* Background Gradients based on Time of Day */
.clock-card.daytime {
    background: linear-gradient(135deg, #5B9FD5 0%, #87CEEB 100%);
}

.clock-card.twilight-dawn {
    background: linear-gradient(135deg, #FF6B9D 0%, #FFA500 50%, #FFD700 100%);
}

.clock-card.twilight-dusk {
    background: linear-gradient(135deg, #FF8C42 0%, #E25D7C 100%);
}

.clock-card.night {
    background: linear-gradient(135deg, #0B1929 0%, #1E3A5F 100%);
}

.clock-card.morning {
    background: linear-gradient(135deg, #87CEEB 0%, #B0E0E6 100%);
}

/* City Name */
.clock-city {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.clock-country {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.85;
    margin-top: -2px;
    margin-bottom: 6px;
}

.clock-city-english {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: -5px;
}

/* Time Display */
.clock-time {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 8px 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.clock-timezone {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.95;
    margin-top: -8px;
}

/* Date Display */
.clock-date {
    font-size: 0.85rem;
    margin-top: 6px;
    opacity: 0.9;
}

/* Sun/Moon Info */
.clock-sun-info {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
}

.clock-sun-info div {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Icons */
.clock-icon {
    font-size: 2.5rem;
    position: absolute;
    top: 25px;
    right: 25px;
    opacity: 0.8;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Close Button */
.clock-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
    z-index: 10;
    line-height: 1;
    padding: 0;
}

.clock-close-btn:hover {
    background: rgba(255, 0, 0, 0.7);
    transform: scale(1.1);
}

.clock-close-btn:active {
    transform: scale(0.95);
}

/* Period Label */
.clock-period {
    font-size: 0.8rem;
    margin-top: 5px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: inline-block;
    backdrop-filter: blur(10px);
}

/* Responsive */
@media (max-width: 768px) {
    .clock-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .clock-time {
        font-size: 1.8rem;
        font-weight: 700;
        margin: 6px 0;
    }

    .clock-city {
        font-size: 1rem;
    }

    .world-clocks h2 {
        font-size: 1.5rem;
    }

    .clock-card {
        padding: 14px 12px;
        min-height: 130px;
    }

    .clock-icon {
        font-size: 1.6rem;
        top: 12px;
        right: 12px;
    }

    .clock-sun-info {
        font-size: 0.65rem;
        margin-top: 8px;
        padding-top: 8px;
    }
}

@media (max-width: 480px) {
    .clock-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .clock-time {
        font-size: 1.5rem;
        font-weight: 700;
        margin: 5px 0;
    }

    .clock-city {
        font-size: 0.9rem;
    }

    .clock-card {
        padding: 12px 10px;
        min-height: 120px;
    }

    .clock-icon {
        font-size: 1.4rem;
        top: 10px;
        right: 10px;
    }

    .clock-sun-info {
        font-size: 0.6rem;
        margin-top: 6px;
        padding-top: 6px;
    }
}
