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

:root {
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: #d9d9d9;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.back-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.back-link:hover {
    background: var(--bg-tertiary);
    transform: translateX(-2px);
}

.back-icon {
    margin-right: 0.5rem;
    font-size: 1.125rem;
}

.nav-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* 主要内容 */
.main-content {
    margin-top: 4rem;
}

/* 英雄区域 */
.hero-section {
    padding: 4rem 0;
    background: #d9d9d9;
    color: var(--text-primary);
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.hero-section::before {
    display: none;
}

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

.hero-content {
    animation: slideInUp 0.8s ease-out;
}

.avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.avatar-ring {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 教程选择区域 */
.tutorial-selection {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.tutorial-card {
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.tutorial-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.tutorial-card[data-level="initial"]:hover {
    border-color: var(--success-color);
}

.tutorial-card[data-level="intermediate"]:hover {
    border-color: var(--warning-color);
}

.tutorial-card[data-level="advanced"]:hover {
    border-color: var(--secondary-color);
}

.card-header {
    padding: 2rem 2rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.level-badge {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

.level-badge.beginner {
    background: var(--success-color);
}

.level-badge.intermediate {
    background: var(--warning-color);
}

.level-badge.advanced {
    background: var(--secondary-color);
}

.card-icon {
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.tutorial-card:hover .card-icon {
    color: var(--primary-color);
}

.card-content {
    padding: 0 2rem 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.card-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.card-footer {
    padding: 0 2rem 2rem;
}

.card-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-arrow {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.card-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* 教程面板 */
.tutorial-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 2000;
    padding: 2rem;
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
}

.panel-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    overflow: visible;
    animation: slideInUp 0.3s ease-out;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.panel-header {
    background: var(--bg-secondary);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn, .back-btn {
    background: var(--bg-tertiary);
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.close-btn:hover, .back-btn:hover {
    background: var(--border-color);
    transform: scale(1.1);
}

.back-btn {
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    width: auto;
    height: auto;
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.panel-content {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 120px);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* 教程选项 */
.tutorial-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-card:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
    border-color: var(--primary-color);
}

.option-icon {
    margin-right: 1rem;
    color: var(--primary-color);
}

.option-content {
    flex: 1;
}

.option-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.option-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.option-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.option-card:hover .option-arrow {
    color: var(--primary-color);
    transform: translateX(4px);
}

/* 教程内容 */
.tutorial-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.section-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.section-header {
    background: var(--bg-tertiary);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-content {
    padding: 1.5rem;
}

.tutorial-video {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.tutorial-text {
    line-height: 1.7;
}

.tutorial-step {
    margin-bottom: 2rem;
}

.step-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.step-list {
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.step-list li {
    margin-bottom: 0.5rem;
}

.copy-link {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.3s ease;
}

.copy-link:hover {
    color: var(--secondary-color);
}

/* 教程概览 */
.tutorial-overview {
    max-width: 800px;
    margin: 0 auto;
}

.overview-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.overview-header {
    background: var(--bg-tertiary);
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.overview-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.overview-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.overview-content {
    padding: 2rem;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.topic-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.topic-item:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.topic-icon {
    margin-right: 1rem;
    color: var(--primary-color);
}

.topic-content {
    flex: 1;
}

.topic-title {
        font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.topic-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.tag-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.category-icon {
    margin-right: 1rem;
    color: var(--primary-color);
}

.category-content {
    flex: 1;
}

.category-title {
        font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.category-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.quick-examples {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.examples-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.example-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.example-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .selection-grid {
        grid-template-columns: 1fr;
    }

    .tutorial-panel {
        padding: 1rem;
    }

    .panel-container {
        margin: 1rem;
        max-height: 95vh;
    }

    .panel-header {
        padding: 1rem;
    }

    .panel-content {
        padding: 1rem;
        max-height: calc(95vh - 100px);
    }

    .topic-grid {
        grid-template-columns: 1fr;
    }

    .tag-categories {
        grid-template-columns: 1fr;
    }

    .example-buttons {
        flex-direction: column;
    }
}

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

    .hero-section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .avatar {
        width: 80px;
        height: 80px;
    }

    .tutorial-card {
        margin: 0 1rem;
    }

    .card-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .card-content {
        padding: 0 1.5rem 1rem;
    }

    .card-footer {
        padding: 0 1.5rem 1.5rem;
    }
}

/* 暗色主题 */
body.dark-mode {
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --border-color: #475569;
}

body.dark-mode .navbar {
    background: rgba(15, 23, 42, 0.8);
    border-bottom-color: var(--border-color);
}

body.dark-mode .hero-section {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

/* 教程内容样式 */
.tutorial-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.tutorial-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.tutorial-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 1rem;
}

.code-example {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 1rem 0;
}

.code-example pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    background: var(--bg-tertiary);
}

.code-example code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
}