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

:root {
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

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

/* 导航栏 */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-logo:hover {
    color: var(--primary-dark);
}

.nav-logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.nav-menu a.highlight {
    color: var(--accent-orange);
    border: 2px solid var(--accent-orange);
}

.nav-menu a.highlight:hover {
    background: var(--accent-orange);
    color: var(--white);
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 100px 20px 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding-bottom: 80px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero .subtitle {
    font-size: 1.5rem;
    margin-bottom: 15px;
    opacity: 0.95;
    font-weight: 500;
}

.hero .description {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
}

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: auto;
}

/* 分类区域 */
.categories {
    padding: 80px 20px;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    margin: 15px auto 0;
    border-radius: 2px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--white);
    border-radius: 16px;
    padding: 35px 30px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-dark);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(102, 126, 234, 0.3);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card.featured {
    border: 2px solid var(--accent-orange);
}

.category-card.featured::before {
    background: var(--accent-orange);
}

.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    font-size: 1.8rem;
}

.card-icon.blue {
    background: linear-gradient(135deg, var(--accent-blue), #60a5fa);
}

.card-icon.green {
    background: linear-gradient(135deg, var(--accent-green), #34d399);
}

.card-icon.orange {
    background: linear-gradient(135deg, var(--accent-orange), #fbbf24);
}

.category-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.category-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.card-tags span {
    padding: 4px 12px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.card-arrow {
    position: absolute;
    bottom: 25px;
    right: 25px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.3s;
}

.category-card:hover .card-arrow {
    background: var(--primary-color);
    color: var(--white);
    transform: translateX(5px);
}

/* 特色功能 */
.features {
    padding: 80px 20px;
    background: var(--bg-light);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 40px 30px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--white);
    font-size: 2rem;
}

.feature-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.feature-item p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* 龙虾 Skills 预告区 */
.lobster-preview {
    padding: 100px 20px;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: var(--white);
}

.lobster-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.lobster-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.lobster-text h2 i {
    color: var(--accent-orange);
}

.lobster-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.7;
}

.lobster-features {
    list-style: none;
    margin-bottom: 35px;
}

.lobster-features li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
}

.lobster-features li i {
    color: var(--accent-green);
    font-size: 1.2rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--accent-orange), #fbbf24);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* 代码窗口 */
.lobster-visual {
    display: flex;
    justify-content: center;
}

.code-window {
    background: #0d1117;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 450px;
}

.code-header {
    background: #161b22;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-header .dot.red { background: #ff5f56; }
.code-header .dot.yellow { background: #ffbd2e; }
.code-header .dot.green { background: #27c93f; }

.code-header .title {
    margin-left: 10px;
    color: #8b949e;
    font-size: 0.9rem;
    font-family: 'Consolas', monospace;
}

.code-body {
    padding: 20px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.code-line {
    margin-bottom: 8px;
}

.code-line .prompt {
    color: var(--accent-green);
    margin-right: 8px;
}

.code-line .command {
    color: var(--white);
}

.code-line.output {
    color: #8b949e;
    padding-left: 24px;
    margin: 12px 0;
}

.code-line .success {
    color: var(--accent-green);
}

.code-line .cursor {
    display: inline-block;
    width: 8px;
    height: 18px;
    background: var(--accent-orange);
    animation: blink 1s infinite;
    margin-left: 4px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 页脚 */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 60px 20px 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-brand i {
    color: var(--primary-color);
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 10px;
    opacity: 0.8;
}

.beian-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    opacity: 0.7;
}

.beian-info a {
    color: #ffd700;
    text-decoration: none;
}

.beian-info a:hover {
    text-decoration: underline;
}

/* 工具页面样式 */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 60px 20px;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.tools-section {
    padding: 60px 20px;
    background: var(--bg-light);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.tool-card {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-card h3 i {
    font-size: 1.4rem;
}

.tool-input,
.tool-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Consolas', monospace;
    transition: border-color 0.3s;
    margin-bottom: 15px;
}

.tool-textarea {
    min-height: 120px;
    resize: vertical;
}

.tool-input:focus,
.tool-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.tool-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.btn-secondary {
    background: #e5e7eb;
    color: var(--text-dark);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tool-result {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 15px;
    min-height: 60px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    word-break: break-all;
    white-space: pre-wrap;
}

.tool-result.error {
    background: #fee2e2;
    color: #dc2626;
}

.tool-result.success {
    background: #d1fae5;
    color: #059669;
}

/* 技能卡片 */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: all 0.3s;
}

.skill-card:hover {
    border-color: var(--accent-orange);
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.skill-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-orange), #fbbf24);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

.skill-header h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
}

.skill-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.skill-features {
    list-style: none;
}

.skill-features li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
}

.skill-features li i {
    color: var(--accent-green);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .lobster-visual {
        order: -1;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

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

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