/* 春节麻将计算器 - 春节主题样式 */

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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 50%, #FF4500 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #DC143C 0%, #FF6B6B 100%);
    color: white;
    padding: 30px;
    text-align: center;
    border-bottom: 5px solid #FFD700;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

/* 主内容区域 */
.main-content {
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* 各个区域 */
section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #FFD700;
}

section h2 {
    color: #DC143C;
    margin-bottom: 20px;
    font-size: 1.8em;
    border-bottom: 3px solid #FFD700;
    padding-bottom: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #8B0000;
    font-size: 1.1em;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #FFD700;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #DC143C;
    box-shadow: 0 0 10px rgba(220, 20, 60, 0.2);
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px 15px;
    background: #FFF5E6;
    border-radius: 20px;
    border: 2px solid #FFD700;
    transition: all 0.3s ease;
    font-weight: normal;
    font-size: 1em;
}

.radio-group label:hover {
    background: #FFE5CC;
    transform: translateY(-2px);
}

.radio-group input[type="radio"] {
    accent-color: #DC143C;
    transform: scale(1.2);
}

/* 按钮样式 */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #DC143C 0%, #FF6B6B 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #B22222 0%, #FF4444 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #8B0000;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #FFC700 0%, #FF8C00 100%);
}

.btn-success {
    background: linear-gradient(135deg, #228B22 0%, #32CD32 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9em;
}

/* 结果框 */
.result-box {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #FFF5E6 0%, #FFE5CC 100%);
    border-radius: 10px;
    border: 2px solid #FFD700;
    display: none;
}

.result-box h3 {
    color: #8B0000;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #FFD700;
    font-size: 1.1em;
}

.result-item span:first-child {
    font-weight: bold;
    color: #8B0000;
}

.result-item.total {
    border-bottom: none;
    border-top: 2px solid #DC143C;
    padding-top: 15px;
    margin-top: 15px;
    font-size: 1.3em;
    font-weight: bold;
}

.result-item.total span:last-child {
    color: #DC143C;
    font-size: 1.4em;
}

/* 历史记录 */
.history-controls {
    margin-bottom: 15px;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #FFF5E6;
    border-radius: 8px;
}

.history-item {
    padding: 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 4px solid #FFD700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateX(5px);
    border-left-color: #DC143C;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: bold;
    color: #8B0000;
}

.history-item-detail {
    font-size: 0.9em;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 30px;
    font-style: italic;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, #FFF5E6 0%, #FFE5CC 100%);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #FFD700;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.stat-card h3 {
    color: #8B0000;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.stat-value {
    color: #DC143C;
    font-size: 2em;
    font-weight: bold;
}

/* 图表容器 */
.chart-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #FFD700;
    height: 300px;
}

#score-chart {
    width: 100%;
    height: 100%;
}

/* 页脚 */
.footer {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 1.1em;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .header h1 {
        font-size: 2em;
    }
    
    .main-content {
        padding: 15px;
    }
    
    section {
        padding: 15px;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 滚动条样式 */
.history-list::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-track {
    background: #FFF5E6;
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #FFD700;
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #FFA500;
}