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

:root {
    --primary-color: #0a84ff;
    --primary-gradient: linear-gradient(135deg, #0a84ff, #00d2ff);
    --bg-color: #0a0a0a;
    --card-bg: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.5);
    --accent-green: rgba(48, 209, 88, 0.9);
    --accent-yellow: rgba(255, 214, 10, 0.9);
    --accent-red: rgba(255, 69, 58, 0.9);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --border-radius: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-color);
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.container {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
}

.timer-setup {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh; /* 占满全屏 */
}

/* 时间显示部分 - 占满上部 */
.display {
    text-align: center;
    padding: 0;
    height: 75vh; /* 增大高度占比 */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.time-display {
    font-size: 18vw; /* 增大字体 */
    font-weight: 300;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin: 0;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    width: 60%;
    position: absolute;
    bottom: 30px; /* 调整位置 */
}

.progress {
    height: 100%;
    background: var(--primary-gradient);
    width: 100%;
    transition: width 1s linear;
}

/* 控制和设置部分 */
.controls-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.controls {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    margin: 0.5rem 0 1.5rem; /* 调整间距 */
}

button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

button:hover::before {
    opacity: 1;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    background-position: right center;
}

#startBtn {
    background: rgba(40, 60, 70, 0.8);
    border-left: 3px solid rgba(48, 209, 88, 0.6);
    flex: 1;
    max-width: 160px;
}

#pauseBtn {
    background: rgba(60, 55, 40, 0.8);
    border-left: 3px solid rgba(255, 214, 10, 0.6);
    color: var(--text-primary);
    flex: 1;
    max-width: 160px;
}

#resetBtn {
    background: rgba(70, 40, 40, 0.8);
    border-left: 3px solid rgba(255, 69, 58, 0.6);
    flex: 1;
    max-width: 160px;
}

button:disabled {
    background: rgba(40, 40, 40, 0.5);
    color: rgba(255, 255, 255, 0.3);
    border-left-color: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
}

.time-input {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: block;
    text-align: center;
}

input[type="number"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
    text-align: center;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

input[type="range"] {
    width: 100%;
    height: 4px;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-gradient);
    border-radius: 50%;
    cursor: pointer;
}

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

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    max-width: 350px;
    width: 90%;
    animation: popIn 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.6rem;
    font-weight: 600;
}

#closeAlert {
    background: rgba(40, 50, 70, 0.8);
    border-left: 3px solid var(--primary-color);
    color: white;
    padding: 0.8rem 2rem;
    width: 100%;
    max-width: none;
    border-radius: 8px;
}

#closeAlert:hover {
    background: rgba(45, 55, 75, 0.9);
}

.alert-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .time-display {
        font-size: 22vw; /* 移动设备上更大的字体 */
    }
    
    .time-input {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    button {
        width: 100%;
        max-width: 100% !important;
    }
}

@media (min-width: 1200px) {
    .time-display {
        font-size: 220px; /* 在大屏幕上限制最大字体大小 */
    }
} 