/* ===== 基础样式重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #6b5b4f;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== 通用样式 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 400;
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #b8a5c0 0%, #9c8aa6 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(184, 165, 192, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(184, 165, 192, 0.4);
    background: linear-gradient(135deg, #a394a8 0%, #8b7d8b 100%);
}

.btn-secondary {
    background: rgba(156, 138, 166, 0.1);
    color: #6b5b73;
    border: 1px solid rgba(156, 138, 166, 0.2);
}

.btn-secondary:hover {
    background: rgba(156, 138, 166, 0.2);
    transform: translateY(-1px);
    border-color: rgba(156, 138, 166, 0.3);
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(180, 166, 147, 0.15);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.nav-logo h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    background: linear-gradient(135deg, #8b7d8b 0%, #6b5b73 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    text-decoration: none;
    color: #9c8aa6;
    font-weight: 400;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #8b7d8b;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #8b7d8b 0%, #6b5b73 100%);
    border-radius: 1px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #1d1d1f;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* ===== 主要内容区域 ===== */
main {
    position: relative;
    z-index: 1;
}

/* ===== 英雄区域 ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
    position: relative;
    overflow: hidden;
}

/* 星光粒子容器 - 全局背景 */
.sparkles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

/* 星光粒子 */
.sparkle {
    position: absolute;
    background: var(--sparkle-color, #4a9b8e);
    border-radius: 50%;
    pointer-events: none;
    animation: sparkle-float 6s infinite linear;
}

.sparkle.small {
    width: 2px;
    height: 2px;
    opacity: 0.6;
}

.sparkle.medium {
    width: 3px;
    height: 3px;
    opacity: 0.8;
}

.sparkle.large {
    width: 4px;
    height: 4px;
    opacity: 1;
}

@keyframes sparkle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* 闪烁效果 */
.sparkle.twinkle {
    animation: sparkle-float 6s infinite linear, twinkle 2s infinite ease-in-out;
}

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

/* 颜色调节控制面板 */
.color-controls {
    position: fixed;
    top: 33.33%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
    font-family: 'Inter', sans-serif;
    cursor: move;
    user-select: none;
}

.color-controls.dragging {
    transition: none;
}

.color-controls:not(.dragging) {
    transition: all 0.3s ease;
}

.control-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.control-toggle:hover {
    transform: scale(1.1);
}

.control-toggle span {
    font-size: 20px;
}

.control-panel {
    position: absolute;
    right: 60px;
    top: 0;
    width: 280px;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateX(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.control-panel.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.control-panel h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.control-group input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: none;
}

.control-group input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.control-group input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.reset-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #2d4a47;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

.highlight {
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.3rem;
    color: #4a6b68;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(255, 255, 255, 0.3);
}

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

.avatar-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
}

.avatar-ring {
    position: absolute;
    width: 320px;
    height: 320px;
    border: 2px solid #007AFF;
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

/* ===== 植物识别区域 ===== */
.plant-recognition-section {
    padding: 6rem 0;
    color: #6b5b4f;
}

.plant-recognition-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
    align-items: start;
}

.upload-area {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.upload-box {
    border: 2px dashed #b8a5c0;
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(184, 165, 192, 0.1);
}

.upload-box:hover {
    border-color: #9c8aa6;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(184, 165, 192, 0.15);
}

.upload-icon {
    color: #64748b;
    margin-bottom: 1rem;
}

.upload-box p {
    margin: 0.5rem 0;
    color: #9c8aa6;
}

.upload-hint {
    font-size: 0.9rem;
    color: #94a3b8 !important;
}

/* 识别内容提示工具 */
.recognition-tooltip {
    position: relative;
    display: inline-block;
    margin-top: 10px;
}

.tooltip-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(184, 165, 192, 0.1);
    border: 1px solid rgba(184, 165, 192, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    color: #6b5b73;
}

.tooltip-trigger:hover {
    background: rgba(184, 165, 192, 0.2);
    border-color: rgba(184, 165, 192, 0.3);
    transform: translateY(-1px);
}

.tooltip-icon {
    font-size: 14px;
}

.tooltip-content {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    width: 280px;
    background: white;
    border: 1px solid rgba(184, 165, 192, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: white;
}

.tooltip-content::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: rgba(184, 165, 192, 0.2);
    margin-top: 1px;
}

.recognition-tooltip:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

.tooltip-content h4 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b5b73;
    text-align: center;
}

.recognition-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.type-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(184, 165, 192, 0.05);
    border-radius: 8px;
    font-size: 0.8rem;
    color: #6b5b73;
    transition: all 0.2s ease;
}

.type-item:hover {
    background: rgba(184, 165, 192, 0.1);
    transform: translateY(-1px);
}

.type-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tooltip-content {
        width: 240px;
        padding: 12px;
    }
    
    .recognition-types {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .type-item {
        font-size: 0.75rem;
        padding: 4px 6px;
    }
}

.preview-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
}

.preview-container img {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

.preview-container .btn {
    margin: 0;
    align-self: center;
}

.result-area {
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 40px rgba(184, 165, 192, 0.15);
    border: 1px solid rgba(156, 138, 166, 0.2);
}

.result-placeholder {
    text-align: center;
    color: #9c8aa6;
}

.result-icon {
    color: #b8a5c0;
    margin-bottom: 1rem;
}

.result-content {
    width: 100%;
}

.loading {
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(184, 165, 192, 0.2);
    border-top: 4px solid #b8a5c0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.plant-info {
    text-align: left;
}

.plant-info h3 {
    color: #6b5b73;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #8b7d8b 0%, #6b5b73 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plant-details p {
    color: #8b7d8b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.confidence-score {
    background: rgba(184, 165, 192, 0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    color: #6b5b73;
    font-weight: 500;
}

/* 清除图片按钮 */
.clear-image-btn {
    background: linear-gradient(135deg, #d4c4b0, #c9b8a3);
    color: #6b5b4f;
    border: 1px solid #b8a693;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(180, 166, 147, 0.2);
}

.clear-image-btn:hover {
    background: linear-gradient(135deg, #c9b8a3, #bea992);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(180, 166, 147, 0.3);
}

/* 留言板和联系区域样式 */
.message-contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(184, 165, 192, 0.15);
    border: 1px solid rgba(156, 138, 166, 0.1);
}

.message-contact-section h3,
.message-contact-section h4 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
}

.message-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(156, 138, 166, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    color: #6b5b73;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #b8a5c0;
    box-shadow: 0 0 0 3px rgba(184, 165, 192, 0.1);
    background: white;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #b8a5c0;
}

.contact-links {
    background: rgba(255, 255, 255, 0.5);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    text-decoration: none;
    color: #475569;
    transition: all 0.3s ease;
}

.contact-method:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    transform: translateX(5px);
}

.contact-method span:first-child {
    font-size: 1.2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .plant-recognition-content,
    .message-contact-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .upload-box {
        padding: 2rem 1rem;
    }
    
    .result-area {
        min-height: 300px;
    }
}

/* ===== 收藏网站展示区域 ===== */
.featured-section {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.featured-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

.featured-section .section-title {
    text-shadow: none;
}

.featured-section .section-subtitle {
    text-shadow: none;
}

/* 分类栏样式 */
.category-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0;
    padding: 0 20px;
}

.tab-button {
    padding: 10px 20px;
    border: 2px solid rgba(184, 165, 192, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
    color: #6b5b73;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.tab-button:hover {
    background: linear-gradient(135deg, rgba(163, 130, 208, 0.2) 0%, rgba(163, 130, 208, 0.1) 100%);
    border-color: rgba(163, 130, 208, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(163, 130, 208, 0.2);
}

.tab-button.active {
    background: linear-gradient(135deg, rgba(163, 130, 208, 0.3) 0%, rgba(163, 130, 208, 0.2) 100%);
    border-color: rgba(163, 130, 208, 0.6);
    color: #4a3a5a;
    box-shadow: 0 4px 15px rgba(163, 130, 208, 0.3);
}

.website-collection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    position: relative;
    padding: 20px 0;
    z-index: 1;
}

.website-item {
    transition: all 0.3s ease;
}

.website-item.hidden {
    display: none;
}

.website-item {
    position: relative;
    aspect-ratio: 1.5;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border: 1px solid rgba(184, 165, 192, 0.2);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    backdrop-filter: blur(10px);
}

.website-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(146, 203, 231, 0.1) 0%, rgba(163, 130, 208, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.website-item:hover::before {
    opacity: 1;
}

.website-item:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(163, 130, 208, 0.4);
}

.website-category {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 500;
    color: #8b7d8b;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(184, 165, 192, 0.3);
    z-index: 2;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.website-item:hover .website-category {
    background: rgba(163, 130, 208, 0.15);
    border-color: rgba(163, 130, 208, 0.5);
    transform: translateX(-50%) translateY(-2px);
}

.website-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6b5b73;
    position: relative;
    z-index: 2;
    padding: 20px;
    padding-top: 45px;
    margin: 0;
    transition: all 0.3s ease;
}

.website-item:hover h3 {
    transform: translateY(-10px);
    font-size: 1.2rem;
}

.website-item p {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    font-size: 0.85rem;
    color: #8b7d8b;
    line-height: 1.5;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 3;
    margin: 0;
    border-top: 1px solid rgba(184, 165, 192, 0.2);
}

.website-item:hover p {
    opacity: 1;
    transform: translateY(0);
}

.website-link {
    position: absolute;
    inset: 0;
    z-index: 10;
    text-indent: -9999px;
}

/* 响应式优化 */
@media (max-width: 1200px) {
    .website-collection {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .category-tabs {
        gap: 8px;
        margin: 20px 0;
        padding: 0 10px;
    }
    
    .tab-button {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .website-collection {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .website-item h3 {
        font-size: 0.95rem;
        padding: 15px;
    }
    
    .website-item:hover h3 {
        font-size: 1rem;
    }
    
    .website-item p {
        font-size: 0.75rem;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .website-collection {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .website-item h3 {
        font-size: 0.85rem;
        padding: 10px;
    }
    
    .website-item:hover h3 {
        font-size: 0.9rem;
    }
}

/* ===== AI对话区域 ===== */
.ai-chat-section {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.chat-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
    backdrop-filter: blur(10px);
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.chat-title h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.status-indicator span {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.chat-actions {
    display: flex;
    gap: 8px;
}

.chat-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.chat-action-btn:hover {
    background: rgba(107, 114, 128, 0.2);
    color: #374151;
    transform: translateY(-1px);
}

.chat-content {
    position: relative;
    height: 700px;
    background: #ffffff;
}

.chat-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ai-chat-section {
        padding: 4rem 0;
    }
    
    .chat-container {
        margin: 0 16px;
        border-radius: 12px;
    }
    
    .chat-header {
        padding: 16px 20px;
    }
    
    .chat-title h3 {
        font-size: 1.125rem;
    }
    
    .chat-content {
        height: 600px;
    }
    
    .chat-actions {
        gap: 6px;
    }
    
    .chat-action-btn {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .chat-container {
        margin: 0 12px;
    }
    
    .chat-header {
        padding: 12px 16px;
    }
    
    .chat-content {
        height: 500px;
    }
    
    .chat-title {
        gap: 8px;
    }
    
    .chat-icon {
        width: 32px;
        height: 32px;
    }
}

/* ===== 社交媒体区域 ===== */
.social-section {
    padding: 6rem 0;
}

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

.social-card {
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
    border: 1px solid rgba(156, 138, 166, 0.2);
}

.social-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(184, 165, 192, 0.3);
}

.social-icon {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.social-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.social-card p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.social-link {
    color: #6b5b73;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(156, 138, 166, 0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
    display: inline-block;
}

.social-link:hover {
    background: rgba(184, 165, 192, 0.1);
    border-color: #b8a5c0;
    color: #8b7d8b;
}

/* ===== 联系区域 ===== */
.contact-section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    gap: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(156, 138, 166, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(184, 165, 192, 0.1);
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-item h4 {
    color: #6b5b73;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-item p {
    color: #9c8aa6;
    margin: 0;
    font-size: 0.95rem;
}

.contact-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== 页脚 ===== */
.footer {
    color: #6b5b4f;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #9c8aa6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #6b5b73;
}

/* 游戏平台样式 */
.games-section {
    padding: 5rem 0;
}

.platform-container {
    width: 100%;
    max-width: 800px;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    margin: 0 auto;
}

.platform-title {
    font-size: 2.5em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

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

.game-card {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

.game-card h4 {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.game-card p {
    color: #34495e;
    font-size: 0.9em;
}

.game-container {
    display: none;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.game-container.active {
    display: block;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.back-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(238, 90, 36, 0.4);
}

.game-canvas {
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 15px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    display: block;
}

.game-controls {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin: 8px 0;
    padding: 8px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.info-item {
    text-align: center;
}

.info-label {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.info-value {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
}

.hidden {
    display: none !important;
}

/* 暂停状态提示样式 */
.pause-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    border-radius: 15px;
    pointer-events: none;
}

.pause-overlay.active {
    pointer-events: auto;
    display: flex;
}

.pause-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: pausePulse 2s ease-in-out infinite;
}

.pause-message h4 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.pause-message p {
    font-size: 1.2em;
    opacity: 0.9;
}

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

/* 游戏结束弹窗样式 */
.game-over-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.game-over-modal.active {
    display: flex;
}

.game-over-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: scale(0.8);
    animation: modalPop 0.3s ease-out forwards;
    max-width: 400px;
    width: 90%;
}

.game-over-content.win {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.game-over-content.lose {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.game-over-title {
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-over-message {
    font-size: 1.2em;
    margin-bottom: 20px;
    opacity: 0.9;
}

.game-over-score {
    font-size: 1.5em;
    font-weight: bold;
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.game-over-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.game-over-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.game-over-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.game-over-btn.primary {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.game-over-btn.primary:hover {
    background: white;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.game-canvas-container {
    position: relative;
    display: inline-block;
}

/* 扫雷特殊样式 */
.mine-grid {
    display: grid;
    gap: 1px;
    border: 2px solid #2c3e50;
    background: #2c3e50;
    margin: 20px 0;
    padding: 2px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.mine-grid[data-difficulty="beginner"] {
    grid-template-columns: repeat(9, 1fr);
    max-width: 220px;
}

.mine-grid[data-difficulty="intermediate"] {
    grid-template-columns: repeat(16, 1fr);
    max-width: 380px;
}

.mine-grid[data-difficulty="expert"] {
    grid-template-columns: repeat(30, 1fr);
    max-width: 600px;
    gap: 1.5px;
    padding: 3px;
    border: 3px solid #34495e;
    background: #34495e;
}

.mine-cell {
    width: 22px;
    height: 22px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: linear-gradient(145deg, #f0f0f0, #d0d0d0);
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
    transition: all 0.2s ease;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.mine-cell:hover {
    background: linear-gradient(145deg, #e0e0e0, #c0c0c0);
    transform: translateY(-1px);
}

.mine-cell.revealed {
    background: #ffffff;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.2);
    transform: none;
}

.mine-cell.mine {
    background: linear-gradient(145deg, #ff4757, #c44569);
    color: white;
    animation: explode 0.4s ease-out;
    box-shadow: 0 0 8px rgba(255, 71, 87, 0.6);
    font-size: 14px;
}

.mine-cell.flagged {
    background: linear-gradient(145deg, #ffa502, #ff6348);
    transform: scale(1.08);
    box-shadow: 0 2px 6px rgba(255, 165, 2, 0.4);
}

@keyframes explode {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 71, 87, 0.6); }
    25% { transform: scale(1.15); box-shadow: 0 0 12px rgba(255, 71, 87, 0.8); }
    50% { transform: scale(1.25); box-shadow: 0 0 16px rgba(255, 71, 87, 1); }
    75% { transform: scale(1.1); box-shadow: 0 0 8px rgba(255, 71, 87, 0.6); }
    100% { transform: scale(1); box-shadow: 0 0 4px rgba(255, 71, 87, 0.4); }
}

/* 数字颜色 */
.mine-cell.revealed[data-number="1"] { color: #1e88e5; font-weight: bold; }
.mine-cell.revealed[data-number="2"] { color: #43a047; font-weight: bold; }
.mine-cell.revealed[data-number="3"] { color: #e53935; font-weight: bold; }
.mine-cell.revealed[data-number="4"] { color: #8e24aa; font-weight: bold; }
.mine-cell.revealed[data-number="5"] { color: #d32f2f; font-weight: bold; }
.mine-cell.revealed[data-number="6"] { color: #00acc1; font-weight: bold; }
.mine-cell.revealed[data-number="7"] { color: #424242; font-weight: bold; }
.mine-cell.revealed[data-number="8"] { color: #757575; font-weight: bold; }

/* 俄罗斯方块布局样式 */
.tetris-layout {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 20px;
}

.tetris-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tetris-canvas {
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.tetris-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 150px;
}

.next-piece-container {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.next-piece-container h5 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1em;
}

.next-piece-canvas {
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 5px;
}

.tetris-instructions {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 15px;
}

.tetris-instructions h5 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1em;
}

.tetris-instructions p {
    color: #34495e;
    margin: 5px 0;
    font-size: 0.9em;
}

/* 扫雷游戏布局样式 */
.minesweeper-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3pt;
    padding-top: 5px;
}

.minesweeper-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3pt;
}

.difficulty-selector {
    text-align: center;
    margin-bottom: 8px;
}

.difficulty-selector h5 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
}

.difficulty-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.difficulty-btn {
    padding: 8px 16px;
    border: 2px solid #3498db;
    color: #3498db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.difficulty-btn:hover {
    color: white;
    transform: translateY(-2px);
}

.difficulty-btn.active {
    color: white;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #007AFF;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0051D5;
}

/* ===== 目标光标样式 ===== */
.target-cursor-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
}

.target-cursor-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 4px;
    background: #92cbe7;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    will-change: transform;
}

.target-cursor-corner {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    border: 3px solid #a382d0;
    will-change: transform;
}

.corner-tl {
    transform: translate(-150%, -150%);
    border-right: none;
    border-bottom: none;
}

.corner-tr {
    transform: translate(50%, -150%);
    border-left: none;
    border-bottom: none;
}

.corner-br {
    transform: translate(50%, 50%);
    border-left: none;
    border-top: none;
}

.corner-bl {
    transform: translate(-150%, 50%);
    border-right: none;
    border-top: none;
}