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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f1e8;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.container {
    max-width: 900px;
    width: 100%;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: #555;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

header p {
    font-size: 1.2rem;
    opacity: 0.8;
}

.timezone-controls {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.timezone-input-group {
    position: relative;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 280px;
}

.timezone-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.autocomplete-wrapper {
    position: relative;
}

.timezone-input-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.timezone-input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e4e8;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.dropdown.active {
    display: block;
}

.dropdown-item {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover,
.dropdown-item.selected {
    background-color: #f5f5ff;
}

.dropdown-item .city-name {
    font-weight: 500;
    color: #333;
}

.dropdown-item .timezone-info {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.current-time {
    margin-top: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #8b7355;
    text-align: center;
}

.dial-container {
    position: relative;
    width: 600px;
    height: 600px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .dial-container {
        width: 90vw;
        height: 90vw;
    }
}

.outer-dial,
.inner-dial {
    position: absolute;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.outer-dial {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.inner-dial {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    pointer-events: none;
}

.dial-background {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

.outer-background {
    background: conic-gradient(
        from 0deg at 50% 50%,
        #1a2238 0deg,
        #0a0e27 15deg,
        #0a0e27 30deg,
        #0a0e27 45deg,
        #1a2238 60deg,
        #3a4458 75deg,
        #5a6478 90deg,
        #7a8498 105deg,
        #9aa4b8 120deg,
        #e8c862 135deg,
        #f0d87c 150deg,
        #f5e196 165deg,
        #faeab0 180deg,
        #fef3ca 195deg,
        #f5e196 210deg,
        #f0d87c 225deg,
        #e8c862 240deg,
        #cdb05f 255deg,
        #9aa4b8 270deg,
        #7a8498 285deg,
        #5a6478 300deg,
        #4a5468 315deg,
        #3a4458 330deg,
        #2a3448 345deg,
        #1a2238 360deg
    );
    opacity: 1.0;
}

.inner-background {
    background: conic-gradient(
        from 0deg at 50% 50%,
        #1a2238 0deg,
        #0a0e27 15deg,
        #0a0e27 30deg,
        #0a0e27 45deg,
        #1a2238 60deg,
        #3a4458 75deg,
        #5a6478 90deg,
        #7a8498 105deg,
        #9aa4b8 120deg,
        #e8c862 135deg,
        #f0d87c 150deg,
        #f5e196 165deg,
        #faeab0 180deg,
        #fef3ca 195deg,
        #f5e196 210deg,
        #f0d87c 225deg,
        #e8c862 240deg,
        #cdb05f 255deg,
        #9aa4b8 270deg,
        #7a8498 285deg,
        #5a6478 300deg,
        #4a5468 315deg,
        #3a4458 330deg,
        #2a3448 345deg,
        #1a2238 360deg
    );
    opacity: 1.0;
}

.hour-markers {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hour-markers::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.hour-labels {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hour-label {
    position: absolute;
    font-weight: 600;
    font-size: 14px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    transform: translate(-50%, -50%);
}

.outer-labels .hour-label {
    font-size: 16px;
}

.inner-labels .hour-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.hour-marker {
    position: absolute;
    background: rgba(0, 0, 0, 0.6);
    transform-origin: center;
}

.hour-marker.major {
    width: 3px;
    height: 15px;
    background: rgba(0, 0, 0, 0.8);
}

.hour-marker.minor {
    width: 1px;
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
}

.center-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    background: radial-gradient(circle at 45% 70%,
        #fef3ca 0%,
        #f5e196 15%,
        #e8c862 30%,
        #d4af37 45%,
        #b8860b 65%,
        #8b6508 85%,
        #6b5637 100%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
        0 3px 6px rgba(0,0,0,0.4),
        0 1px 3px rgba(0,0,0,0.3),
        inset -1px 2px 3px rgba(254,243,202,0.8),
        inset 1px -2px 3px rgba(107,86,55,0.6);
    z-index: 10;
}

.time-bead {
    position: absolute;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 30% 30%, #5a5a5a, #2a2a2a);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px 2px rgba(255,255,255,0.1);
    z-index: 8;
    transition: none;
    transform-origin: center;
    pointer-events: none;
}

.dial-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    text-align: center;
    pointer-events: none;
    white-space: nowrap;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 20px rgba(255,255,255,0.5);
    z-index: 5;
}

.inner-label {
    margin-top: -50px;
    font-size: 14px;
    color: white;
}

.outer-dial-label-static {
    position: absolute;
    top: 15%;
    left: 105%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    z-index: 15;
}

.outer-labels .hour-label {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-format-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 34px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #8b7355;
}

input:checked + .slider:before {
    transform: translateX(46px);
}

.toggle-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 600;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}