/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 100%;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    position: relative;
}

h1 {
    font-size: 1.5rem;
    text-align: center;
    flex-grow: 1;
}

.reset-button {
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
}

.records-button {
    background-color: #4d79ff;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
}

/* 主要内容样式 */
main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.timer-container {
    text-align: center;
    padding: 30px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.timer-display {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 30px;
    color: #333;
}

.timer-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.timer-button.paused {
    background-color: #ff9800;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 500px;
    position: relative;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover {
    color: black;
}

/* 记录表格样式 */
.records-container {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    position: sticky;
    top: 0;
}

/* 重置弹窗样式 */
#resetPassword {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.confirm-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
}

.cancel-button {
    background-color: #ccc;
    color: black;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .timer-display {
        font-size: 2.8rem;
    }
    
    .timer-button {
        padding: 12px 30px;
        font-size: 1.1rem;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    .reset-button, .records-button {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}
