/* ============================================
   易云GEO学堂 - 主样式文件
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #f9fafb;
}

a {
    color: #6366f1;
    text-decoration: none;
}

a:hover {
    color: #4f46e5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    color: white;
}

.btn-outline {
    background: white;
    color: #6366f1;
    border: 1px solid #6366f1;
}

.btn-outline:hover {
    background: #6366f1;
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* ========== 头部导航 ========== */
.header {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.logo-icon {
    font-size: 24px;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: #6b7280;
    font-weight: 500;
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: #6366f1;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -22px;
    left: 0;
    right: 0;
    height: 3px;
    background: #6366f1;
    border-radius: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu {
    position: relative;
    cursor: pointer;
}

.user-name {
    font-weight: 500;
    color: #374151;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    padding: 8px 0;
    display: none;
    margin-top: 10px;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 10px 16px;
    color: #374151;
    font-size: 14px;
}

.user-dropdown a:hover {
    background: #f3f4f6;
    color: #6366f1;
}

/* ========== Hero区域 ========== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-buttons .btn {
    padding: 14px 32px;
    font-size: 16px;
}

.hero-buttons .btn-outline {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.hero-buttons .btn-outline:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========== 通用区块 ========== */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #111827;
}

.section-header p {
    font-size: 18px;
    color: #6b7280;
}

/* ========== 功能特性 ========== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    background: white;
    padding: 32px 24px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #111827;
}

.feature-card p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

/* ========== 课程卡片 ========== */
.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.course-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.course-cover {
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: white;
    position: relative;
}

.course-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ef4444;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.course-badge.free {
    background: #10b981;
}

.course-body {
    padding: 20px;
}

.course-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #111827;
    line-height: 1.4;
}

.course-desc {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
    line-height: 1.6;
    height: 44px;
    overflow: hidden;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 13px;
    color: #9ca3af;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-price {
    font-size: 24px;
    font-weight: 700;
    color: #ef4444;
}

.course-price .original {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-left: 8px;
    font-weight: 400;
}

.course-price.free {
    color: #10b981;
}

/* ========== 检测工具页面 ========== */
.page-header {
    text-align: center;
    padding: 50px 0 30px;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #111827;
}

.page-header .subtitle {
    font-size: 16px;
    color: #6b7280;
}

.detect-box {
    max-width: 800px;
    margin: 0 auto 50px;
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.detect-form .form-group {
    margin-bottom: 20px;
}

.detect-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
}

.detect-form input,
.detect-form select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.detect-form input:focus,
.detect-form select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.detect-form .tip {
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
    margin-top: 16px;
}

.detect-form .tip strong {
    color: #6366f1;
}

/* 检测结果 */
.detect-result {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e5e7eb;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.result-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.result-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: #f9fafb;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.result-section {
    margin-bottom: 24px;
}

.result-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #374151;
}

.quote-box {
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    padding: 16px;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    line-height: 1.8;
    color: #0c4a6e;
}

.answer-box {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.8;
    color: #374151;
    max-height: 300px;
    overflow-y: auto;
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
}

/* 历史记录 */
.history-section {
    max-width: 800px;
    margin: 0 auto 50px;
}

.history-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.history-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.history-item:last-child {
    border-bottom: none;
}

.history-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-keyword {
    color: #6b7280;
    font-size: 14px;
}

.history-platform {
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #6b7280;
}

.history-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-time {
    font-size: 13px;
    color: #9ca3af;
}

/* 功能介绍 */
.feature-section {
    max-width: 1000px;
    margin: 0 auto 60px;
}

.feature-section h3 {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-grid .feature-card {
    padding: 24px 16px;
}

.feature-grid .feature-icon {
    font-size: 36px;
}

.feature-grid h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

/* ========== 登录注册 ========== */
.auth-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header p {
    color: #6b7280;
    font-size: 14px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
    color: #374151;
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.auth-form .btn {
    padding: 12px;
    font-size: 16px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #6b7280;
}

/* ========== 底部 ========== */
.footer {
    background: #111827;
    color: #9ca3af;
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #9ca3af;
    font-size: 14px;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #1f2937;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .features-grid,
    .course-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
    }
    
    .footer-inner {
        grid-template-columns: 1fr;
    }
    
    .nav {
        display: none;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
}
