:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4895ef;
    --dark: #1b263b;
    --light: #f8f9fa;
    --success: #4cc9f0;
    --warning: #f72585;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-color: #2b2d42;
    --text-light: #8d99ae;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://assets.codepen.io/3364143/7b3dr.png');
    background-size: cover;
    opacity: 0.1;
    z-index: -1;
    animation: moveBackground 120s linear infinite;
}

@keyframes moveBackground {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
    animation: fadeIn 1s ease;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.main-clock {
    text-align: center;
    animation: slideUp 0.8s ease;
}

.styled-select {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: none;
    background-color: white;
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.styled-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.3);
}

.time-display {
    margin-top: 1rem;
}

#city-name {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 600;
}

.time {
    font-size: 4rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0.5rem 0;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

.date {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.all-clocks {
    animation: slideUp 1s ease;
}

.all-clocks h3 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
}

.clock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.clock-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.clock-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.clock-card .city {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.clock-card .time {
    font-size: 2rem;
    font-weight: 600;
    margin: 0.5rem 0;
    color: var(--dark);
}

.clock-card .date {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Color accents for different cities */
.new-york {
    border-top: 4px solid #4361ee;
}

.london {
    border-top: 4px solid #f72585;
}

.tokyo {
    border-top: 4px solid #4895ef;
}

footer {
    text-align: center;
    color: white;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 1.5s ease;
}

footer p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.github-link {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.github-link:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.2rem;
    }

    .time {
        font-size: 3rem;
    }

    .clock-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .time {
        font-size: 2.5rem;
    }

    #city-name {
        font-size: 1.5rem;
    }
}