/* 时区地图工具样式 */

/* 工具页面头部 */
.tool-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0 40px;
    text-align: center;
}

.tool-hero h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

.tool-description {
    font-size: 1.2em;
    margin-bottom: 20px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.tool-breadcrumb {
    font-size: 0.9em;
    opacity: 0.8;
}

.tool-breadcrumb a {
    color: white;
    text-decoration: none;
}

.tool-breadcrumb a:hover {
    text-decoration: underline;
}

/* 主容器 */
.timezone-map-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

/* 控制面板 */
.map-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 20px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    padding: 5px;
    transition: border-color 0.3s ease;
}

.search-box:focus-within {
    border-color: #007bff;
}

.search-box input {
    border: none;
    outline: none;
    padding: 8px 15px;
    font-size: 14px;
    width: 200px;
    background: transparent;
}

.search-box button {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background: #0056b3;
}

.current-time-display {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#currentTime {
    color: #007bff;
    font-weight: 600;
    font-size: 1.1em;
}

/* 图例 */
.map-legend {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.map-legend h3 {
    margin: 0 0 10px 0;
    font-size: 1em;
    color: #495057;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.legend-color {
    width: 20px;
    height: 15px;
    border-radius: 3px;
    border: 1px solid #dee2e6;
}

.utc-minus { background: linear-gradient(90deg, #ff9800 0%, #f44336 100%); }
.utc-zero { background: #4caf50; }
.utc-plus { background: linear-gradient(90deg, #2196f3 0%, #9c27b0 100%); }
.dst-active { 
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4" viewBox="0 0 4 4"><rect width="4" height="4" fill="%23ffeb3b"/><path d="M0,0 L4,4 M-1,3 L1,5 M3,-1 L5,1" stroke="%23ff9800" stroke-width="0.5"/></svg>');
}

/* 世界地图容器 */
.world-map-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.2);
}

.world-map {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* 时区条带 */
.timezone-stripe {
    opacity: 0.6;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.timezone-stripe:hover {
    opacity: 0.8;
}

/* 大陆轮廓 */
.continent-outline {
    cursor: pointer;
    transition: all 0.3s ease;
}

.continent-outline:hover {
    fill-opacity: 0.5;
    stroke-width: 2;
}

/* 城市标记 */
.city-marker {
    fill: #ff4444;
    stroke: white;
    stroke-width: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.city-marker:hover {
    fill: #ff0000;
    r: 6;
}

.city-label {
    font-size: 12px;
    fill: #333;
    text-anchor: middle;
    pointer-events: none;
    font-weight: 500;
}

/* 时区标签 */
.timezone-label {
    font-size: 14px;
    fill: #666;
    text-anchor: middle;
    font-weight: 600;
    pointer-events: none;
}

/* 时区信息面板 */
.timezone-info-panel {
    width: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    display: none;
    transition: all 0.3s ease;
}

.timezone-info-panel.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #007bff;
    color: white;
    border-radius: 12px 12px 0 0;
}

.info-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

#closeInfo {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

#closeInfo:hover {
    background: rgba(255,255,255,0.2);
}

.info-content {
    padding: 25px;
}

.time-display {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 25px;
    align-items: center;
}

.local-time {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.time-label {
    display: block;
    font-size: 1em;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.time-value {
    display: block;
    font-size: 2.5em;
    font-weight: 700;
    color: #007bff;
    line-height: 1;
    margin-bottom: 5px;
}

.date-value {
    display: block;
    font-size: 1em;
    color: #666;
    margin-top: 8px;
}

.timezone-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.detail-label {
    color: #666;
    font-size: 0.85em;
    margin-bottom: 5px;
    font-weight: 500;
}

.detail-value {
    font-weight: 600;
    color: #007bff;
    font-size: 1.1em;
}

.comparison-times {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.comparison-times h4 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 1.1em;
    text-align: center;
}

.city-times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.city-time-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.city-time-item:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.city-name {
    color: #666;
    font-weight: 500;
    font-size: 0.85em;
    margin-bottom: 5px;
}

.city-time {
    font-weight: 600;
    color: #007bff;
    font-size: 1.1em;
}

/* 时区选择器 */
.timezone-selector {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

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

.selector-header h3 {
    margin: 0;
    color: #495057;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timezone-dropdown {
    flex: 1;
    max-width: 300px;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timezone-dropdown:hover {
    border-color: #667eea;
}

.timezone-dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.popular-timezones {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.popular-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
    white-space: nowrap;
}

.popular-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.popular-tz-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.popular-tz-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.popular-tz-btn.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 0 12px rgba(40, 167, 69, 0.3);
}

/* 使用说明 */
.tool-instructions {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.tool-instructions h3 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 1.3em;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.instruction-item {
    text-align: center;
    padding: 20px;
    border: 2px solid #f1f3f4;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.instruction-item:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

.instruction-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.instruction-item h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1.1em;
}

.instruction-item p {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0;
}

/* 时区知识 */
.timezone-knowledge {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.timezone-knowledge h3 {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 1.3em;
}

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

.knowledge-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.knowledge-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.knowledge-card h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 1.1em;
}

.knowledge-card p {
    margin: 0;
    color: #666;
    line-height: 1.6;
    font-size: 0.95em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tool-hero h1 {
        font-size: 2em;
    }
    
    .tool-description {
        font-size: 1.1em;
    }
    
    .map-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        justify-content: center;
    }
    
    .search-box input {
        width: 150px;
    }
    
    .time-display {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .timezone-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .city-times-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .world-map-container {
        height: 300px;
    }
    
    .selector-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .timezone-dropdown {
        max-width: none;
    }
    
    .popular-timezones {
        justify-content: center;
    }
    
    .popular-buttons {
        justify-content: center;
        gap: 6px;
    }
    
    .popular-tz-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .instructions-grid,
    .knowledge-cards {
        grid-template-columns: 1fr;
    }
    
}

/* 平板设备 */
@media (max-width: 1024px) and (min-width: 769px) {
    .time-display {
        grid-template-columns: 1fr 1.5fr;
        gap: 25px;
    }
    
    .timezone-details {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .city-times-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .tool-hero {
        padding: 40px 0 30px;
    }
    
    .tool-hero h1 {
        font-size: 1.8em;
    }
    
    .timezone-map-container,
    .timezone-selector,
    .tool-instructions,
    .timezone-knowledge {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
    }
    
    .world-map-container {
        height: 250px;
    }
}
