/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    font-size: 16px;
}

/* 调整标题字体大小 */
header h1 {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

header p {
    font-size: 1.2rem;
    color: #95a5a6;
    font-style: italic;
}

/* 调整不同屏幕尺寸的字体大小 */
@media (max-width: 1024px) {
    header h1 {
        font-size: 2.5rem;
    }
    
    header p {
        font-size: 1.1rem;
    }
    
    .letter-content {
        font-size: 1rem;
    }
    
    .game-title {
        font-size: 1.8rem;
    }
    
    .game-description {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .story-intro {
        font-size: 1rem;
    }
    
    .character-selection h2 {
        font-size: 1.6rem;
    }
    
    .letter-title {
        font-size: 1.5rem;
    }
    
    .letter-content {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .game-title {
        font-size: 1.6rem;
    }
    
    .game-description {
        font-size: 0.95rem;
    }
    
    .controls-title {
        font-size: 1.1rem;
    }
    
    .stat-item {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    header p {
        font-size: 0.95rem;
    }
    
    .story-intro {
        font-size: 0.95rem;
    }
    
    .character-selection h2 {
        font-size: 1.4rem;
    }
    
    .letter-title {
        font-size: 1.3rem;
    }
    
    .letter-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .game-title {
        font-size: 1.4rem;
    }
    
    .game-description {
        font-size: 0.9rem;
    }
    
    .controls-title {
        font-size: 1rem;
    }
    
    .stat-item {
        font-size: 0.95rem;
    }
    
    footer {
        font-size: 0.85rem;
    }
}

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

/* 头部样式 */
header {
    text-align: center;
    padding: 40px 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
    font-size: 1.2rem;
    color: #95a5a6;
    font-style: italic;
}

/* 首页样式 */
.home-main {
    padding: 40px 0;
}

.story-intro {
    text-align: center;
    margin-bottom: 50px;
    font-size: 1.1rem;
    color: #555;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.character-selection {
    text-align: center;
    margin-bottom: 50px;
}

.character-selection h2 {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 30px;
}

.character-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.character-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 250px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.character-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.character-btn:active {
    transform: translateY(0);
}

.character-name {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.character-desc {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.features-preview {
    text-align: center;
}

.features-preview h3 {
    font-size: 1.8rem;
    color: #2ecc71;
    margin-bottom: 30px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.feature-item {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
}

.feature-item h4 {
    color: #e67e22;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.feature-item p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 信件页面样式 */
.letter-container {
    max-width: 800px;
    margin: 40px auto;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 50px;
    border-radius: 25px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

/* 添加装饰性背景元素 */
.letter-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(240, 147, 251, 0.05) 100%);
    border-radius: 50%;
    z-index: 0;
}

.letter-container::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.05) 0%, rgba(52, 152, 219, 0.05) 100%);
    border-radius: 50%;
    z-index: 0;
}

/* 确保内容在装饰元素之上 */
.letter-container > * {
    position: relative;
    z-index: 1;
}

.letter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 3px solid #f0f0f0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(240, 147, 251, 0.1) 100%);
    padding: 25px;
    border-radius: 15px;
    margin: 0 -10px 40px -10px;
}

.letter-title {
    color: #e74c3c;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin: 0;
}

.perspective-switch {
    display: flex;
    gap: 12px;
}

.switch-btn {
    padding: 14px 28px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.05rem;
    min-width: 110px;
    min-height: 50px;
    touch-action: manipulation;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.switch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.2);
    background: rgba(52, 152, 219, 0.05);
}

.switch-btn.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

/* 优化移动端交互元素大小 */
@media (max-width: 768px) {
    .character-btn {
        padding: 25px 40px;
        min-height: 80px;
        font-size: 1.3rem;
    }
    
    .game-btn {
        padding: 15px 30px;
        min-height: 50px;
        min-width: 140px;
        font-size: 1.1rem;
    }
    
    .switch-btn {
        padding: 15px 25px;
        min-height: 50px;
        font-size: 1.1rem;
    }
    
    /* 优化输入控件 */
    input[type="range"] {
        height: 8px;
        padding: 0;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        height: 24px;
        width: 24px;
        border-radius: 50%;
        background: #3498db;
        cursor: pointer;
        -webkit-appearance: none;
        margin-top: -8px;
    }
    
    input[type="range"]::-moz-range-thumb {
        height: 24px;
        width: 24px;
        border-radius: 50%;
        background: #3498db;
        cursor: pointer;
        border: none;
    }
    
    /* 优化表单控件 */
    input[type="text"],
    textarea {
        min-height: 44px;
        font-size: 1rem;
    }
    
    textarea {
        min-height: 100px;
        resize: vertical;
    }
}

.letter-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
    white-space: pre-wrap;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin: 0 -20px;
}

.letter-content p {
    margin-bottom: 20px;
    text-align: justify;
    text-indent: 2em;
}

/* 称呼样式 */
.letter-content p:first-of-type {
    font-size: 1.3rem;
    font-weight: 600;
    color: #e74c3c;
    text-align: left;
    text-indent: 0;
    margin-top: 0;
}

/* 问候语样式 */
.letter-content p:nth-of-type(2) {
    font-size: 1.2rem;
    color: #3498db;
    text-align: left;
    text-indent: 0;
}

/* 祝福语列表样式 */
.letter-content p:nth-last-of-type(4) {
    text-indent: 0;
    line-height: 1.8;
}

/* 落款样式 */
.letter-content p:last-of-type {
    text-align: right;
    font-style: italic;
    color: #7f8c8d;
    text-indent: 0;
    margin-bottom: 0;
    font-size: 1.1rem;
}

/* 高亮元素样式优化 */
.highlight {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: help;
    position: relative;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 223, 102, 0.3);
    border-bottom: 2px solid #ffd700;
}

.highlight:hover {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 223, 102, 0.5);
}

.highlight::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 添加小三角形指示器 */
.highlight::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    width: 12px;
    height: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.highlight:hover::after,
.highlight:hover::before {
    opacity: 1;
    visibility: visible;
}

.morse-entry {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.morse-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.morse-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.5);
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    color: #7f8c8d;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px 20px 0 0;
}

/* 导航样式 */
nav {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

/* 汉堡菜单按钮 */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 30px;
    height: 3px;
    background: #e74c3c;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 导航链接 */
.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 15px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    background: #3498db;
    color: white;
}

/* 移动端导航菜单 */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        gap: 15px;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        padding: 12px 20px;
        font-size: 1.1rem;
        display: block;
    }
    
    /* 汉堡菜单动画 */
    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }
    
    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }
}

/* 游戏通用样式 */
.game-container {
    max-width: 1000px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* 能量小游戏样式 */
.energy-game {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.energy-bars {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.energy-bar-container {
    flex: 1;
    min-width: 300px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.energy-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.energy-label h3 {
    color: #3498db;
    margin: 0;
    font-size: 1.2rem;
}

.energy-label span {
    font-weight: bold;
    color: #e74c3c;
    font-size: 1.1rem;
}

.energy-bar-bg {
    background: #e9ecef;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.energy-bar {
    height: 100%;
    border-radius: 15px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.energy-range {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #6c757d;
}

.healthy-zone {
    color: #28a745;
    font-weight: bold;
}

.action-buttons {
    margin-top: 20px;
}

.action-buttons h3 {
    color: #3498db;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* 时间胶囊样式 */
.time-capsule {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.message-form,
.messages-wall {
    flex: 1;
    min-width: 300px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.message-form h3,
.messages-wall h3 {
    color: #3498db;
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#messages-container {
    max-height: 400px;
    overflow-y: auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message-item {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
}

.message-item:last-child {
    margin-bottom: 0;
}

.message-author {
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.message-content {
    color: #555;
    line-height: 1.6;
}

.message-time {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    color: #999;
    margin-top: 10px;
}

.ending-summary {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.ending-summary h3 {
    color: #3498db;
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-align: center;
}

.summary-content {
    color: #555;
    line-height: 1.8;
}

.summary-content ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.summary-content li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.summary-content li::before {
    content: "✨";
    position: absolute;
    left: 0;
    top: 0;
}

.game-title {
    color: #e74c3c;
    font-size: 2rem;
    margin-bottom: 20px;
}

.game-description {
    color: #7f8c8d;
    margin-bottom: 30px;
    line-height: 1.6;
}

.game-canvas-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.game-canvas {
    border: 3px solid #3498db;
    border-radius: 15px;
    background: #f0f8ff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: auto;
    display: block;
}

/* 触控控制样式 */
.touch-controls {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 20px;
    padding: 0 20px;
}

.dpad-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.dpad {
    width: 120px;
    height: 120px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dpad-button {
    position: absolute;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #3498db;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.dpad-button:hover,
.dpad-button:active,
.dpad-button.touching {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.dpad-up {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.dpad-left {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.dpad-down {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.dpad-right {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.dpad-center {
    width: 40px;
    height: 40px;
    background: rgba(102, 126, 234, 0.2);
    border: 2px solid #3498db;
    border-radius: 50%;
    z-index: 1;
}

.dpad-label {
    font-weight: 600;
    color: #3498db;
    font-size: 1rem;
    text-align: center;
}

/* 响应式调整触控控制 */
@media (max-width: 768px) {
    .touch-controls {
        padding: 0 10px;
    }
    
    .dpad {
        width: 100px;
        height: 100px;
    }
    
    .dpad-button {
        width: 35px;
        height: 35px;
    }
    
    .dpad-center {
        width: 35px;
        height: 35px;
    }
    
    .dpad-label {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .touch-controls {
        margin-top: 15px;
        padding: 0 5px;
    }
    
    .dpad {
        width: 80px;
        height: 80px;
    }
    
    .dpad-button {
        width: 30px;
        height: 30px;
    }
    
    .dpad-center {
        width: 30px;
        height: 30px;
    }
    
    .dpad-label {
        font-size: 0.8rem;
    }
}

/* 桌面设备上隐藏触控控制 */
@media (min-width: 769px) {
    .touch-controls {
        display: none;
    }
}

.game-controls {
    margin-bottom: 20px;
}

.controls-title {
    color: #3498db;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.controls-list {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    list-style: none;
    color: #555;
}

.controls-list li {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: bold;
}

.stat-item {
    background: #e3f2fd;
    padding: 10px 20px;
    border-radius: 20px;
    color: #1976d2;
}

.game-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.game-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background: #2ecc71;
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-primary:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* 响应式设计 */
/* 大屏平板和小屏桌面 */
@media (max-width: 1024px) {
    header h1 {
        font-size: 2.5rem;
    }
    
    .game-container {
        padding: 20px;
    }
    
    .energy-bars {
        flex-direction: column;
        gap: 20px;
    }
    
    .energy-bar-container {
        width: 100%;
    }
}

/* 平板和手机 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .character-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .character-btn {
        width: 90%;
        max-width: 300px;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .letter-container {
        padding: 20px;
        margin: 20px;
    }
    
    .letter-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .game-canvas {
        width: 100%;
        height: auto;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    /* 能量小游戏响应式 */
    .energy-bars {
        flex-direction: column;
        gap: 30px;
    }
    
    .button-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* 晚霞生成器响应式 */
    .sunset-generator {
        grid-template-columns: 1fr;
    }
    
    .controls-panel {
        order: -1;
    }
    
    /* 留言墙响应式 */
    .time-capsule {
        flex-direction: column;
        gap: 30px;
    }
    
    .message-form,
    .messages-wall {
        width: 100%;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: bold;
    }
    
    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 12px;
        border: 2px solid #ddd;
        border-radius: 10px;
        font-size: 1rem;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .game-container {
        padding: 15px;
    }
    
    .letter-container {
        padding: 15px;
        margin: 10px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .controls-list {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .controls-list li {
        width: 100%;
        text-align: center;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 15px;
    }
}

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

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

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

.pulse {
    animation: pulse 1.5s infinite;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
}