/* ========== 全局 Emoji 兼容 ========== */
.emoji {
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
}

/* ========== 全局卡片悬停 ========== */
.card-hover {
    transition: all 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ========== 通用返回按钮 ========== */
.back-home {
    display: inline-block;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    backdrop-filter: blur(4px);
    transition: 0.2s;
    font-weight: 500;
    font-size: 0.9rem;
}
.back-home:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
}

/* ========== 页面标题 ========== */
.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
}
.page-title .emoji {
    color: white;
}

/* ========== 分割线（发光） ========== */
.divider-light {
    height: 1px;
    width: 100%;
    background: linear-gradient(to right, transparent, rgba(139, 92, 246, 0.3), transparent);
    margin: 1.5rem 0;
}

/* ========== 照片墙 ========== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}
@media (min-width: 640px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}
.photo {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}
.photo:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.photo img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}
.photo p {
    margin: 0;
    padding: 0.6rem 0.75rem 0.75rem;
    text-align: center;
    color: #d1d5db;
    font-size: 0.85rem;
    font-weight: 500;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ========== TS 教程页专用 ========== */
.connect-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}
.connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
}
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}
.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}
.step-number {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}
.step-title {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.step-content {
    padding-left: 44px;
    color: #d1d5db;
    line-height: 1.7;
}
.step-content ul {
    list-style: none;
    padding-left: 0;
}
.step-content ul li {
    padding: 0.25rem 0;
}
.step-content strong {
    color: #e5e7eb;
}
.inline-code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.6rem;
    border-radius: 0.5rem;
    font-family: monospace;
    font-size: 0.85rem;
    color: #c4b5fd;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.tip {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-left: 3px solid #fbbf24;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    margin: 1rem 0;
    color: #d1d5db;
}
.warning {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-left: 3px solid #ef4444;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    margin: 1rem 0;
    color: #d1d5db;
}
.download-section {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1.25rem;
    padding: 1.25rem;
    margin: 1.5rem 0;
}
.download-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.step {
    margin-bottom: 1.5rem;
}
.subtitle {
    color: #9ca3af;
    margin-bottom: 1.5rem;
}
.footer-text {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.8rem;
    text-align: center;
    padding: 0.5rem 0;
}
.disclaimer {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    padding: 0.75rem 1.25rem;
    margin-top: 1.5rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
}
.disclaimer a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
}
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #a78bfa;
    margin-bottom: 1rem;
}

/* ========== 关于页面 ========== */
.about-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #a78bfa;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}
.about-content p {
    color: #d1d5db;
    line-height: 1.75;
    margin-bottom: 0.75rem;
}
.about-content ul {
    list-style: none;
    padding-left: 0;
}
.about-content ul li {
    color: #d1d5db;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.highlight {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    margin: 1.25rem 0;
    color: #d1d5db;
}
.tech-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    color: #c4b5fd;
    font-weight: 500;
}
.version {
    font-family: monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.25);
    text-align: right;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ========== 留言板 ========== */
.guestbook-container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
}

.guestbook-container .form-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 1.25rem;
    backdrop-filter: blur(8px);
    width: 100%;
    box-sizing: border-box;
}

.guestbook-container iframe {
    width: 100% !important;
    min-height: 650px;
    height: 100%;
    border: none;
    background: transparent;
    display: block;
    border-radius: 0.75rem;
}

.guestbook-container .main-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2rem;
    padding: 2rem 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .guestbook-container .main-card {
        padding: 1.25rem;
    }
    .guestbook-container iframe {
        min-height: 700px;
    }
}

/* ========== 游戏页面通用 ========== */
.game-wrapper {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 32px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.game-canvas {
    background: #0a0e1a;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.info-panel {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    padding: 20px;
    min-width: 150px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.info-panel div {
    margin-bottom: 20px;
}
.info-label {
    color: #888;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.info-value {
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    font-family: monospace;
}
.next-canvas {
    background: #0a0e1a;
    border-radius: 12px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.control-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.ctrl-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #d1d5db;
    font-size: 1.1rem;
    padding: 10px 18px;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
}
.ctrl-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
    color: white;
    transform: scale(1.02);
}
.game-status {
    font-size: 0.9rem;
    color: #fbbf24;
    margin-top: 10px;
}
.game-hint {
    text-align: center;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}
@media (max-width: 600px) {
    .game-wrapper {
        padding: 15px;
    }
    .ctrl-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    .info-value {
        font-size: 1.3rem;
    }
}

/* ========== 俄罗斯方块 ========== */
.tetris-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
}

.tetris-wrapper .info-panel {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    min-width: 150px;
    flex: 1;
    max-width: 180px;
    text-align: center;
}

.tetris-wrapper .info-panel > div {
    margin-bottom: 20px;
}

.tetris-wrapper .info-panel .info-label {
    color: #888;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tetris-wrapper .info-panel .info-value {
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    font-family: monospace;
}

.tetris-wrapper .info-panel .next-canvas {
    background: #0a0e1a;
    border-radius: 12px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tetris-wrapper .info-panel .game-status {
    font-size: 0.9rem;
    color: #fbbf24;
    margin-top: 10px;
}

/* ========== Flappy Bird ========== */
.flappy-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.flappy-wrapper .score-board {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.flappy-wrapper .score-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 8px 20px;
    color: white;
    font-weight: bold;
    text-align: center;
}

.flappy-wrapper .score-label {
    font-size: 0.75rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.flappy-wrapper .score-value {
    font-size: 1.8rem;
    font-family: monospace;
}

.flappy-wrapper .start-btn {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border: none;
    color: white;
    font-size: 1.1rem;
    padding: 12px 32px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.2);
}

.flappy-wrapper .start-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
}

.flappy-wrapper .instruction {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}
.score-board {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.score-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 8px 20px;
    color: white;
    font-weight: bold;
}
.score-label {
    font-size: 0.75rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.score-value {
    font-size: 1.8rem;
    font-family: monospace;
}
.start-btn {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border: none;
    color: white;
    font-size: 1.1rem;
    padding: 12px 32px;
    border-radius: 40px;
    cursor: pointer;
    margin-top: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.2);
}
.start-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
}
.instruction {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* ========== 游戏通用控制按钮 ========== */
.control-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.ctrl-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #d1d5db;
    font-size: 1.1rem;
    padding: 10px 18px;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
}

.ctrl-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
    color: white;
    transform: scale(1.02);
}

.game-hint {
    text-align: center;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

@media (max-width: 640px) {
    .tetris-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .tetris-wrapper .info-panel {
        max-width: 100%;
        width: 100%;
    }
}