/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2em;
}

h2 {
    color: #34495e;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* 输入区域样式 */
.input-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    min-height: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.error-message.fade-out {
    opacity: 0;
}

.error-border {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2) !important;
}

/* 计时器区域样式 */
.timer-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.timer-display {
    font-family: 'Courier New', monospace;
    font-size: 2em;
    font-weight: bold;
    color: #2c3e50;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.timer-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.start-button, .pause-button, .reset-button {
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.start-button {
    background-color: #2ecc71;
}

.start-button:hover {
    background-color: #27ae60;
}

.pause-button {
    background-color: #f1c40f;
}

.pause-button:hover {
    background-color: #f39c12;
}

.reset-button {
    background-color: #e74c3c;
}

.reset-button:hover {
    background-color: #c0392b;
}

button:disabled {
    background-color: #95a5a6 !important;
    cursor: not-allowed;
}

/* 结果区域样式 */
.result-section {
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.result-item {
    margin-bottom: 15px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    position: relative; /* 为金钱动画添加定位上下文 */
}

.result-item:last-child {
    border-bottom: none;
}

/* 数字动画效果 */
.salary {
    font-size: 1.5em;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
}

.minute-salary {
    color: #e52e2e;
    font-size: 1.8em;
}

.today-income,
.monthly-income {
    color: #2e86c1;
}

/* 金钱动画效果 */
.money-animation {
    position: fixed;
    right: 20px;
    bottom: 20px;
    color: #27ae60;
    font-weight: bold;
    font-size: 1.2em;
    opacity: 0;
    transform: translateY(0);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.money-animation.active {
    animation: moneyFloat 1.5s ease-out;
}

@keyframes moneyFloat {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-30px);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px);
    }
}

/* 辅助数据样式 */
.auxiliary-data {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.auxiliary-data .result-item {
    color: #666;
    margin-bottom: 10px;
    padding: 8px;
    transition: background-color 0.3s;
}

.auxiliary-data .result-item:hover {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.hourly-salary,
.daily-salary {
    color: #34495e;
    font-size: 1.3em;
}

/* 进度条样式 */
.progress-section {
    margin-top: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.progress-section label {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #3498db);
    transition: width 0.5s ease;
    position: relative;
}

.progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 30px 30px;
    animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 30px 0;
    }
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #2c3e50;
    font-weight: 500;
}

/* 数字跳动效果 */
@keyframes numberPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.salary.updated {
    animation: numberPulse 0.5s ease;
}

/* 重置按钮样式 */
.reset-button {
    padding: 12px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.reset-button:hover {
    background-color: #c0392b;
}

/* 响应式布局 */
@media (min-width: 768px) {
    .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    h1 {
        grid-column: 1 / -1;
    }

    .input-section,
    .result-section {
        margin: 0;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 15px;
    }

    .input-section,
    .result-section {
        margin-bottom: 20px;
    }
}

/* 保存提示样式 */
.save-indicator {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #2ecc71;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.save-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

/* 操作指南面板样式 */
.guide-panel {
    grid-column: 1 / -1;
    margin-top: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.guide-panel h3 {
    padding: 20px;
    margin: 0;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.guide-panel h3:hover {
    background: #e9ecef;
}

.guide-toggle {
    font-size: 0.9em;
    color: #3498db;
    padding: 5px 10px;
    border-radius: 15px;
    background: #fff;
    transition: all 0.3s ease;
    user-select: none;
}

.guide-toggle:hover {
    background: #3498db;
    color: #fff;
}

.guide-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease-out;
    opacity: 0;
}

.guide-content.show {
    padding: 20px;
    max-height: 500px;
    opacity: 1;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transform: translateX(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.guide-content.show .guide-step {
    transform: translateX(0);
    opacity: 1;
}

.guide-content.show .guide-step:nth-child(1) { transition-delay: 0.1s; }
.guide-content.show .guide-step:nth-child(2) { transition-delay: 0.2s; }
.guide-content.show .guide-step:nth-child(3) { transition-delay: 0.3s; }
.guide-content.show .guide-step:nth-child(4) { transition-delay: 0.4s; }

.guide-step:hover {
    transform: translateX(10px);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(41, 128, 185, 0.3);
}

.guide-step p {
    margin: 0;
    line-height: 1.6;
}

.guide-step strong {
    color: #2c3e50;
    background: #e8f6ff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.guide-tip {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #e8f4f8, #d5e9f2);
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.guide-content.show .guide-tip {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.5s;
}

.guide-tip p {
    margin: 0;
    color: #2980b9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guide-tip p::before {
    content: '💡';
    font-size: 1.2em;
}

/* 已工作时长输入样式 */
.worked-time-input {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.time-inputs {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.time-input-group {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.time-input-group input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
}

.time-input-group span {
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

.time-input-group input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 输入框hover效果 */
.time-input-group:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 用户面板样式 */
.user-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-btn, .settings-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover, .settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.settings-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 15px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.user-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.username {
    font-size: 14px;
    color: #2c3e50;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    margin: auto;
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #e74c3c;
}

/* 认证表单样式 */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #3498db;
    color: #fff;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form input {
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    border-color: #3498db;
    outline: none;
}

.submit-btn {
    padding: 12px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #2980b9;
}

/* 设置面板样式 */
.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.theme-colors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.color-option {
    padding: 10px;
    text-align: center;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.color-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-option.active {
    background: #3498db;
    color: #fff;
}

.color-option.custom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.color-option input[type="color"] {
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.time-rules {
    display: grid;
    gap: 15px;
}

.rule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rule-item select {
    padding: 8px;
    border: 2px solid #eee;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.notification-settings {
    display: grid;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.volume-control input[type="range"] {
    flex: 1;
}

.save-settings-btn {
    width: 100%;
    padding: 12px;
    background: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.save-settings-btn:hover {
    background: #27ae60;
}

/* 工具类 */
.hidden {
    display: none !important;
}

/* 主题样式 */
[data-theme="dark"] {
    background-color: #1a1a1a;
    color: #fff;
}

[data-theme="dark"] .container {
    background-color: #2d2d2d;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    background-color: #ffffff;
    color: #333;
}

[data-theme="light"] .container {
    background-color: #f8f9fa;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
} 