:root {
    --day-bg: #f5f7fa;
    --night-bg: #1a1a2e;
    --day-text: #333;
    --night-text: #e6e6e6;
    --card-day: #ffffff;
    --card-night: #16213e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--day-bg);
    color: var(--day-text);
    transition: all 0.5s ease;
    padding: 20px;
    min-height: 100vh;
}

body.night-mode {
    background-color: var(--night-bg);
    color: var(--night-text);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-style: italic;
    opacity: 0.8;
}

.controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

button {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    background: #4a6fa5;
    color: white;
    transition: all 0.3s;
}

button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.clock-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.clock-card {
    background-color: var(--card-day);
    border-radius: 15px;
    padding: 20px;
    width: 280px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

body.night-mode .clock-card {
    background-color: var(--card-night);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.city-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.date {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 15px;
}

.time {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.ampm {
    font-size: 1.2rem;
    margin-left: 5px;
}

.weather {
    display: flex;
    align-items: center;
    margin-top: 15px;
    font-size: 0.9rem;
}

.weather-icon {
    margin-right: 10px;
    font-size: 1.5rem;
}

.day-night-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #FFD700;
    box-shadow: 0 0 10px #FFD700;
}

.night .day-night-indicator {
    background: #6B7A8F;
    box-shadow: 0 0 10px #6B7A8F;
}

.add-city-form {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
    justify-content: center;
}

select, input {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ddd;
    min-width: 200px;
}

.delete-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: #ff4d4d;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

@media (max-width: 768px) {
    .clock-card {
        width: 100%;
    }
}