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

:root {
    --primary-color: #8B6F47;
    --secondary-color: #5A8C3E;
    --accent-color: #D4A574;
    --dark-color: #3E2723;
    --light-color: #F5F1E8;
    --text-color: #333;
    --sidebar-width: 380px;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
                 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--light-color);
    overflow-x: hidden;
}

/* ====================================
   左侧固定侧边栏
   ==================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #6B8E23 0%, #8B7355 100%);
    color: white;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar-content {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.logo-section {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* ====================================
   纯CSS小刺猬
   ==================================== */
.hedgehog-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.hedgehog {
    position: relative;
    width: 120px;
    height: 80px;
}

.hedgehog-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 50px;
    background: #A0826D;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.hedgehog-spike {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid #6B5D54;
}

.spike-1 {
    top: 15px;
    left: 30px;
    transform: rotate(-20deg);
}

.spike-2 {
    top: 10px;
    left: 50px;
    transform: rotate(0deg);
}

.spike-3 {
    top: 15px;
    right: 30px;
    transform: rotate(20deg);
}

.spike-4 {
    top: 25px;
    left: 40px;
    transform: rotate(-10deg);
}

.spike-5 {
    top: 25px;
    right: 40px;
    transform: rotate(10deg);
}

.hedgehog-eye {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
}

.hedgehog-nose {
    position: absolute;
    bottom: 20px;
    left: 25px;
    width: 10px;
    height: 10px;
    background: #2C2416;
    border-radius: 50%;
}

/* ====================================
   侧边栏导航
   ==================================== */
.sidebar-nav {
    margin: 2rem 0;
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 0.5rem;
}

.nav-links a {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(5px);
}

/* ====================================
   下载区域
   ==================================== */
.download-section {
    margin-top: auto;
    text-align: center;
    padding-top: 2rem;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.download-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.download-btn:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.download-icon {
    font-size: 1.3rem;
    margin-right: 0.5rem;
}

.version {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.sidebar-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* ====================================
   右侧主内容区域
   ==================================== */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 3rem;
    min-height: 100vh;
}

.content-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.6s ease-out;
}

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

.content-section h2 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

/* ====================================
   游戏特色
   ==================================== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    background: var(--light-color);
    transition: var(--transition);
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.feature-card h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* ====================================
   游戏教程
   ==================================== */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 2rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color), #4A7C2E);
    color: white;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.step h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.step p {
    color: #666;
    line-height: 1.6;
}

/* ====================================
   系统要求
   ==================================== */
.requirements ul {
    list-style: none;
}

.requirements li {
    padding: 1.2rem;
    margin-bottom: 1rem;
    background: var(--light-color);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
}

.requirements li:hover {
    transform: translateX(5px);
    border-left-color: var(--secondary-color);
}

.requirements strong {
    color: var(--dark-color);
}

/* ====================================
   联系我们
   ==================================== */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-item {
    text-align: center;
    padding: 2rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-item h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.contact-item p {
    color: #666;
    word-break: break-word;
}

/* ====================================
   公司信息
   ==================================== */
.company-info {
    background: var(--light-color);
}

.company-details {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.company-details h3 {
    color: var(--dark-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.company-details p {
    color: #555;
    line-height: 1.8;
}

.company-address {
    margin-top: 1rem;
}

/* ====================================
   移动端菜单按钮
   ==================================== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
    background: var(--dark-color);
}

/* ====================================
   法律页面样式
   ==================================== */
.legal-page {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    max-width: 1200px;
}

.legal-container {
    padding: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.legal-container h1 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 1rem;
}

.last-updated {
    color: #999;
    font-style: italic;
    margin-bottom: 2rem;
}

.legal-section {
    margin-bottom: 2.5rem;
}

.legal-section h2 {
    color: var(--dark-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.legal-section h3 {
    color: var(--dark-color);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    margin-top: 1.5rem;
}

.legal-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #555;
}

.legal-section ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
    color: #555;
}

.acknowledgment {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 2rem 0;
    border-left: 4px solid var(--secondary-color);
}

.back-link {
    margin-top: 3rem;
    text-align: center;
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
}

.back-link a:hover {
    background: rgba(139, 111, 71, 0.1);
}

/* 法律页面的导航栏 */
header {
    background: linear-gradient(135deg, #6B8E23 0%, #8B7355 100%);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

header .logo {
    font-size: 1.5rem;
    color: white;
}

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

header .nav-links a {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
}

header .nav-links a:hover,
header .nav-links a.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

/* 法律页面的页脚 */
footer {
    background: white;
    margin-top: 3rem;
    padding: 3rem 2rem 1rem;
    border-top: 2px solid var(--light-color);
}

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

.footer-section h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    color: #666;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #666;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid #e0e0e0;
    color: #999;
}

/* ====================================
   响应式设计
   ==================================== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 320px;
    }

    .main-content {
        padding: 2rem;
    }

    .content-section {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    .content-section h2 {
        font-size: 1.5rem;
    }

    .feature-grid,
    .steps,
    .contact-info {
        grid-template-columns: 1fr;
    }

    .legal-container {
        padding: 2rem 1.5rem;
    }

    header nav {
        flex-direction: column;
        gap: 1rem;
    }

    header .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }

    .content-section {
        padding: 1.5rem 1rem;
    }

    .content-section h2 {
        font-size: 1.3rem;
    }

    .feature-card,
    .step {
        padding: 1.5rem 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .hedgehog {
        transform: scale(0.8);
    }
}

/* ====================================
   打印样式
   ==================================== */
@media print {
    .sidebar,
    .mobile-menu-toggle,
    header,
    footer,
    .download-section,
    .back-link {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    body {
        background: white;
    }

    .content-section,
    .legal-page,
    .legal-container {
        box-shadow: none;
    }
}
