:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #f59e0b;
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* Background Animations */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary-gradient);
    filter: blur(80px);
    opacity: 0.15;
    border-radius: 50%;
    animation: move 20s infinite alternate;
}

.blob-2 {
    bottom: -100px;
    right: -100px;
    animation: move 25s infinite alternate-reverse;
}

@keyframes move {
    from {
        transform: translate(-10%, -10%) scale(1);
    }

    to {
        transform: translate(20%, 20%) scale(1.1);
    }
}

.world-clock-container {
    width: 90%;
    max-width: 1200px;
    padding: 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: var(--shadow-premium);
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header h1 {
    font-size: 2.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.header p {
    color: var(--text-secondary);
}

.clocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.clock-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.clock-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
}

.city-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.flag {
    font-size: 1.5rem;
}

.city-name {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Analog Clock Styling */
.analog-clock {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    background: #fff;
    border-radius: 50%;
    position: relative;
    border: 4px solid #fff;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.2);
}

.analog-clock.dark {
    background: #1e293b;
    border-color: #334155;
}

.face {
    width: 100%;
    height: 100%;
    position: relative;
}

.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom;
    border-radius: 4px;
    transition: transform 0.05s cubic-bezier(0.1, 2.7, 0.58, 1);
}

.hour {
    width: 4px;
    height: 25%;
    background: #334155;
    z-index: 3;
}

.minute {
    width: 3px;
    height: 35%;
    background: #64748b;
    z-index: 2;
}

.second {
    width: 1.5px;
    height: 40%;
    background: var(--accent-color);
    z-index: 4;
}

.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #334155;
    border: 2px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.marking {
    position: absolute;
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    padding: 5px;
}

.dark .marking {
    color: #475569;
}

.dark .hour {
    background: #f8fafc;
}

.dark .minute {
    background: #94a3b8;
}

.marking-12 {
    top: 2px;
}

.marking-3 {
    top: 50%;
    right: 7px;
    transform: translateY(-50%) rotate(90deg);
}

.marking-6 {
    bottom: 2px;
    transform: rotate(180deg);
}

.marking-9 {
    top: 50%;
    left: 7px;
    transform: translateY(-50%) rotate(-90deg);
}

.digital-time {
    margin-top: 1rem;
}

.date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.time {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.controls {
    margin-top: 3rem;
    text-align: center;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .world-clock-container {
        padding: 1.5rem;
    }

    .header h1 {
        font-size: 2rem;
    }
}

/* Global Times Section */
.global-times-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.section-header h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
}

.global-search-container {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.global-search-container input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
}

.global-search-container input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.global-search-container .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

.global-times-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .global-times-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .global-times-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-header {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .global-times-grid {
        grid-template-columns: 1fr;
    }
}

.city-time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
}

.city-time-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(3px);
    border-color: rgba(255, 255, 255, 0.1);
}

.city-time-item .city {
    font-weight: 500;
    color: var(--text-secondary);
}

.city-time-item .city:hover {
    color: var(--text-primary);
}

.city-time-item .time {
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.no-results-msg {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-style: italic;
}