/* ==================== 基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 科技感主题 */
    --primary-color: #00f5ff;
    --secondary-color: #7b2cbf;
    --accent-color: #ff00ff;
    --bg-dark: #0a0e27;
    --bg-card: rgba(20, 30, 60, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #00f5ff;
    --glow-color: rgba(0, 245, 255, 0.5);
    --grid-color: rgba(0, 245, 255, 0.03);
}

/* 简约白主题 */
[data-theme="minimal"] {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --bg-dark: #ecf0f1;
    --bg-card: rgba(255, 255, 255, 0.9);
    --text-primary: #2c3e50;
    --text-secondary: #3498db;
    --glow-color: rgba(52, 152, 219, 0.3);
    --grid-color: rgba(44, 62, 80, 0.05);
}

/* 暗夜黑主题 */
[data-theme="dark"] {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffe66d;
    --bg-dark: #1a1a2e;
    --bg-card: rgba(22, 33, 62, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #ff6b6b;
    --glow-color: rgba(255, 107, 107, 0.5);
    --grid-color: rgba(255, 107, 107, 0.03);
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: all 0.3s ease;
}

/* ==================== 背景特效 ==================== */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(ellipse at top, rgba(123, 44, 191, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(0, 245, 255, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0a0e27 100%);
}

[data-theme="minimal"] .background {
    background: linear-gradient(135deg, #ecf0f1 0%, #bdc3c7 100%);
}

[data-theme="dark"] .background {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* 六边形网格 */
.grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--grid-color) 2px, transparent 2px),
        linear-gradient(90deg, var(--grid-color) 2px, transparent 2px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

/* 脉冲波 */
.pulse-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.pulse-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    animation: pulseExpand 8s ease-out infinite;
}

.pulse-wave:nth-child(1) { animation-delay: 0s; }
.pulse-wave:nth-child(2) { animation-delay: 2s; }
.pulse-wave:nth-child(3) { animation-delay: 4s; }
.pulse-wave:nth-child(4) { animation-delay: 6s; }

@keyframes pulseExpand {
    0% {
        width: 100px;
        height: 100px;
        opacity: 0.6;
    }
    100% {
        width: 200vmax;
        height: 200vmax;
        opacity: 0;
    }
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: float 15s infinite;
    box-shadow: 0 0 10px var(--primary-color);
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* ==================== 控制面板 ==================== */
.control-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
    align-items: center;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--glow-color);
}

.heart-counter {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    font-weight: bold;
    backdrop-filter: blur(10px);
}

.heart-counter i {
    animation: heartbeat 1s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ==================== 容器 ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* ==================== 头部 ==================== */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    text-transform: uppercase;
    letter-spacing: 3px;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.logo i {
    -webkit-text-fill-color: var(--primary-color);
    filter: drop-shadow(0 0 10px var(--glow-color));
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

.header-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), var(--accent-color), var(--primary-color), transparent);
    margin-top: 1rem;
    animation: linePulse 2s ease-in-out infinite;
}

@keyframes linePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ==================== 主时钟 ==================== */
.main-clock {
    text-align: center;
    padding: 3rem;
    margin-bottom: 3rem;
    position: relative;
    background: var(--bg-card);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 245, 255, 0.3);
    box-shadow:
        0 0 30px rgba(0, 245, 255, 0.2),
        inset 0 0 60px rgba(0, 245, 255, 0.05);
    overflow: hidden;
}

.clock-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
}

/* 模拟时钟 */
.analog-clock {
    width: 250px;
    height: 250px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 1;
}

.clock-face {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-card);
    border: 4px solid var(--primary-color);
    box-shadow:
        0 0 30px var(--glow-color),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.clock-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 10px var(--glow-color);
}

.clock-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    background: var(--primary-color);
    border-radius: 4px;
    transition: transform 0.1s cubic-bezier(0.4, 2.3, 0.3, 1);
}

.hour-hand {
    width: 6px;
    height: 60px;
    margin-left: -3px;
    background: var(--text-primary);
    box-shadow: 0 0 10px var(--glow-color);
}

.minute-hand {
    width: 4px;
    height: 80px;
    margin-left: -2px;
    background: var(--secondary-color);
    box-shadow: 0 0 10px var(--glow-color);
}

.second-hand {
    width: 2px;
    height: 90px;
    margin-left: -1px;
    background: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
}

.clock-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.clock-marker {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 10px;
    background: var(--primary-color);
    transform-origin: center 115px;
}

.clock-marker.hour {
    width: 4px;
    height: 15px;
    background: var(--accent-color);
}

.main-time {
    font-family: 'Orbitron', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow:
        0 0 20px var(--glow-color),
        0 0 40px var(--glow-color),
        0 0 60px rgba(0, 245, 255, 0.3);
    position: relative;
    z-index: 1;
    letter-spacing: 5px;
    animation: timeGlow 2s ease-in-out infinite;
}

@keyframes timeGlow {
    0%, 100% { text-shadow: 0 0 20px var(--glow-color), 0 0 40px var(--glow-color), 0 0 60px rgba(0, 245, 255, 0.3); }
    50% { text-shadow: 0 0 30px var(--glow-color), 0 0 60px var(--glow-color), 0 0 90px rgba(0, 245, 255, 0.5); }
}

.main-date {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

.timezone-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    color: var(--primary-color);
    position: relative;
    z-index: 1;
}

.timezone-display i {
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==================== 标签导航 ==================== */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 1rem 2rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    background: var(--bg-card);
    border: 2px solid rgba(0, 245, 255, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.tab-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(123, 44, 191, 0.5);
}

.tab-btn i {
    font-size: 1.2rem;
}

/* ==================== 标签内容 ==================== */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

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

/* ==================== 添加城市按钮 ==================== */
.add-city-section {
    text-align: center;
    margin-bottom: 2rem;
}

/* ==================== 世界时钟 ==================== */
.world-clocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.city-clock {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 245, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: move;
}

.city-clock::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(0, 245, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.city-clock:hover {
    transform: translateY(-5px);
    box-shadow:
        0 10px 30px rgba(0, 245, 255, 0.3),
        inset 0 0 30px rgba(0, 245, 255, 0.1);
    border-color: var(--primary-color);
}

.city-clock.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.city-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.city-header i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.city-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    flex-grow: 1;
}

.timezone {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    background: rgba(0, 245, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(0, 245, 255, 0.3);
}

.city-time {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-color);
    position: relative;
    z-index: 1;
}

.city-day {
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

.city-date {
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.remove-city {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.city-clock:hover .remove-city {
    opacity: 1;
}

.remove-city:hover {
    transform: scale(1.2);
}

/* ==================== 闹钟 ==================== */
.alarm-container {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(0, 245, 255, 0.3);
    backdrop-filter: blur(10px);
    max-width: 800px;
    margin: 0 auto;
}

.alarm-add {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid rgba(0, 245, 255, 0.2);
}

.alarm-add h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alarm-inputs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.alarm-time-input input {
    padding: 0.75rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    background: rgba(0, 245, 255, 0.1);
    border: 2px solid rgba(0, 245, 255, 0.3);
    border-radius: 10px;
    color: var(--primary-color);
}

.alarm-inputs input[type="text"] {
    flex-grow: 1;
    padding: 0.75rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    background: rgba(0, 245, 255, 0.1);
    border: 2px solid rgba(0, 245, 255, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
}

.alarm-list h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alarms {
    max-height: 400px;
    overflow-y: auto;
}

.alarms::-webkit-scrollbar {
    width: 8px;
}

.alarms::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.alarms::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.alarm-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(0, 245, 255, 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: 10px;
    animation: slideIn 0.3s ease;
}

.alarm-item.disabled {
    opacity: 0.5;
}

.alarm-info {
    flex-grow: 1;
}

.alarm-time-display {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-color);
}

.alarm-label-display {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.alarm-actions {
    display: flex;
    gap: 0.5rem;
}

.alarm-toggle {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.alarm-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--glow-color);
}

.alarm-delete {
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.alarm-delete:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--accent-color);
}

/* ==================== 时区转换器 ==================== */
.converter-container {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(0, 245, 255, 0.3);
    backdrop-filter: blur(10px);
    max-width: 900px;
    margin: 0 auto;
}

.converter-inputs {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.converter-group {
    flex: 1;
    min-width: 250px;
}

.converter-group label {
    display: block;
    font-family: 'Orbitron', sans-serif;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.converter-group select,
.converter-group input {
    width: 100%;
    padding: 0.75rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    background: rgba(0, 245, 255, 0.1);
    border: 2px solid rgba(0, 245, 255, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.converter-group select:focus,
.converter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
}

.converter-result {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--glow-color);
    padding: 1rem;
    background: rgba(0, 245, 255, 0.1);
    border-radius: 10px;
    text-align: center;
}

.converter-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    animation: pulseIcon 2s ease-in-out infinite;
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.converter-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    padding: 1rem;
    background: rgba(0, 245, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 245, 255, 0.2);
}

.info-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.info-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* ==================== 计时器 ==================== */
.timer-container {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(0, 245, 255, 0.3);
    backdrop-filter: blur(10px);
    max-width: 800px;
    margin: 0 auto;
}

.timer-display {
    text-align: center;
    margin-bottom: 2rem;
}

.timer-time {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 0 0 30px var(--glow-color);
}

.timer-inputs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.input-group label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group input {
    width: 80px;
    padding: 0.75rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    text-align: center;
    background: rgba(0, 245, 255, 0.1);
    border: 2px solid rgba(0, 245, 255, 0.3);
    border-radius: 10px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
}

.timer-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.timer-progress {
    width: 100%;
    height: 6px;
    background: rgba(0, 245, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 0 10px var(--glow-color);
    transition: width 1s linear;
}

/* ==================== 秒表 ==================== */
.stopwatch-container {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(0, 245, 255, 0.3);
    backdrop-filter: blur(10px);
    max-width: 800px;
    margin: 0 auto;
}

.stopwatch-display {
    text-align: center;
    margin-bottom: 2rem;
}

.stopwatch-time {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 0 0 30px var(--glow-color);
}

.milliseconds {
    font-size: 2rem;
    opacity: 0.7;
}

.stopwatch-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.laps-container {
    margin-top: 2rem;
}

.laps-container h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.laps-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(0, 245, 255, 0.2);
}

.laps-list::-webkit-scrollbar {
    width: 8px;
}

.laps-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.laps-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.lap-record {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(0, 245, 255, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 5px;
    font-family: 'Orbitron', sans-serif;
    animation: slideIn 0.3s ease;
}

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

.lap-number {
    color: var(--text-secondary);
}

.lap-time {
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--glow-color);
}

.no-records {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 2rem;
}

/* ==================== 模态框 ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid rgba(0, 245, 255, 0.2);
}

.modal-header h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

#citySearch {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    background: rgba(0, 245, 255, 0.1);
    border: 2px solid rgba(0, 245, 255, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

#citySearch:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
}

.city-list {
    max-height: 400px;
    overflow-y: auto;
}

.city-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: rgba(0, 245, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.city-item:hover {
    background: rgba(0, 245, 255, 0.1);
    transform: translateX(5px);
    border-left: 3px solid var(--primary-color);
}

.city-item-name {
    font-weight: 600;
}

.city-item-timezone {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ==================== 科技感爱心 ==================== */
.heart-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-heart {
    position: relative;
    width: 500px;
    height: 500px;
    animation: heartAppear 3s ease-out forwards;
}

.heart-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #ff1744, #ff4081, #ff1744);
    clip-path: path('M150,260 C40,160 40,80 150,40 C200,20 240,40 260,80 C280,40 320,20 370,40 C480,80 480,160 370,260 L260,350 L150,260 Z');
    filter: drop-shadow(0 0 50px #ff1744) drop-shadow(0 0 100px #ff4081);
    animation: heartBeat 1s ease-in-out infinite;
}

.heart-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid #ff1744;
    border-radius: 50%;
    animation: ringExpand 2s ease-out infinite;
    box-shadow: 0 0 20px #ff4081, inset 0 0 20px rgba(255, 23, 68, 0.3);
}

.heart-ring:nth-child(1) {
    width: 350px;
    height: 350px;
    animation-delay: 0s;
}

.heart-ring:nth-child(2) {
    width: 420px;
    height: 420px;
    animation-delay: 0.3s;
}

.heart-ring:nth-child(3) {
    width: 500px;
    height: 500px;
    animation-delay: 0.6s;
}

.heart-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.heart-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ff4081;
    border-radius: 50%;
    box-shadow: 0 0 15px #ff1744, 0 0 30px #ff4081;
    animation: particleExplode 2s ease-out infinite;
}

@keyframes heartAppear {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    30% {
        opacity: 1;
        transform: scale(1.2) rotate(10deg);
    }
    50% {
        transform: scale(1) rotate(0deg);
    }
    70% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: scale(1.5) rotate(-10deg);
    }
}

@keyframes heartBeat {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes ringExpand {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

@keyframes particleExplode {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

/* ==================== 按钮 ==================== */
.btn {
    padding: 1rem 2rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 245, 255, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffd60a, #ff9500);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff4757, #ff3838);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .logo {
        font-size: 1.5rem;
    }

    .main-time {
        font-size: 3rem;
    }

    .main-date {
        font-size: 1rem;
    }

    .analog-clock {
        width: 200px;
        height: 200px;
    }

    .city-time {
        font-size: 2rem;
    }

    .timer-time,
    .stopwatch-time {
        font-size: 2.5rem;
    }

    .milliseconds {
        font-size: 1.5rem;
    }

    .tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
        justify-content: center;
    }

    .control-panel {
        top: 10px;
        right: 10px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .converter-inputs {
        flex-direction: column;
    }

    .converter-icon {
        transform: rotate(90deg);
    }
}

/* ==================== 底部 ==================== */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

.footer-text {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    opacity: 0.9;
}

.footer-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.7;
    font-style: italic;
}

.footer-shortcuts {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-top: 1rem;
}

.footer-icp {
    font-size: 0.9rem;
    margin-top: 1rem;
    opacity: 0.8;
}

.footer-icp a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-icp a:hover {
    opacity: 0.7;
}

@media (max-width: 480px) {
    .footer {
        padding: 2rem 1rem;
    }

    .footer-text {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .footer-hint {
        font-size: 0.8rem;
    }

    .footer-shortcuts {
        font-size: 0.75rem;
    }

    /* 移动端爱心优化 */
    .tech-heart {
        width: 350px !important;
        height: 350px !important;
    }

    .heart-core {
        width: 200px !important;
        height: 200px !important;
        clip-path: path('M100,173 C27,107 27,53 100,27 C133,13 160,27 173,53 C187,27 213,13 247,27 C320,53 320,107 247,173 L173,233 L100,173 Z') !important;
    }

    .heart-ring:nth-child(1) {
        width: 250px !important;
        height: 250px !important;
    }

    .heart-ring:nth-child(2) {
        width: 300px !important;
        height: 300px !important;
    }

    .heart-ring:nth-child(3) {
        width: 350px !important;
        height: 350px !important;
    }

    .heart-particle {
        width: 4px !important;
        height: 4px !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .main-clock {
        padding: 2rem 1rem;
    }

    .main-time {
        font-size: 2.5rem;
    }

    .world-clocks {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .timer-controls,
    .stopwatch-controls {
        flex-direction: column;
    }

    .input-group input {
        width: 70px;
        font-size: 1.2rem;
    }

    /* 确保爱心在小屏幕上也能完整显示 */
    .heart-container {
        padding: 20px;
    }

    .tech-heart {
        width: 280px !important;
        height: 280px !important;
    }

    .heart-core {
        width: 160px !important;
        height: 160px !important;
        clip-path: path('M80,138 C22,86 22,42 80,22 C107,10 128,22 139,42 C150,22 171,10 198,22 C256,42 256,86 198,138 L139,187 L80,138 Z') !important;
    }

    .heart-ring:nth-child(1) {
        width: 200px !important;
        height: 200px !important;
        border-width: 2px !important;
    }

    .heart-ring:nth-child(2) {
        width: 240px !important;
        height: 240px !important;
        border-width: 2px !important;
    }

    .heart-ring:nth-child(3) {
        width: 280px !important;
        height: 280px !important;
        border-width: 2px !important;
    }

    .heart-particle {
        width: 3px !important;
        height: 3px !important;
    }
}
