body {
    font-family: "Microsoft YaHei", sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    color: #333;
    width: 100%;
}

.container {
    width: 90%;
    margin: auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    max-width: 1000px;
}

h1 {
    text-align: center;
    color: #007bff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

h1:hover {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    transform: scale(1.05);
}

.calculator {
    margin-bottom: 40px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
}

h2 {
    color: #007bff;
    transition: all 0.3s ease;
    cursor: pointer;
}

h2:hover {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.input-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.input-group label {
    margin-right: 10px;
    width: 100px;
    text-align: right;
    font-size: 1.2em;
    color: #555;
}

.input-group input, .input-group select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
    height: 30px;
    font-size: 1em;
    font-family: "Microsoft YaHei", sans-serif;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-group input:focus, .input-group select:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
    background: #fff;
}

.button-group {
    text-align: center;
    margin-bottom: 10px;
}

.button-group button, .date-mode-button {
    padding: 10px 15px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    background: #007bff;
    color: white;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    height: 30px;
    line-height: 30px;
    width: 25%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.button-group button:hover, .date-mode-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.date-mode-button.active {
    background: linear-gradient(145deg, #007bff, #0056b3);
}

.result {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.result-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.penalty-result .result-row {
    flex-wrap: nowrap;
    margin-left: 0;
}

.result-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
    margin-left: 0px;
}

.result-input-wrapper button {
    padding: 0 20px;
    border: 1px solid #007bff;
    border-radius: 4px;
    background-color: white;
    color: #007bff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    font-size: 1.2em;
    font-weight: normal;
    line-height: 1;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.result-input-wrapper button:hover {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.result label {
    margin-right: 10px;
    width: 100px;
    text-align: right;
    font-size: 1.2em;
    color: #555;
}

.result input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
    background-color: #f0f0f0;
    height: 30px;
    font-size: 1em;
    font-family: "Microsoft YaHei", sans-serif;
    transition: all 0.3s ease;
}

.result input:focus {
    background-color: #fff;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
}

.result-input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 180px;
    background-color: #fff;
    margin-right: 15px;
    display: inline-block;
    flex: 1;
    height: 40px;
    font-size: 1.8em;
    font-family: "Microsoft YaHei", sans-serif;
}

#startDate input, #endDate input {
    font-size: 1em;
    height: 30px;
}

.date-mode-button {
    background: linear-gradient(145deg, #ddd, #bbb);
    color: #333;
    font-size: 1.2em;
    font-weight: bold;
}

.date-mode-button.active {
    background: linear-gradient(145deg, #007bff, #0056b3);
    color: white;
}

#endDateResult input, #penaltyResult, #resultDays {
    text-align: center;
    font-size: 1.5em;
    color: #007bff;
    font-weight: bold;
    height: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.equal-width-block {
    display: flex;
    flex: 1;
    margin: 0 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.equal-width-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.equal-width-container {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

/* 添加加载动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.container {
    animation: fadeIn 0.5s ease-out;
}

/* 移动端样式 */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 10px;
        text-align: center;
    }

    .input-group {
        flex-direction: column;
        align-items: center;
    }

    .input-group label {
        width: auto;
        text-align: center;
        margin-bottom: 5px;
    }

    .button-group {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .button-group button, .date-mode-button {
        width: 45%;
        margin: 5px 2%;
        padding: 8px 10px;
    }

    .result-input {
        width: 100%;
        margin-right: 0;
        text-align: center;
    }

    .equal-width-container {
        flex-direction: column;
        align-items: center;
    }

    .equal-width-block {
        margin: 10px 0;
        text-align: center;
    }
}
