/* 人民币大小写转换器样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Hiragino Sans GB", "黑体", sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid #e60012;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #e60012;
    font-size: 28px;
    margin-bottom: 15px;
}

.date-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    main {
        grid-template-columns: 1.5fr 1fr;
    }
}

.converter-section,
.lunar-section,
.financial-section,
.history-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.converter-section h2,
.lunar-section h2,
.financial-section h2,
.history-section h2 {
    font-size: 22px;
    color: #e60012;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

button {
    background-color: #e60012;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: block;
    width: 100%;
    margin-top: 10px;
}

button:hover {
    background-color: #c70010;
}

.result {
    margin-top: 30px;
}

.result h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

.result-box {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

.number-result,
.capital-result {
    margin-bottom: 10px;
    word-break: break-all;
}

.capital-result {
    color: #e60012;
    font-weight: bold;
    font-size: 18px;
}

.lunar-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lunar-date {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.lunar-date p {
    margin-bottom: 5px;
}

.lunar-detail {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.yi-ji {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.yi,
.ji {
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 10px;
}

.yi h4,
.ji h4 {
    margin-bottom: 8px;
    text-align: center;
}

.yi {
    border-left: 3px solid #28a745;
}

.ji {
    border-left: 3px solid #dc3545;
}

.chong-sha {
    display: flex;
    justify-content: space-between;
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 10px;
}

.chong-sha p {
    margin-right: 10px;
}

footer {
    margin-top: 30px;
    text-align: center;
    color: #666;
    font-size: 14px;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.festival-info {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.update-time {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

/* 新增样式 */
.intro-text {
    margin-bottom: 20px;
    line-height: 1.7;
}

.currency-knowledge {
    margin-top: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #eee;
}

.currency-knowledge h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

.knowledge-content {
    margin-bottom: 20px;
}

.knowledge-content p {
    margin-bottom: 10px;
}

.currency-fact {
    background-color: #fff3f3;
    border-left: 3px solid #e60012;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.currency-fact h4 {
    color: #e60012;
    margin-bottom: 10px;
}

.amount-table {
    margin-top: 30px;
    overflow-x: auto;
}

.amount-table h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

.amount-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.amount-table th,
.amount-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

.amount-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.amount-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.amount-table tr:hover {
    background-color: #f1f1f1;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.financial-news {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
}

.financial-news h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.news-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.financial-tip {
    background-color: #f0f8ff;
    border-left: 3px solid #2ca9e1;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.financial-tip h4 {
    color: #2ca9e1;
    margin-bottom: 10px;
}

.history-content {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
}

.history-year {
    font-weight: bold;
    color: #e60012;
    margin-bottom: 5px;
}

.daily-poem {
    font-style: italic;
    margin: 15px 0;
    color: #666;
}

.blessing {
    font-weight: bold;
    color: #e60012;
    margin: 15px 0;
    transition: opacity 0.5s ease;
}

.footer-links {
    margin: 15px 0;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #e60012;
    text-decoration: underline;
}

.lucky-number {
    font-weight: bold;
    color: #e60012;
    transition: color 0.5s ease;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-button:hover {
    color: #333;
}

.modal h2 {
    color: #e60012;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h3 {
    margin-bottom: 10px;
    color: #333;
}

.modal-section ul,
.modal-section ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.modal-section li {
    margin-bottom: 5px;
}

@media (max-width: 576px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 24px;
    }

    .date-info {
        flex-direction: column;
        gap: 5px;
    }

    .converter-section,
    .lunar-section,
    .financial-section,
    .history-section {
        padding: 15px;
    }

    .yi-ji {
        grid-template-columns: 1fr;
    }

    .chong-sha {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 15px;
    }
}

/* 新增的货币大写历史部分样式 */
.currency-history,
.currency-rules,
.number-origin {
    margin-top: 30px;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.currency-history h3,
.currency-rules h3,
.number-origin h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    color: #e60012;
}

.history-content-box,
.origin-content {
    line-height: 1.8;
    text-align: justify;
}

.rules-content ul {
    margin-left: 20px;
    line-height: 1.8;
}

.rules-content li {
    margin-bottom: 15px;
    text-align: justify;
    position: relative;
    padding-left: 10px;
}

.rules-content li:before {
    content: "";
    position: absolute;
    left: -10px;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #e60012;
}

/* 投资理财建议部分样式 */
.investment-section {
    margin-bottom: 20px;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.investment-section h2 {
    font-size: 22px;
    color: #e60012;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.investment-advice {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.advice-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    border-left: 3px solid #28a745;
    transition: transform 0.3s ease;
}

.advice-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.advice-item h3 {
    font-size: 16px;
    color: #28a745;
    margin-bottom: 10px;
}

.advice-item p {
    font-size: 14px;
    line-height: 1.6;
    text-align: justify;
}

/* 友情链接样式 */
.friend-links {
    margin: 25px 0 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.friend-links h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    position: relative;
}

.friend-links h4:after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: #e60012;
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.links-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.links-group a {
    color: #666;
    text-decoration: none;
    padding: 4px 8px;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.links-group a:hover {
    color: #e60012;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

/* 备案信息样式 */
.icp-info {
    margin: 10px 0;
    font-size: 13px;
}

.icp-info a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.icp-info a:hover {
    color: #e60012;
}

@media (max-width: 576px) {
    .links-group {
        gap: 5px;
    }

    .links-group a {
        padding: 3px 6px;
        font-size: 12px;
    }
}