* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

/* 首页样式 */
.title {
    font-size: 2.5rem;
    color: #fff;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.5s ease-out;
    position: relative;
}

.help-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #667eea;
    background: #fff;
    color: #667eea;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.help-btn:hover {
    background: #667eea;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.help-btn:active {
    transform: scale(0.95);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.intro-card {
    margin-bottom: 20px;
}

.intro-card h2 {
    font-size: 1.3rem;
    color: #667eea;
    margin-bottom: 10px;
}

.intro-card p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

.difficulty-selector {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #eee;
}

.difficulty-selector h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.difficulty-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

@media (max-width: 480px) {
    .difficulty-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

.difficulty-btn {
    padding: 15px 20px;
    border: 2px solid #667eea;
    border-radius: 12px;
    background: #fff;
    color: #667eea;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate; /* 创建新的层叠上下文，确保文字在伪元素之上 */
}

.difficulty-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: #667eea;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1; /* 负值确保在按钮内容（包括文字）下方 */
    pointer-events: none; /* 防止伪元素拦截点击事件 */
}

.difficulty-btn:hover::before,
.difficulty-btn.active::before {
    width: 300px;
    height: 300px;
}

.difficulty-btn:hover,
.difficulty-btn.active {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    position: relative; /* 确保文字在伪元素之上 */
    z-index: 1; /* 确保文字层级高于伪元素 */
}

.difficulty-info {
    background: #f0f4ff;
    border-radius: 10px;
    padding: 15px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    min-height: 60px;
    animation: fadeIn 0.3s ease-in-out;
}

.grid-size-selector {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
    animation: fadeIn 0.3s ease-in-out;
}

.grid-size-selector h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.grid-size-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

/* 复杂度按钮使用与难度按钮相同的样式 */
.grid-size-btn {
    padding: 15px 20px;
    border: 2px solid #667eea;
    border-radius: 12px;
    background: #fff;
    color: #667eea;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate; /* 创建新的层叠上下文，确保文字在伪元素之上 */
}

.grid-size-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: #667eea;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1; /* 负值确保在按钮内容（包括文字）下方 */
    pointer-events: none; /* 防止伪元素拦截点击事件 */
}

.grid-size-btn:hover::before,
.grid-size-btn.active::before {
    width: 300px;
    height: 300px;
}

.grid-size-btn:hover,
.grid-size-btn.active {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    position: relative; /* 确保文字在伪元素之上 */
    z-index: 1; /* 确保文字层级高于伪元素 */
}

@media (max-width: 480px) {
    .grid-size-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

.poem-input-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
    animation: fadeIn 0.3s ease-in-out;
}

.poem-label {
    display: block;
    font-size: 1rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.poem-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.poem-input {
    flex: 1;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
    line-height: 1.6;
}

.poem-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.random-poem-btn {
    width: 44px;
    height: 44px;
    border: 2px solid #667eea;
    border-radius: 10px;
    background: #fff;
    color: #667eea;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.random-poem-btn:hover {
    background: #667eea;
    color: #fff;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.random-poem-btn:active {
    transform: rotate(90deg) scale(0.95);
}

.poem-info {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

.poem-history {
    margin-top: 15px;
    animation: fadeIn 0.3s ease-in-out;
}

.poem-history-title {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
}

.poem-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.poem-history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    color: #555;
}

.poem-history-item:hover {
    background: #f0f4ff;
    border-color: #667eea;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.poem-history-item .clock-icon {
    font-size: 1rem;
    color: #999;
    flex-shrink: 0;
}

.poem-history-item:hover .clock-icon {
    color: #667eea;
}

.poem-history-item .poem-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.poem-history-item .poem-meta {
    font-size: 0.75rem;
    color: #999;
    flex-shrink: 0;
}

.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #fff;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-2px);
}

/* 准备倒计时页 */
.countdown-container {
    text-align: center;
}

.countdown-number {
    font-size: 8rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
    animation: pulse 1s ease-in-out infinite;
    margin-bottom: 30px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.countdown-hint {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 游戏页样式 */
#game-screen {
    padding: 10px;
}

/* 游戏页面侧边栏布局 */
.game-wrapper {
    display: flex;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 20px;
    align-items: flex-start;
}

.game-main {
    flex: 1;
    min-width: 0;
}

.game-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    z-index: 5; /* 确保侧边栏在游戏内容之上，但在反馈覆盖层之下 */
    max-height: calc(100vh - 40px); /* 限制侧边栏最大高度，避免超出视口 */
    overflow-y: auto; /* 如果内容过多，允许滚动 */
}

@media (max-width: 1024px) {
    .game-wrapper {
        flex-direction: column;
        align-items: center; /* 居中对齐 */
    }
    
    .game-main {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center; /* 居中对齐 */
    }
    
    .game-sidebar {
        width: 100%;
        max-width: 728px;
        position: static;
        margin: 20px auto 0;
        order: -1;
    }
}

@media (max-width: 768px) {
    .game-sidebar {
        margin: 15px auto 0;
    }
    
    .game-wrapper {
        align-items: center; /* 确保移动端居中 */
    }
    
    .game-main {
        width: 100%;
        align-items: center; /* 确保移动端居中 */
    }
    
    .game-header {
        margin-left: auto;
        margin-right: auto;
    }
    
    .grid-container {
        margin-left: auto;
        margin-right: auto;
    }
}

#game-screen {
    padding: 10px;
    justify-content: flex-start;
}

.game-header {
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.timer-container {
    text-align: center;
    margin-bottom: 15px;
}

.timer-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.timer {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.timer.warning {
    color: #ff6b6b;
    animation: timerWarning 0.5s ease-in-out infinite;
}

@keyframes timerWarning {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.target-container {
    text-align: center;
    margin-bottom: 15px;
}

.target-number {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.progress-text {
    font-size: 1rem;
    color: #666;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.grid-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* 不同网格大小的样式调整 */
.game-grid.grid-6 .grid-cell,
.game-grid.grid-7 .grid-cell,
.game-grid.grid-8 .grid-cell,
.game-grid.grid-9 .grid-cell,
.game-grid.grid-10 .grid-cell {
    font-size: 1rem;
    gap: 6px;
}

.game-grid.grid-8 .grid-cell,
.game-grid.grid-9 .grid-cell,
.game-grid.grid-10 .grid-cell {
    font-size: 0.9rem;
    gap: 4px;
}

.game-grid.grid-10 .grid-cell {
    font-size: 0.8rem;
    gap: 3px;
}

.grid-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f5f5f5;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.grid-cell::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.grid-cell:active::before {
    width: 200%;
    height: 200%;
}

.grid-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.grid-cell.correct {
    background: #4caf50;
    color: #fff;
    border-color: #4caf50;
    animation: correctAnimation 0.5s ease-out;
}

@keyframes correctAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    100% {
        transform: scale(1);
    }
}

.grid-cell.wrong {
    background: #ff6b6b;
    color: #fff;
    border-color: #ff6b6b;
    animation: wrongAnimation 0.5s ease-out;
}

@keyframes wrongAnimation {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.grid-cell.completed {
    background: #4caf50;
    color: #fff;
    opacity: 0.8;
}

/* 结果页样式 */
.result-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.5s ease-out;
}

.result-title {
    font-size: 2rem;
    color: #667eea;
    text-align: center;
    margin-bottom: 30px;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: #fff;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    animation: slideUp 0.5s ease-out;
    animation-fill-mode: both;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 详情页样式 */
.detail-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.5s ease-out;
}

.detail-title {
    font-size: 1.8rem;
    color: #667eea;
    text-align: center;
    margin-bottom: 25px;
}

.detail-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.detail-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #667eea;
    animation: slideInLeft 0.5s ease-out;
    animation-fill-mode: both;
}

.detail-card:nth-child(1) {
    animation-delay: 0.1s;
}

.detail-card:nth-child(2) {
    animation-delay: 0.2s;
}

.detail-card:nth-child(3) {
    animation-delay: 0.3s;
}

.detail-card:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.detail-label {
    font-size: 1rem;
    color: #666;
}

.detail-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.detail-actions {
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .countdown-number {
        font-size: 6rem;
    }
    
    .timer {
        font-size: 2rem;
    }
    
    .game-grid {
        gap: 6px;
        padding: 8px;
    }
    
    .grid-cell {
        font-size: 1rem;
    }
    
    /* 移动端大网格调整 */
    .game-grid.grid-8 .grid-cell,
    .game-grid.grid-9 .grid-cell,
    .game-grid.grid-10 .grid-cell {
        font-size: 0.75rem;
    }
    
    .game-grid.grid-8,
    .game-grid.grid-9,
    .game-grid.grid-10 {
        gap: 3px;
        padding: 6px;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
    }
}

/* 震动动画 */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* 成功动画 */
@keyframes success {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.success-animation {
    animation: success 0.5s ease-out;
}

/* 评分表模态框样式 */
.rating-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-in-out;
}

.rating-modal.active {
    display: flex;
}

.rating-modal-content {
    background: #fff;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease-out;
    position: relative;
}

.rating-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #eee;
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    z-index: 10;
}

.rating-modal-header h2 {
    font-size: 1.5rem;
    color: #667eea;
    margin: 0;
}

.close-rating-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #999;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.close-rating-btn:hover {
    background: #f0f0f0;
    color: #667eea;
    transform: rotate(90deg);
}

.rating-modal-body {
    padding: 25px;
}

.rating-section {
    margin-bottom: 30px;
}

.rating-section h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.rating-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.rating-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.rating-table th {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.rating-table th:first-child {
    text-align: left;
    padding-left: 15px;
}

.rating-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
}

.rating-table tbody tr:hover {
    background: #f8f9ff;
}

.rating-table tbody tr:last-child {
    border-bottom: none;
}

.rating-table td {
    padding: 12px 8px;
    text-align: center;
    color: #555;
    font-size: 0.9rem;
}

.rating-table td:first-child {
    text-align: left;
    padding-left: 15px;
    font-weight: 600;
    color: #333;
}

.rating-table tbody tr:nth-child(1) td:first-child {
    color: #4caf50;
}

.rating-table tbody tr:nth-child(2) td:first-child {
    color: #ff9800;
}

.rating-table tbody tr:nth-child(3) td:first-child {
    color: #f44336;
}

/* 响应式设计 - 评分表 */
@media (max-width: 480px) {
    .rating-modal-content {
        max-height: 95vh;
    }
    
    .rating-modal-header h2 {
        font-size: 1.2rem;
    }
    
    .rating-table th,
    .rating-table td {
        padding: 8px 4px;
        font-size: 0.8rem;
    }
    
    .rating-section h3 {
        font-size: 1rem;
    }
    
    /* 移动端历史记录优化 */
    .poem-history-item {
        font-size: 0.8rem;
        padding: 8px;
    }
    
    .poem-history-item .poem-text {
        max-width: 60%;
    }
    
    .poem-history-item .poem-meta {
        font-size: 0.7rem;
    }
}
