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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #fff;
    color: #333;
}

/* 定义数字字体 */
.amount,
.time-value span:first-child,
.time-separator {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* 文字按钮样式 */
.text-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 4px 12px;
    font-size: 14px;
    transition: color 0.3s;
}

.text-btn:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 时间段切换器样式 */
.period-switcher {
    text-align: center;
    margin-bottom: 10px;
}

.period-btn {
    padding: 8px 16px;
    margin: 0 4px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.3s;
}

.period-btn.active {
    background-color: #007bff;
    color: white;
}

/* 工资显示样式 */
.salary-display {
    text-align: center;
    position: relative;
    margin-bottom: 10px;
}

.amount {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 4px;
    transition: color 0.3s;
}

.amount.updating {
    color: #28a745;
}

/* 倒计时样式 */
.countdown {
    margin: 0 auto;
    max-width: 300px;
}

.time-picker {
    width: 300px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.time-header {
    text-align: center;
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.time-content {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px 2px;
    border-radius: 4px;
    height: 48px;
}

.time-column {
    text-align: center;
    padding: 0 6px;
}

.time-value {
    font-size: 1.75rem;
    font-weight: bold;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    line-height: 1;
    position: relative;
}

.time-value span:first-child {
    padding: 0;
    min-width: 2em;
    text-align: center;
    color: #333;
    font-weight: 500;
    line-height: 1.2;
    font-size: 1.5rem;
}

.time-unit {
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.4);
    font-weight: normal;
    position: absolute;
    right: -0.5em;
    top: 50%;
    transform: translateY(-45%);
}

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

.countdown.urgent .time-picker {
    background: rgba(220, 53, 69, 0.05);
}

.countdown.urgent .time-value span:first-child {
    animation: pulse 1s infinite;
    color: #dc3545;
}

.countdown.urgent .time-separator {
    color: rgba(220, 53, 69, 0.2);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    background-color: #f8fbff;
}

.form-group input[type="date"]:focus,
.form-group input[type="time"]:focus {
    border-color: #007bff;
    background-color: #f8fbff;
}

.form-group input[type="number"]:focus {
    border-color: #007bff;
    background-color: #f8fbff;
}

.form-group select:hover {
    border-color: #0056b3;
    cursor: pointer;
}

.form-actions {
    text-align: right;
    margin-top: 30px;
}

.btn-primary {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .amount {
        font-size: 3rem;
    }
    
    .period-switcher {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .period-btn {
        margin: 4px;
    }
    
    .time-picker {
        width: 280px;
        padding: 8px;
    }
    
    .time-display {
        font-size: 1.5rem;
    }
    
    .time-value {
        font-size: 1.5rem;
    }
    
    .time-unit {
        font-size: 0.75rem;
    }
    
    .time-separator {
        font-size: 1.5rem;
    }
} 

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

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    color: #666;
}

.close-btn:hover {
    color: #333;
} 

/* 添加自定义休息天数输入框样式 */
#customRestDaysGroup {
    transition: all 0.3s ease;
} 

/* 年份选择器样式 */
.year-selector {
    display: inline-block;
    position: relative;
}

.year-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    margin-top: 5px;
    min-width: 100px;
}

.year-selector:hover .year-dropdown {
    display: block;
}

.year-option {
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.year-option:hover {
    background-color: #f8f9fa;
    color: #007bff;
} 

/* 定义中文字体 */
.time-header,
.time-unit,
.period-btn,
.modal-content h2,
.form-group label {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", sans-serif;
} 

/* 设置按钮容器 */
.settings-container {
    margin-bottom: 10px;
} 

/* 当前时间显示样式 */
.current-time {
    text-align: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* 昵称显示区域样式 */
.nickname-container {
    text-align: center;
    margin-bottom: 10px;
    padding: 0 20px;
    position: relative;
}

.nickname-display {
    display: inline-flex;
    align-items: flex-end;
    gap: 4px;
    position: relative;
}

.nickname-text {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    transition: color 0.3s;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", sans-serif;
    line-height: 1;
}

.edit-nickname-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
    transition: all 0.3s;
    color: #666;
    display: flex;
    align-items: flex-end;
    height: 32px;
    margin-left: 0;
    margin-bottom: 0;
}

.edit-nickname-btn svg {
    margin-bottom: 2px;
}

.edit-nickname-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.nickname-edit {
    margin-top: 12px;
}

.nickname-input {
    padding: 8px 12px;
    border: 2px solid #007bff;
    border-radius: 6px;
    font-size: 16px;
    width: 200px;
    margin-right: 8px;
    transition: all 0.3s;
}

.nickname-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.save-nickname-btn {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.save-nickname-btn:hover {
    background-color: #0056b3;
}

/* 本月工作日显示样式 */
.work-days-info {
    display: none;
    margin-top: 20px;
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.work-days-label {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", sans-serif;
}

.work-days-value {
    font-size: 1.5rem;
    font-weight: 500;
    color: #333;
}

.work-days-unit {
    font-size: 0.875rem;
    color: #999;
    margin-left: 4px;
} 

.date-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-input {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.reset-btn {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.reset-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
} 

/* 添加必填字段标记 */
.form-group label.required::after {
    content: '*';
    color: #dc3545;
    margin-left: 4px;
} 

/* 重置默认样式 */
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
}

/* 选择框的下拉箭头样式 */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

/* 悬浮状态 */
input[type="date"]:hover,
input[type="time"]:hover,
select:hover {
    background-color: #e6f7ff;
    border-color: #1890ff;
}

/* 选中状态 */
input[type="date"]:focus,
input[type="time"]:focus,
select:focus {
    background-color: #e6f7ff;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 下拉选项样式 */
select option {
    padding: 8px 12px;
    background-color: #fff;
}

select option:hover {
    background-color: #e6f7ff;
}

select option:checked {
    background-color: #e6f7ff;
    color: #1890ff;
}

/* 修改日期和时间选择器的内部按钮颜色 */
.form-group input[type="date"]::-webkit-calendar-picker-indicator,
.form-group input[type="time"]::-webkit-calendar-picker-indicator {
    opacity: 0.65 !important;
    cursor: pointer !important;
}

.form-group input[type="date"]:focus::-webkit-calendar-picker-indicator,
.form-group input[type="time"]:focus::-webkit-calendar-picker-indicator {
    opacity: 0.9 !important;
} 