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

body {
    font-family: 'Arial', sans-serif;
    background-color: white;
    color: #333;
    line-height: 1.6;
}

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

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

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #333;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

#timezoneSelect {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    background-color: white;
    min-width: 200px;
}

#addClockBtn {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#addClockBtn:hover {
    background-color: #0056b3;
}

#addClockBtn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.clocks-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.clock-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: move;
    position: relative;
}

.clock-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.clock-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.clock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.clock-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    border: none;
    background: transparent;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.clock-name:focus {
    outline: none;
    background-color: #f0f0f0;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.delete-btn:hover {
    background-color: #c82333;
}

.clock {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    background: linear-gradient(145deg, #e6e6e6, #ffffff);
    box-shadow: 
        0 0 0 2px #c0c0c0,
        0 4px 12px rgba(0, 0, 0, 0.15);
}

.clock-face {
    width: 190px;
    height: 190px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 5px;
    left: 5px;
    transition: background-color 0.5s ease;
    overflow: hidden;
}

.clock-face.night-mode {
    background-color: #2a2a2a;
}

.clock-face.night-mode .number {
    color: white;
}

.clock-face.night-mode .hour-marker {
    background-color: white;
}

.hour-marker {
    position: absolute;
    background-color: #333;
    transform-origin: bottom center;
}

.hour-marker.major {
    width: 1px;
    height: 15px;
    top: 10px;
    left: 50%;
    margin-left: -0.5px;
}

.hour-marker.minor {
    width: 1px;
    height: 8px;
    top: 17px;
    left: 50%;
    margin-left: -0.5px;
}

.number {
    position: absolute;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px;
    font-weight: 300;
    color: #333;
    transform: translate(-50%, -50%);
}

.clock-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background-color: #ffa500;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.hand {
    position: absolute;
    transform-origin: bottom center;
    border-radius: 1px;
}

.hour-hand {
    width: 3px;
    height: 55px;
    background-color: #333;
    top: 40px;
    left: 50%;
    margin-left: -1.5px;
    z-index: 3;
    border-radius: 1.5px;
}

.minute-hand {
    width: 2px;
    height: 75px;
    background-color: #333;
    top: 20px;
    left: 50%;
    margin-left: -1px;
    z-index: 2;
    border-radius: 1px;
}

.second-hand {
    width: 1px;
    height: 85px;
    background-color: #ffa500;
    top: 10px;
    left: 50%;
    margin-left: -0.5px;
    z-index: 1;
}

.clock-face.night-mode .hour-hand {
    background-color: white;
}

.clock-face.night-mode .minute-hand {
    background-color: white;
}

.clock-info {
    text-align: center;
    margin-top: 15px;
}

.time-display {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.timezone-display {
    font-size: 14px;
    color: #666;
}

.working-hours-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 10px;
}

.working-hours-indicator.working {
    background-color: #28a745;
}

.working-hours-indicator.non-working {
    background-color: #dc3545;
}

@media (max-width: 768px) {
    .clocks-container {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
    }
    
    #timezoneSelect {
        min-width: 250px;
    }
}

