/* ========================================
   地理学页面样式 - 绿色大地主题
   ======================================== */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #2d5a27;
    --secondary-green: #4a7c43;
    --accent-teal: #2e8b8b;
    --accent-brown: #8b7355;
    --accent-gold: #d4a84b;
    --bg-light: #f5f7f0;
    --bg-cream: #faf9f5;
    --text-dark: #2c3e2d;
    --text-muted: #5a6b5c;
    --card-bg: #ffffff;
    --sidebar-bg: linear-gradient(180deg, #2d5a27 0%, #1a3d1a 100%);
    --hover-bg: rgba(74, 124, 67, 0.1);
    --border-color: #d4e0d0;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
}

/* ========================================
   页面布局
   ======================================== */
.page-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ========================================
   侧边栏
   ======================================== */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 3rem;
    margin-bottom: 10px;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* 导航菜单 */
.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav > ul > li {
    margin: 2px 0;
}

.sidebar-nav a {
    display: block;
    padding: 12px 25px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-gold);
    color: #fff;
}

/* 子菜单 */
.has-submenu > a::after {
    content: ' ▼';
    font-size: 0.7rem;
    float: right;
    transition: transform 0.3s ease;
}

.has-submenu.expanded > a::after {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

.has-submenu.expanded .submenu {
    max-height: 300px;
}

.submenu li a {
    padding: 10px 25px 10px 45px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.submenu li a:hover {
    color: #fff;
}

/* 侧边栏底部 */
.sidebar-footer {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
}

.back-link {
    display: block;
    text-align: center;
    padding: 12px;
    background: var(--accent-gold);
    color: var(--primary-green);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: #e0b860;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ========================================
   内容区
   ======================================== */
.content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    min-height: 100vh;
    background: var(--bg-cream);
}

.section {
    margin-bottom: 60px;
}

.section h1,
.section h2 {
    margin-bottom: 25px;
    color: var(--primary-green);
}

.section h1 {
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 15px;
}

.section h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-gold));
    border-radius: 2px;
}

.section h2 {
    font-size: 1.8rem;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

/* 介绍区 */
.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 30px;
    padding: 25px;
    background: var(--card-bg);
    border-radius: 12px;
    border-left: 5px solid var(--secondary-green);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.highlight-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    padding: 25px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(45, 90, 39, 0.15);
    border-color: var(--secondary-green);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-green);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 模块卡片 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.module-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-teal));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(45, 90, 39, 0.15);
}

.module-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.module-card h3 {
    color: var(--primary-green);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.module-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-link {
    color: var(--accent-teal);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: var(--primary-green);
}

/* 学习路径 */
.path-section {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e8efe5 100%);
    padding: 40px;
    border-radius: 20px;
}

.learning-path {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.path-item {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 600px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.path-item:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(45, 90, 39, 0.15);
    border-color: var(--secondary-green);
}

.path-number {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.path-content h4 {
    color: var(--primary-green);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.path-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.path-arrow {
    font-size: 1.5rem;
    color: var(--secondary-green);
    margin: 10px 0;
}

/* 地图展示占位区 */
.map-section {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 20px;
}

.map-placeholder {
    min-height: 400px;
    background: linear-gradient(135deg, #e8efe5 0%, #d4e0d0 50%, #c8d8c5 100%);
    border: 3px dashed var(--secondary-green);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.map-placeholder::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(45, 90, 39, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(46, 139, 139, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(212, 168, 75, 0.05) 0%, transparent 60%);
}

.placeholder-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.placeholder-content h3 {
    color: var(--primary-green);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.placeholder-content p {
    color: var(--text-muted);
}

.placeholder-note {
    font-size: 0.85rem;
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(45, 90, 39, 0.1);
    border-radius: 20px;
    display: inline-block;
    color: var(--secondary-green);
}

/* 页脚 */
.footer {
    margin-top: 60px;
    padding: 30px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    background: var(--card-bg);
    border-radius: 12px;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .content {
        margin-left: 240px;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
        padding: 20px;
    }
    
    .section h1 {
        font-size: 1.8rem;
    }
    
    .section h2 {
        font-size: 1.4rem;
    }
    
    .highlight-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}

/* 选中文本样式 */
::selection {
    background: rgba(45, 90, 39, 0.2);
    color: var(--primary-green);
}
