/* 重置外部样式，确保卡片宽度统一 */
#lengthSelector,
#yesterdayResult,
#historyList {
    max-width: 100% !important;
    width: 100% !important;
}
/* Daily Result Page Styles */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 统一卡片样式 - 所有区域使用相同的容器样式 */
.length-selector-container,
.yesterday-section,
.history-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 100%;
    width: 100%;
}

/* Word Length Selector */
.length-selector-header {
    margin-bottom: 20px;
}

.length-selector-header h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 22px;
}

.selector-description {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.length-selector-horizontal {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.length-selector-btn {
    flex: 0 0 auto;
    min-width: 80px;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.length-selector-btn:hover {
    border-color: #6aaa64;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(102, 170, 100, 0.2);
}

.length-selector-btn.active {
    border-color: #6aaa64;
    background: linear-gradient(135deg, #6aaa64 0%, #5a9a54 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 170, 100, 0.3);
}

.length-number {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.length-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.length-selector-btn.active .length-label {
    opacity: 1;
}

/* Yesterday Section & History Section 共享样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.section-header h2 {
    margin: 0;
    color: #333;
    font-size: 28px;
}

.date-badge {
    background: #6aaa64;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Result Summary */
.result-summary {
    margin: 25px 0;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.summary-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.summary-icon.success {
    background: #6aaa64;
    color: white;
}

.summary-icon.failed {
    background: #787c7e;
    color: white;
}

.summary-content {
    flex: 1;
}

.summary-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.summary-stats {
    display: flex;
    gap: 20px;
    color: #666;
}

.summary-stats strong {
    color: #333;
}

/* Guess Analysis */
.guess-analysis {
    margin: 30px 0;
}

.guess-analysis h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 15px;
}

.analysis-intro {
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
    padding: 15px;
    background: #f0f7ff;
    border-left: 4px solid #4a90e2;
    border-radius: 4px;
}

/* Guess Steps */
.guess-step {
    background: #fafafa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
    transition: transform 0.2s;
}

.guess-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.guess-step.correct-guess {
    border-color: #6aaa64;
    background: #f0f9f0;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.step-number {
    background: #333;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
}

.step-word {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #333;
}

.step-badge {
    margin-left: auto;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
}

.step-badge.success {
    background: #6aaa64;
    color: white;
}

/* Tiles */
.step-tiles {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.tile {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #d3d6da;
    border-radius: 4px;
    color: white;
}

.tile.correct {
    background-color: #6aaa64;
    border-color: #6aaa64;
}

.tile.present {
    background-color: #c9b458;
    border-color: #c9b458;
}

.tile.absent {
    background-color: #787c7e;
    border-color: #787c7e;
}

.tile.empty {
    background: white;
    color: #333;
}

/* Explanation */
.step-explanation {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.explanation-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.explanation-text {
    color: #444;
    line-height: 1.6;
    flex: 1;
}

/* Feedback Summary */
.feedback-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
}

.feedback-item {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
}

.feedback-item.correct {
    background: #e8f5e9;
    color: #2e7d32;
}

.feedback-item.present {
    background: #fff9e6;
    color: #9c7b1b;
}

.feedback-item.absent {
    background: #f5f5f5;
    color: #666;
}

/* Visual Board */
.visual-board {
    margin: 30px 0;
}

.visual-board h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 15px;
}

.game-board-display {
    display: inline-block;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
}

.board-row {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
}

/* History Section */
.history-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.history-section h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.section-description {
    color: #666;
    margin-bottom: 25px;
}

.section-description {
    color: #666;
    margin-bottom: 25px;
}

.history-list {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #fafafa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s;
}

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

.history-date {
    min-width: 150px;
}

.date-display {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.history-summary {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.history-word {
    display: flex;
    gap: 8px;
}

.word-label {
    color: #666;
}

.word-value {
    font-weight: bold;
    font-size: 18px;
    letter-spacing: 1px;
    color: #333;
}

.history-result {
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
}

.history-result.solved {
    background: #e8f5e9;
    color: #2e7d32;
}

.history-result.failed {
    background: #f5f5f5;
    color: #666;
}

.view-details-btn {
    padding: 10px 20px;
    background: #6aaa64;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.view-details-btn:hover {
    background: #5a9a54;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 8px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #d3d6da;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.page-btn:hover {
    background: #f0f0f0;
}

.page-btn.active {
    background: #6aaa64;
    color: white;
    border-color: #6aaa64;
}

.page-ellipsis {
    padding: 8px;
    color: #999;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 30px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    font-size: 16px;
}

/* Responsive - 移动端也保持统一 */
@media (max-width: 768px) {
    .main-content {
        padding: 20px 15px;
    }

    /* 移动端卡片统一样式 */
    .length-selector-container,
    .yesterday-section,
    .history-section {
        padding: 20px !important;
        margin-bottom: 20px !important;
    }

    .length-selector-horizontal {
        gap: 8px;
    }

    .length-selector-btn {
        min-width: 70px;
        padding: 12px 16px;
    }

    .length-number {
        font-size: 20px;
    }

    .length-label {
        font-size: 10px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .section-header h2 {
        font-size: 22px;
    }

    .summary-card {
        flex-direction: column;
        text-align: center;
    }

    .step-tiles {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tile {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-summary {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .view-details-btn {
        width: 100%;
    }

    .pagination {
        flex-direction: column;
        gap: 15px;
    }

    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    /* 超小屏幕卡片统一样式 */
    .length-selector-container,
    .yesterday-section,
    .history-section {
        padding: 15px !important;
    }
}
