* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 0;
    transition: background 0.5s ease;
}

/* 导航栏样式 */
.main-nav {
    width: 100%;
    background-color: #f0f2f5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
}

.nav-logo a {
    color: #3a7bd5;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-logo a:hover {
    color: #00a8ff;
}

.nav-menu {
    display: flex;
}

/* 导航菜单链接样式 - 已移除li标签 */

.city-selector-container,
.language-selector-container {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

#city-select,
#language-select {
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

#city-select:hover, #city-select:focus,
#language-select:hover, #language-select:focus {
    background-color: #f8f9fa;
    border-color: #3a7bd5;
    box-shadow: 0 0 8px rgba(58, 123, 213, 0.2);
}
.container {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    margin: 20px auto;
}
.container:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}
.header {
    margin-bottom: 25px;
    position: relative;
}
.header h1 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}
.header h1:after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c, transparent);
    bottom: -5px;
    left: 25%;
    border-radius: 2px;
    transition: width 0.3s ease;
}
.header h1:hover:after {
    width: 70%;
    left: 15%;
}

.city-selector {
    margin: 15px 0;
    text-align: center;
}

.city-selector label {
    margin-right: 10px;
    font-weight: bold;
    color: #34495e;
}

.city-selector select {
    padding: 8px 15px;
    border-radius: 20px;
    border: 2px solid #e7e7e7;
    background-color: #f8f9fa;
    color: #2c3e50;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.city-selector select:hover, .city-selector select:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.2);
}
.time-display {
    font-size: 72px;
    font-weight: bold;
    color: #e74c3c;
    margin: 25px 0;
    font-family: 'Arial', sans-serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
.time-display:hover {
    transform: scale(1.05);
    color: #c0392b;
}
.date-info {
    font-size: 20px;
    margin-bottom: 25px;
    color: #34495e;
    padding: 10px;
    border-radius: 8px;
    background-color: #f8f9fa;
    display: inline-block;
}
.timezone-info, .world-clock {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    margin-top: 25px;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}
.timezone-info:hover, .world-clock:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.timezone-info h3, .world-clock h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 8px;
    font-size: 22px;
}
.timezone-info p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
    padding-left: 5px;
    border-left: 3px solid #e7e7e7;
    transition: all 0.2s ease;
}
.timezone-info p:hover {
    border-left-color: #e74c3c;
    padding-left: 8px;
    background-color: #f5f5f5;
}
/* 洲际分组样式 */
.continent-section {
    margin-bottom: 30px;
}

.continent-title {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 2px solid #3a7bd5;
    position: relative;
}

.continent-title::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #e74c3c;
}

.city-times {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 15px;
}
.city-time {
    padding: 12px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.city-time:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 3px solid #e74c3c;
}
.city-time:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.city-time::after {
    content: "点击切换";
    position: absolute;
    top: 0;
    right: -100%;
    background-color: rgba(231, 76, 60, 0.8);
    color: white;
    padding: 3px 10px;
    font-size: 12px;
    border-radius: 0 0 0 8px;
    transition: right 0.3s ease;
}
.city-time:hover::after {
    right: 0;
}
.city-name {
    font-weight: bold;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 16px;
}
.city-current-time {
    color: #e74c3c;
    font-size: 18px;
    font-weight: 600;
}

.city-current-date {
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 5px;
    font-weight: normal;
}
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    .time-display {
        font-size: 56px;
    }
    .date-info {
        font-size: 18px;
    }
    .city-times {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    .city-current-date {
        font-size: 12px;
    }
}
@media (max-width: 768px) {
    .nav-container {
        padding: 0 10px;
    }
    
    .nav-logo a {
        font-size: 20px;
    }
    
    .nav-menu li a {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    #city-select {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    
    .nav-logo {
        margin-bottom: 10px;
    }
    
    .nav-menu ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu li {
        margin: 5px;
    }
    
    .city-selector-container {
        margin: 5px 0;
    }
    
    .container {
        padding: 15px;
        margin-top: 10px;
    }
    
    .header h1 {
        font-size: 28px;
    }
    
    .time-display {
        font-size: 48px;
        margin: 15px 0;
    }
    
    .date-info {
        font-size: 16px;
    }
    
    .timezone-info h3, .world-clock h3 {
        font-size: 20px;
    }
    
    .city-times {
        grid-template-columns: 1fr;
    }
    
    .city-current-date {
        font-size: 12px;
    }
}

.instructions {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #7f8c8d;
    font-style: italic;
}

.instructions p {
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 20px;
    display: inline-block;
}

/* 添加切换动画 */
.container {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

/* 页脚样式 */
.main-footer {
    width: 100%;
    background-color: #2c3e50;
    color: #ecf0f1;
    margin-top: 40px;
    padding: 30px 0 20px;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 20px;
}

.footer-section h4 {
    color: #3498db;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-section p {
    line-height: 1.6;
    color: #bdc3c7;
    font-size: 14px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3498db;
}

#footer-links-placeholder {
    color: #95a5a6;
    font-style: italic;
    font-size: 14px;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: #95a5a6;
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .main-footer {
        padding: 25px 0 15px;
    }
    
    .footer-section h4 {
        font-size: 16px;
    }
}