:root {
    --correct-color: #6aaa64;
    --present-color: #c9b458;
    --absent-color: #787c7e;
    --tile-border: #d3d6da;
    --key-bg: #d3d6da;
    --modal-bg: rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

header {
    text-align: center;
    padding: 0.5rem;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    color: #1a1a1a;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.game-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.btn {
    padding: 0.4rem 1rem;
    border: none;
    border-radius: 6px;
    background-color: #2196f3;
    color: white;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.3);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0.3rem;
    margin-bottom: 1rem;
}

.grid-container {
    display: grid;
    grid-template-rows: repeat(9, 1fr);
    gap: 2px;
    padding: 4px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.grid-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
}

.tile {
    position: relative;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    font-weight: 700;
    text-transform: uppercase;
    background-color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    aspect-ratio: 1/0.65;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tile::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
    opacity: 0.8;
}

.tile.correct {
    background: linear-gradient(145deg, #75b56f, #6aaa64);
    border-color: #6aaa64;
    color: white;
    transform: scale(1.02) translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(106, 170, 100, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.tile.present {
    background: linear-gradient(145deg, #d4bf63, #c9b458);
    border-color: #c9b458;
    color: white;
    transform: scale(1.02) translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(201, 180, 88, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.tile.absent {
    background: linear-gradient(145deg, #838789, #787c7e);
    border-color: #787c7e;
    color: white;
    transform: scale(0.98);
    box-shadow: 
        0 2px 8px rgba(120, 124, 126, 0.2),
        inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

.keyboard {
    width: 100%;
    max-width: 600px;
    margin: 0.8rem auto 2rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-bottom: 3px;
}

.key {
    min-width: 32px;
    height: 42px;
    border-radius: 4px;
    border: none;
    background-color: #e9ecef;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    padding: 0 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1a1a1a;
}

.key:hover {
    transform: translateY(-2px);
    background-color: #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.key:active {
    transform: translateY(1px);
}

.key[data-key="ENTER"],
.key[data-key="BACKSPACE"] {
    min-width: 54px;
    background-color: #2196f3;
    color: white;
    font-weight: 700;
}

.key[data-key="ENTER"]:hover,
.key[data-key="BACKSPACE"]:hover {
    background-color: #1976d2;
}

.spacer {
    flex: 0.5;
}

/* 游戏规则样式优化 */
.game-rules {
    width: 100%;
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    scroll-margin-top: 2rem;
}

.rules-content {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

.rule-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.rule-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
}

/* 移除模态框相关样式 */
.modal, .modal-content, .modal.show, .modal .close-btn {
    display: none;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .container {
        padding: 0.6rem;
        gap: 0.8rem;
    }

    .game-grid {
        gap: 0.4rem;
        padding: 0.2rem;
    }

    .grid-container {
        gap: 1.5px;
        padding: 3px;
    }

    .grid-row {
        gap: 1.5px;
    }

    .tile {
        font-size: clamp(0.75rem, 1.1vw, 0.9rem);
        aspect-ratio: 1/0.7;
    }

    .keyboard {
        padding: 0.6rem;
        margin: 0.6rem auto 1.5rem;
    }

    .game-rules {
        margin: 0 auto 1.5rem;
        padding: 1.5rem;
    }

    .game-rules h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .rules-content {
        gap: 1.5rem;
    }

    .rule-section {
        padding: 1.2rem;
    }

    .rule-section h3 {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }

    .rule-section li {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    .rule-section p {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }

    .key {
        min-width: 28px;
        height: 38px;
        font-size: 0.9rem;
    }

    .key[data-key="ENTER"],
    .key[data-key="BACKSPACE"] {
        min-width: 46px;
    }
}

/* 提示列表样式优化 */
.rule-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rule-section li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.8rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.rule-section li:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.rule-section li::before {
    content: '→';
    color: #2196f3;
    font-weight: bold;
    font-size: 1.2rem;
    display: inline-block;
    min-width: 24px;
    text-align: center;
}

/* 箭头图标样式 */
.arrow-icon {
    color: #2196f3;
    font-size: 1.2rem;
    margin-right: 0.5rem;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.rule-section li:hover .arrow-icon {
    transform: translateX(4px);
    opacity: 1;
}

/* 游戏规则标题样式 */
.rule-section h3 {
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(33, 150, 243, 0.2);
}

.rule-section h3::before {
    content: '';
    width: 6px;
    height: 24px;
    background: linear-gradient(to bottom, #2196f3, #1976d2);
    border-radius: 3px;
}

/* 游戏规则文本样式 */
.rule-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .rule-section {
        padding: 1.2rem;
    }

    .rule-section h3 {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }

    .rule-section li {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    .rule-section p {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }
}

/* 动画效果 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rule-section li {
    animation: slideIn 0.5s ease-out forwards;
}

.rule-section li:nth-child(1) { animation-delay: 0.1s; }
.rule-section li:nth-child(2) { animation-delay: 0.2s; }
.rule-section li:nth-child(3) { animation-delay: 0.3s; }
.rule-section li:nth-child(4) { animation-delay: 0.4s; }

/* 提示文本高亮 */
.highlight {
    color: #2196f3;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    background: rgba(33, 150, 243, 0.1);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.highlight:hover {
    background: rgba(33, 150, 243, 0.15);
    transform: translateY(-1px);
}

/* 颜色指南样式优化 */
.color-guide {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.guide-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.guide-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.guide-item .tile {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    flex-shrink: 0;
}

.guide-item p {
    margin: 0;
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
}

/* 游戏概述段落样式 */
.rule-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1rem;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .game-rules {
        margin: 1rem auto;
        padding: 1.5rem;
    }

    .game-rules h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .rules-content {
        gap: 1.5rem;
    }

    .rule-section {
        padding: 1.2rem;
    }

    .rule-section h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .color-guide {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .guide-item {
        padding: 0.8rem;
    }

    .guide-item .tile {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .guide-item p {
        font-size: 0.9rem;
    }

    .rule-section li {
        font-size: 0.9rem;
        padding-left: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .rule-section p {
        font-size: 0.95rem;
    }
}

/* 动画效果 */
.rule-section {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

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

.rule-section:nth-child(1) { animation-delay: 0.1s; }
.rule-section:nth-child(2) { animation-delay: 0.2s; }
.rule-section:nth-child(3) { animation-delay: 0.3s; }

/* 修改模态框中的示例样式 */
.modal .example {
    margin-bottom: 0.6rem;
}

.modal .example .tile {
    width: 35px;
    height: 35px;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0.6rem;
        gap: 0.8rem;
    }

    h1 {
        font-size: 2rem;
    }

    .game-info {
        font-size: 1rem;
        gap: 1rem;
    }

    .game-grid {
        gap: 1rem;
        padding: 0.3rem;
        aspect-ratio: 2/1.5;
    }

    .grid-container {
        gap: 4px;
        padding: 8px;
        border-radius: 12px;
    }

    .grid-row {
        gap: 4px;
    }

    .tile {
        border-width: 1.5px;
        border-radius: 8px;
        font-size: clamp(1rem, 1.8vw, 1.4rem);
    }

    .tile::before {
        border-radius: 7px;
    }

    .keyboard {
        padding: 0.8rem;
        border-radius: 16px;
        margin: 0.8rem auto 0.4rem;
    }

    .key {
        min-width: 34px;
        height: 48px;
        font-size: 1rem;
        border-radius: 6px;
    }

    .key[data-key="ENTER"],
    .key[data-key="BACKSPACE"] {
        min-width: 56px;
    }
}

/* 添加抖动动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px) rotate(-1deg); }
    75% { transform: translateX(4px) rotate(1deg); }
}

.shake {
    animation: shake 0.3s cubic-bezier(0.36, 0, 0.66, -0.56);
}

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

.pop {
    animation: pop 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 动画效果优化 */
@keyframes tileFlip {
    0% {
        transform: rotateX(0deg);
        background-color: white;
    }
    50% {
        transform: rotateX(90deg);
    }
    100% {
        transform: rotateX(0deg);
    }
}

.tile.flip {
    animation: tileFlip 0.6s ease-in-out forwards;
}

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

.tile.bounce {
    animation: tileBounce 0.3s cubic-bezier(0.36, 0, 0.66, -0.56) forwards;
}

/* 游戏状态指示器 */
.grid-container::after {
    content: '';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #e9ecef;
    transition: background-color 0.3s ease;
}

.grid-container.completed::after {
    background-color: #6aaa64;
    box-shadow: 0 0 8px rgba(106, 170, 100, 0.5);
}

.grid-container.failed::after {
    background-color: #dc3545;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.5);
}

/* 模态框样式优化 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    margin: auto;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        inset 0 2px 6px rgba(255, 255, 255, 0.8);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal h2 {
    font-size: 1.8rem;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 800;
}

.modal .instructions {
    margin-bottom: 2rem;
}

.modal .instructions p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1rem;
}

.modal .instructions ul {
    list-style: none;
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.modal .instructions li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
}

.modal .instructions li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #2196f3;
    font-weight: bold;
}

.modal .example {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.modal .example:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.modal .example .tile {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    margin: 0;
    flex-shrink: 0;
}

.modal .example p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
}

.modal .btn {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 2rem auto 0;
    padding: 0.8rem;
    font-size: 1rem;
    text-align: center;
}

/* 关闭按钮样式 */
.modal .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.modal .close-btn:hover {
    opacity: 1;
}

.modal .close-btn::before,
.modal .close-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background-color: #333;
    transform-origin: center;
}

.modal .close-btn::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.modal .close-btn::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* 计时器样式 */
.timer {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: fit-content;
    margin: 1rem auto;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.timer::before {
    content: '⏱️';
    font-size: 1.2rem;
}

/* 游戏结果模态框样式 */
.result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.result-modal.show {
    display: flex;
    opacity: 1;
}

.result-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    margin: auto;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        inset 0 2px 6px rgba(255, 255, 255, 0.8);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    text-align: center;
}

.result-modal.show .result-content {
    transform: translateY(0);
}

.result-header {
    margin-bottom: 2rem;
}

.result-header h2 {
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #2196f3;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.result-words {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.word-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.word-item.solved {
    border: 2px solid #6aaa64;
}

.word-item.failed {
    border: 2px solid #dc3545;
}

.word-value {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.word-status {
    font-size: 0.9rem;
    color: #666;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.result-actions .btn {
    min-width: 200px;
}

.social-share {
    display: grid;
    gap: 0.8rem;
    width: 100%;
    margin: 0.5rem 0;
}

.social-btn {
    flex: 0 1 calc(50% - 0.8rem);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    max-width: 180px;
}

.social-btn span {
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.social-btn .share-count {
    font-size: 0.9rem;
    font-weight: 500;
    padding-left: 0.5rem;
}

.social-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-right: -4px;
}

.social-btn.facebook {
    background-color: #1877f2;
}

.social-btn.facebook:hover {
    background-color: #166fe5;
}

.social-btn.twitter {
    background-color: #000000;
}

.social-btn.twitter:hover {
    background-color: #333333;
}

.social-btn.reddit {
    background-color: #ff4500;
}

.social-btn.reddit:hover {
    background-color: #e63e00;
}

.social-btn.linkedin {
    background-color: #0a66c2;
}

.social-btn.linkedin:hover {
    background-color: #095fb8;
}

@media (max-width: 768px) {
    .social-share {
        grid-template-columns: 1fr;
        max-width: 300px;
    }

    .social-btn {
        width: 100%;
        min-width: unset;
    }
}

.share-btn {
    background-color: #6aaa64;
}

.share-btn:hover {
    background-color: #5c9658;
}

.play-again-btn {
    background-color: #2196f3;
}

.play-again-btn:hover {
    background-color: #1976d2;
}

@media (max-width: 768px) {
    .timer {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
        margin: 0.8rem auto;
    }

    .timer::before {
        font-size: 1rem;
    }

    .result-content {
        padding: 1.5rem;
    }

    .result-header h2 {
        font-size: 1.6rem;
    }

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

    .word-value {
        font-size: 1.2rem;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn {
        width: 100%;
    }
}

/* 键盘下方分享模块样式 */
.share-section {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03),
                0 4px 10px rgba(0, 0, 0, 0.02);
}

.share-section h3 {
    font-size: 1.3rem;
    color: #1a1a1a;
    margin-bottom: 1.2rem;
    font-weight: 700;
    text-align: center;
    position: relative;
    padding-bottom: 0.8rem;
}

.share-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: #2196f3;
    border-radius: 2px;
}

.social-share-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    max-width: 360px;
    margin: 1rem auto;
    padding: 0.5rem;
}

.social-btn {
    flex: 1 1 calc(50% - 0.8rem);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    max-width: 160px;
}

.social-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.social-btn .share-count {
    font-size: 0.9rem;
    font-weight: 500;
}

/* 分享按钮颜色 */
.social-btn.facebook {
    background-color: #1877f2;
}

.social-btn.twitter {
    background-color: #000000;
}

.social-btn.reddit {
    background-color: #ff4500;
}

.social-btn.linkedin {
    background-color: #0a66c2;
}

/* 分享按钮悬停效果 */
.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-btn.facebook:hover {
    background-color: #166fe5;
}

.social-btn.twitter:hover {
    background-color: #333333;
}

.social-btn.reddit:hover {
    background-color: #e63e00;
}

.social-btn.linkedin:hover {
    background-color: #095fb8;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .social-share-container {
        max-width: 320px;
        gap: 0.6rem;
        padding: 0.3rem;
    }

    .social-btn {
        padding: 0.7rem 0.8rem;
        font-size: 0.9rem;
        min-width: 90px;
        max-width: 140px;
    }
}

/* 结果模态框中的分享按钮样式 */
.result-modal .social-share-container {
    max-width: 360px;
    margin: 1rem auto;
}

/* 键盘下方的分享按钮样式 */
.share-section .social-share-container {
    max-width: 360px;
    margin: 0.5rem auto;
}

/* 添加按钮出现动画 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.social-btn {
    animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.social-btn:nth-child(1) { animation-delay: 0.1s; }
.social-btn:nth-child(2) { animation-delay: 0.2s; }
.social-btn:nth-child(3) { animation-delay: 0.3s; }
.social-btn:nth-child(4) { animation-delay: 0.4s; }

/* 添加点击波纹效果 */
.social-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, 
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0) 60%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-btn:active::after {
    opacity: 1;
    animation: ripple 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes ripple {
    from { transform: scale(0.8); opacity: 1; }
    to { transform: scale(2); opacity: 0; }
}

.result-modal .social-share-container {
    max-width: 400px;
}

.result-modal .social-btn {
    flex: 0 1 calc(50% - 0.8rem);
    min-width: 120px;
    max-width: 180px;
}

@media (max-width: 768px) {
    .result-modal .result-content {
        padding: 1.5rem;
        max-width: 500px;
    }

    .result-modal .social-share-container {
        max-width: 400px;
        gap: 0.6rem;
    }

    .result-modal .social-btn {
        flex: 1 1 calc(50% - 0.6rem);
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
        min-width: 110px;
        max-width: 180px;
    }
}

/* 分享按钮颜色和悬停效果 */
.result-modal .social-btn.facebook {
    background-color: #1877f2;
}

.result-modal .social-btn.twitter {
    background-color: #000000;
}

.result-modal .social-btn.reddit {
    background-color: #ff4500;
}

.result-modal .social-btn.linkedin {
    background-color: #0a66c2;
}

.result-modal .social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.result-modal .social-btn.facebook:hover {
    background-color: #166fe5;
}

.result-modal .social-btn.twitter:hover {
    background-color: #333333;
}

.result-modal .social-btn.reddit:hover {
    background-color: #e63e00;
}

.result-modal .social-btn.linkedin:hover {
    background-color: #095fb8;
} 