/* 世界时钟工具样式 */
.world-clock-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

/* 头部样式 */
.clock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.current-location {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: #555;
}

.current-location i {
    margin-right: 8px;
    color: #3498db;
}

.controls {
    display: flex;
    gap: 8px;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background-color: #f5f5f5;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background-color: #e0e0e0;
}

.view-btn.active {
    background-color: #3498db;
    color: white;
}

/* 内容区域 */
.clock-content {
    margin-bottom: 24px;
}

.view-content {
    display: none;
}

.view-content.active {
    display: block;
}

/* 网格视图 */
.region-selector {
    margin-bottom: 20px;
}

.region-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    min-width: 200px;
}

.clock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.clock-tile {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

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

.clock-tile.highlighted {
    border: 2px solid #3498db;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

.city-info {
    margin-bottom: 15px;
}

.city-name {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.time-zone {
    font-size: 12px;
    color: #7f8c8d;
}

.time-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.digital-clock {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
}

.date-info {
    font-size: 14px;
    color: #7f8c8d;
}

.day-night-indicator {
    font-size: 20px;
}

.day-night-indicator.day i {
    color: #f39c12;
}

.day-night-indicator.night i {
    color: #34495e;
}

.time-diff {
    font-size: 14px;
    color: #3498db;
    font-weight: 500;
}

/* 地图视图 */
.world-map {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.map-container {
    position: relative;
    margin-bottom: 20px;
}

.world-svg {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: #f8f9fa;
}

.continent {
    fill: #e9ecef;
    stroke: #dee2e6;
    stroke-width: 1;
}

.timezone-lines {
    stroke: #adb5bd;
    stroke-width: 0.5;
    opacity: 0.7;
}

.city-marker {
    cursor: pointer;
}

.city-marker circle {
    transition: all 0.2s ease;
}

.city-marker:hover circle {
    r: 8;
    fill: #2980b9;
}

.map-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.legend-color.day {
    background: #f39c12;
}

.legend-color.night {
    background: #34495e;
}

/* 设置面板 */
.settings-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.settings-panel.hidden {
    transform: translateX(100%);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.settings-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #7f8c8d;
    cursor: pointer;
    padding: 5px;
}

.settings-content {
    padding: 20px;
}

.setting-item {
    margin-bottom: 24px;
}

.setting-item label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #2c3e50;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-option input {
    margin-right: 10px;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

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

input:checked + .slider {
    background-color: #3498db;
}

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

/* 底部提示 */
.clock-footer {
    text-align: center;
    margin-top: 24px;
}

.tool-hint {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .world-clock-container {
        padding: 15px;
    }
    
    .clock-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .clock-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .clock-tile {
        padding: 15px;
    }
    
    .digital-clock {
        font-size: 20px;
    }
    
    .settings-panel {
        width: 100%;
    }
    
    .map-legend {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .clock-grid {
        grid-template-columns: 1fr;
    }
    
    .time-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .day-night-indicator {
        align-self: flex-end;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .world-clock-container {
        color: #e0e0e0;
    }
    
    .clock-tile,
    .world-map {
        background: #2c3e50;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }
    
    .city-name {
        color: #ecf0f1;
    }
    
    .digital-clock {
        color: #ecf0f1;
    }
    
    .region-select {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }
    
    .settings-panel {
        background: #2c3e50;
    }
    
    .world-svg {
        background: #34495e;
    }
    
    .continent {
        fill: #4a5f7a;
        stroke: #5a6f8a;
    }
}