/* 按钮样式 */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
}

.btn-primary {
    background-color: #0071e3;
    color: white;
}

.btn-primary:hover {
    background-color: #005bbd;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 导航栏样式 */
.navbar {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #0071e3;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #0071e3;
}

/* 主要内容 */
.main-content {
    margin-top: 80px;
}

/* 英雄区域 */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-button {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.hero-button.primary {
    background-color: white;
    color: #667eea;
}

.hero-button.primary:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.hero-button.secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.hero-button.secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* 功能介绍 */
.features-section {
    padding: 5rem 2rem;
    background-color: #f5f5f7;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.feature-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.feature-link {
    color: #0071e3;
    font-weight: 500;
    transition: color 0.3s ease;
}

.feature-link:hover {
    color: #005bbd;
}

/* 简介区域 */
.intro-section {
    padding: 5rem 2rem;
}

.intro-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.intro-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #333;
}

.intro-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.intro-features {
    list-style: none;
    text-align: left;
    display: inline-block;
    margin: 2rem auto;
}

.intro-features li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
    color: #333;
}

.intro-features li::before {
    content: "✓";
    color: #34c759;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-right: 0.5em;
}

/* 页脚 */
.footer {
    background-color: #f5f5f7;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 聊天界面样式 */
.chat-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.chat-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    max-height: 800px;
}

.chat-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.chat-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.chat-header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.api-setup {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

.api-setup h3 {
    margin-bottom: 1rem;
    color: #333;
}

.api-input {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.api-input input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.api-input button {
    padding: 0.8rem 1.5rem;
    background-color: #0071e3;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.api-input button:hover {
    background-color: #005bbd;
}

.api-note {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 1rem 1.5rem;
    border-radius: 18px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

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

.user-message {
    align-self: flex-end;
    background-color: #0071e3;
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-message {
    align-self: flex-start;
    background-color: #f0f0f0;
    color: #333;
    border-bottom-left-radius: 4px;
}

.system-message, .error-message {
    align-self: center;
    background-color: #e9ecef;
    color: #495057;
    font-size: 0.9rem;
    text-align: center;
    max-width: 100%;
    padding: 0.5rem 1rem;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
}

.message-content {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    text-align: right;
}

.thinking .message-content::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

.chat-input-container {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    background-color: #f8f9fa;
}

.chat-input-container textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-family: inherit;
}

.chat-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.chat-actions button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

#clearChat {
    background-color: #6c757d;
    color: white;
}

#clearChat:hover {
    background-color: #5a6268;
}

#sendMessage {
    background-color: #0071e3;
    color: white;
}

#sendMessage:hover {
    background-color: #005bbd;
}

/* 游戏界面样式 */
.games-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.games-header {
    text-align: center;
    margin-bottom: 3rem;
}

.games-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.games-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.game-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.game-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.game-button {
    padding: 0.8rem 2rem;
    background-color: #0071e3;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.game-button:hover {
    background-color: #005bbd;
    transform: translateY(-2px);
}

/* 绘图界面样式 */
.draw-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.draw-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.draw-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.draw-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.draw-header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.draw-content {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

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

.draw-input {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.draw-input textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    font-size: 1rem;
    min-height: 150px;
    font-family: inherit;
}

.draw-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.draw-button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.generate-button {
    background-color: #0071e3;
    color: white;
    flex: 1;
}

.generate-button:hover {
    background-color: #005bbd;
}

.clear-button {
    background-color: #6c757d;
    color: white;
}

.clear-button:hover {
    background-color: #5a6268;
}

.draw-output {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.draw-result {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.draw-result img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.draw-placeholder {
    color: #666;
    text-align: center;
}

.draw-info {
    background-color: #e9ecef;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* 游戏界面样式扩展 */
.game-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    max-width: 1200px;
    margin: 0 auto;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.score-board {
    display: flex;
    gap: 2rem;
}

.score-item {
    font-size: 1.2rem;
    font-weight: 500;
}

.score-item span:first-child {
    color: #666;
    margin-right: 0.5rem;
}

.word-display {
    text-align: center;
}

.word-display h3 {
    margin-bottom: 0.5rem;
    color: #666;
}

#currentWord {
    font-size: 2rem;
    font-weight: 700;
    color: #0071e3;
    padding: 0.5rem 1rem;
    background-color: #f0f8ff;
    border-radius: 8px;
    display: inline-block;
}

.game-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.drawing-board {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

#drawingCanvas {
    background-color: white;
    cursor: crosshair;
    display: block;
}

.canvas-tools {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #ddd;
}

.tool-button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-button:hover {
    background-color: #e9ecef;
}

.tool-button.active {
    border-color: #0071e3;
    background-color: #e3f2fd;
}

.color-picker {
    display: flex;
    gap: 0.5rem;
}

.color-picker .tool-button {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
}

.guess-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ai-guess h3 {
    margin-bottom: 1rem;
    color: #666;
}

.guess-display {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.game-controls .game-button {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* 五子棋游戏样式 */
.gomoku-board {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(15, 1fr);
    gap: 0;
    width: 500px;
    height: 500px;
    margin: 0 auto;
    background-color: #deb887;
    border: 2px solid #8b4513;
    position: relative;
}

.gomoku-cell {
    border: 1px solid #8b4513;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.gomoku-cell:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.gomoku-cell.black::after {
    content: '';
    width: 24px;
    height: 24px;
    background-color: black;
    border-radius: 50%;
}

.gomoku-cell.white::after {
    content: '';
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    border: 1px solid #333;
}

.game-status {
    text-align: center;
    margin: 1rem 0;
    font-size: 1.2rem;
    font-weight: 500;
}

/* 扫雷游戏样式 */
.minesweeper-board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    width: 400px;
    margin: 0 auto;
    background-color: #bdbdbd;
    padding: 10px;
    border: 3px outset #c0c0c0;
}

.mine-cell {
    width: 30px;
    height: 30px;
    background-color: #c0c0c0;
    border: 2px outset #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}

.mine-cell.revealed {
    border: 1px solid #808080;
    background-color: #d3d3d3;
}

.mine-cell.flagged::after {
    content: '🚩';
}

.mine-cell.mine::after {
    content: '💣';
}

.mine-cell.mine.revealed {
    background-color: #ff0000;
}

/* 一言区域样式 */
.quote-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 0;
    color: white;
}

.quote-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
}

.quote-content {
    margin-bottom: 2rem;
}

.quote-text {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-style: italic;
}

.quote-author {
    font-size: 1rem;
    opacity: 0.8;
}

.quote-refresh {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quote-refresh:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 番茄钟样式 */
.pomodoro-section {
    padding: 2rem 0;
}

.pomodoro-header {
    text-align: center;
    margin-bottom: 3rem;
}

.pomodoro-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 3rem;
}

.timer-display {
    margin-bottom: 2rem;
}

.time-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto;
}

.time-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    z-index: 2;
}

.timer-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: width 1s linear;
}

.timer-controls {
    display: flex;
    gap: 1rem;
}

.pomodoro-settings,
.pomodoro-stats {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-item label {
    font-weight: 500;
    color: #333;
}

.setting-item input,
.setting-item select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

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

.pomodoro-tips {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.pomodoro-tips ul {
    list-style: none;
    padding: 0;
}

.pomodoro-tips li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.pomodoro-tips li:last-child {
    border-bottom: none;
}

/* 单词本样式 */
.vocabulary-section {
    padding: 2rem 0;
}

.vocabulary-header {
    text-align: center;
    margin-bottom: 3rem;
}

.word-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.word-display {
    margin-bottom: 2rem;
}

.word-text {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.word-phonetic {
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
}

.word-meaning {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1rem;
}

.word-example {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.word-example h4 {
    margin-bottom: 0.5rem;
    color: #333;
}

.word-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.vocabulary-stats,
.vocabulary-settings,
.favorites-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.favorites-list {
    margin-top: 1rem;
}

.favorite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.favorite-word {
    flex: 1;
}

.favorite-word strong {
    font-size: 1.1rem;
    color: #333;
}

.favorite-phonetic {
    color: #666;
    font-style: italic;
    margin-left: 0.5rem;
}

.favorite-meaning {
    flex: 2;
    margin: 0 1rem;
    color: #555;
}

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

/* 电子木鱼样式 */
.wooden-fish-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    min-height: 100vh;
}

.fish-header {
    text-align: center;
    margin-bottom: 2rem;
}

.fish-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.fish-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* 功德计数器 */
.merit-section {
    text-align: center;
    margin-bottom: 2rem;
}

.merit-display {
    display: flex;
    justify-content: center;
}

.merit-circle {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

.merit-number {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.merit-label {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 木鱼区域 */
.fish-area {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.fish-main-area {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    flex-direction: column;
    align-items: center;
}

.wooden-fish-container {
    position: relative;
    width: 300px;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wooden-fish {
    position: relative;
    width: 250px;
    height: 200px;
    cursor: pointer;
    transition: transform 0.1s ease;
    z-index: 2;
    margin-bottom: 20px;
}

.wooden-fish:hover {
    transform: scale(1.05);
}

.fish-body {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    animation: float 3s ease-in-out infinite;
}

/* 控制按钮 */
.fish-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.fish-eyes {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.eye {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    position: relative;
    animation: blink 5s infinite;
}

.eye::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: black;
    border-radius: 50%;
}

.fish-mouth {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 15px;
    background: #654321;
    border-radius: 0 0 15px 15px;
}

.fish-lines {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 8px,
        rgba(255, 255, 255, 0.1) 8px,
        rgba(255, 255, 255, 0.1) 16px
    );
    border-radius: 50%;
}

.fish-tail {
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 70px;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    border-radius: 50% 0 0 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: wiggle 2s ease-in-out infinite;
}

.fish-stick {
    position: absolute;
    right: 60px;
    top: 15px;
    width: 6px;
    height: 100px;
    transform-origin: bottom center;
    transition: transform 0.1s ease;
    z-index: 1;
}

.stick-handle {
    width: 100%;
    height: 80%;
    background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
    border-radius: 3px;
}

.stick-head {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* 控制按钮 */
.fish-controls {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    font-size: 1.2rem;
}

/* 修行统计 */
.practice-stats {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.practice-stats h3 {
    margin-top: 0;
    color: #333;
    text-align: center;
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 1.2rem;
    background: #f8f9fa;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

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

.stat-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.2rem;
}

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

/* 修行指南 */
.practice-guide {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.practice-guide h3 {
    margin-top: 0;
    color: #333;
    text-align: center;
    margin-bottom: 1.5rem;
}

.guide-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.guide-card {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

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

.guide-icon {
    font-size: 1.8rem;
    margin-right: 1rem;
    margin-top: 0.2rem;
}

.guide-content h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #333;
}

.guide-content p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

/* 摸鱼模式样式 */
.fish-mode-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.fish-mode-content {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalAppear 0.3s ease-out;
    position: relative;
    z-index: 10001;
}

/* 摸鱼模式中的木鱼样式 */
.fish-mode-fish {
    width: 200px;
    height: 180px;
    margin: 1rem auto;
}

.fish-mode-fish .wooden-fish {
    width: 180px;
    height: 150px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.fish-mode-fish .wooden-fish:hover {
    transform: scale(1.05);
}

.fish-mode-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.fish-mode-content {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalAppear 0.3s ease-out;
    position: relative;
    z-index: 10001;
}

.fish-mode-header h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.fish-mode-header p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.fish-animation {
    position: relative;
    height: 120px;
    margin: 2rem 0;
    overflow: hidden;
}

.swimming-fish {
    font-size: 3rem;
    position: absolute;
    top: 50%;
    left: -10%;
    transform: translateY(-50%);
    animation: swim 8s linear infinite;
}

.bubbles-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
}

.bubble {
    position: absolute;
    width: 12px;
    height: 12px;
    background: rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    animation: bubble 4s ease-in infinite;
}

.bubble:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    left: 30%;
    animation-delay: 1s;
}

.bubble:nth-child(3) {
    left: 50%;
    animation-delay: 2s;
}

.bubble:nth-child(4) {
    left: 70%;
    animation-delay: 0.5s;
}

.bubble:nth-child(5) {
    left: 90%;
    animation-delay: 1.5s;
}

.fish-mode-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* +1 动效样式 */
.plus-one {
    position: fixed;
    font-size: 2.5rem;
    font-weight: bold;
    color: #10b981;
    pointer-events: none;
    z-index: 1000;
    transition: all 0.5s ease;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* 动画关键帧 */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 30px rgba(102, 126, 234, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes blink {
    0%, 45%, 55%, 100% {
        height: 16px;
    }
    50% {
        height: 2px;
    }
}

@keyframes wiggle {
    0%, 100% {
        transform: translateY(-50%) rotate(0deg);
    }
    25% {
        transform: translateY(-50%) rotate(5deg);
    }
    75% {
        transform: translateY(-50%) rotate(-5deg);
    }
}

@keyframes modalAppear {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes swim {
    0% {
        left: -10%;
    }
    100% {
        left: 110%;
    }
}

@keyframes bubble {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

.fish-swimming {
    position: relative;
    height: 100px;
    margin: 2rem 0;
    overflow: hidden;
}

.swimming-fish {
    font-size: 3rem;
    animation: swim 3s ease-in-out infinite;
}

.bubbles {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
}

.bubble {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    animation: bubble 2s ease-in-out infinite;
}

.bubble:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    left: 50%;
    animation-delay: 0.5s;
}

.bubble:nth-child(3) {
    left: 80%;
    animation-delay: 1s;
}

@keyframes swim {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(50px) rotate(5deg);
    }
    50% {
        transform: translateX(100px) rotate(0deg);
    }
    75% {
        transform: translateX(50px) rotate(-5deg);
    }
}

@keyframes bubble {
    0% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-50px) scale(1);
        opacity: 0;
    }
}

/* +1 动效样式 */
.plus-one {
    position: fixed;
    font-size: 2rem;
    font-weight: bold;
    color: #10b981;
    pointer-events: none;
    z-index: 1000;
    transition: all 0.5s ease;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    max-width: 300px;
    word-wrap: break-word;
}

.notification-success {
    background-color: #10b981;
    border-left: 4px solid #059669;
}

.notification-error {
    background-color: #ef4444;
    border-left: 4px solid #dc2626;
}

.notification-info {
    background-color: #3b82f6;
    border-left: 4px solid #2563eb;
}

.notification-warning {
    background-color: #f59e0b;
    border-left: 4px solid #d97706;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 木鱼游戏增强样式 */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 25px rgba(102, 126, 234, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes blink {
    0%, 45%, 55%, 100% {
        height: 20px;
    }
    50% {
        height: 2px;
    }
}

@keyframes wiggle {
    0%, 100% {
        transform: translateY(-50%) rotate(0deg);
    }
    25% {
        transform: translateY(-50%) rotate(5deg);
    }
    75% {
        transform: translateY(-50%) rotate(-5deg);
    }
}

@keyframes modalAppear {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-button {
        width: 80%;
        max-width: 250px;
    }
    
    .main-content {
        margin-top: 120px;
    }
    
    .hero-section {
        padding: 3rem 1rem;
    }
    
    .features-section {
        padding: 3rem 1rem;
    }
    
    .intro-section {
        padding: 3rem 1rem;
    }
    
    .intro-title {
        font-size: 1.8rem;
    }
    
    .chat-section, .games-section, .draw-section {
        padding: 1rem;
    }
    
    .chat-container {
        height: calc(100vh - 120px);
    }
    
    .message {
        max-width: 90%;
    }
    
    .api-input {
        flex-direction: column;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-area {
        grid-template-columns: 1fr;
    }
    
    .game-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .score-board {
        justify-content: center;
    }
    
    .gomoku-board {
        width: 90vw;
        height: 90vw;
        max-width: 350px;
        max-height: 350px;
    }
    
    .minesweeper-board {
        width: 90vw;
        max-width: 350px;
    }
    
    .draw-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .game-container {
        padding: 1rem;
    }
}

/* 小屏幕设备优化 */
@media (max-width: 480px) {
    .nav-container {
        padding: 0.5rem;
    }
    
    .nav-logo a {
        font-size: 1.2rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    .main-content {
        margin-top: 100px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    .chat-container {
        height: calc(100vh - 100px);
    }
    
    .api-input input {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .api-input button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .chat-input-container textarea {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .chat-actions button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .draw-input textarea {
        padding: 0.5rem;
        font-size: 0.9rem;
        min-height: 120px;
    }
    
    .draw-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .game-title {
        font-size: 1.2rem;
    }
    
    .game-description {
        font-size: 0.9rem;
    }
    
    .game-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}