/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #24292f;
    background-color: #ffffff;
    min-height: 100vh;
    overflow-x: auto;
}

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

/* Header Styles */
.header {
    background-color: #24292f;
    border-bottom: 1px solid #30363d;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

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

.nav-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 20px;
    margin-right: 32px;
}

.logo i {
    font-size: 24px;
    margin-right: 8px;
}

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

.nav-link {
    color: #c9d1d9;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #ffffff;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background-color: #238636;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #2ea043;
}

.btn-secondary {
    background-color: transparent;
    color: #24292f;
    border: 1px solid #d1d9e0;
    padding: 4px 12px !important;
}

/* 在深色背景上的按钮样式 */
header .btn-secondary {
    color: #ffffff;
    border: 1px solid #ffffff;
}

header .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

.btn-secondary:hover {
    background-color: #f6f8fa;
    border-color: #d0d7de;
}

.btn-large {
    padding: 8px 12px;
    font-size: 16px;
}

/* Hero Section */
.hero {
    padding: 64px 0 80px;
    /* 顶部间距与 header 匹配 */
    background: linear-gradient(135deg, #f6f8fa 0%, #ffffff 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: #24292f;
}

.gradient-text {
    background: linear-gradient(135deg, #238636, #0969da);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 20px;
    color: #656d76;
    margin-bottom: 40px;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Code Preview */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-preview {
    background-color: #0d1117;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
}

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

.code-dots {
    display: flex;
    gap: 6px;
}

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

.dot.red {
    background-color: #ff5f56;
}

.dot.yellow {
    background-color: #ffbd2e;
}

.dot.green {
    background-color: #27ca3f;
}

.code-title {
    color: #c9d1d9;
    font-size: 14px;
    font-weight: 500;
}

.code-content {
    padding: 24px;
    color: #c9d1d9;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
}

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

.indent {
    padding-left: 24px;
}

.keyword {
    color: #ff7b72;
    font-weight: 600;
}

.variable {
    color: #d2a8ff;
}

.operator {
    color: #79c0ff;
}

.string {
    color: #a5d6ff;
}

.function {
    color: #d2a8ff;
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: #24292f;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-title i {
    color: #238636;
}

.section-description {
    font-size: 18px;
    color: #656d76;
    max-width: 600px;
    margin: 0 auto;
}

/* Tools Section */
.tools-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.tool-card {
    background-color: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 24px;
    transition: all 0.2s ease;
    position: relative;
    height: fit-content;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    border-color: #238636;
    box-shadow: 0 4px 12px rgba(35, 134, 54, 0.1);
    transform: translateY(-2px);
}

.tool-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #238636, #2ea043);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.tool-icon i {
    font-size: 28px;
    color: #ffffff;
}

.tool-title {
    font-size: 24px;
    font-weight: 600;
    color: #24292f;
    margin-bottom: 12px;
}

.tool-description {
    color: #656d76;
    margin-bottom: 20px;
    line-height: 1.5;
}

.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.feature-tag {
    background-color: #f6f8fa;
    color: #24292f;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.tool-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.shortcut-info {
    background-color: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 12px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #656d76;
    font-size: 14px;
}

.shortcut-info i {
    color: #0969da;
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background-color: #f6f8fa;
}

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

.feature-item {
    text-align: center;
    padding: 32px 20px;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background-color: #238636;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 24px;
    color: #ffffff;
}

.feature-item h3 {
    font-size: 20px;
    font-weight: 600;
    color: #24292f;
    margin-bottom: 12px;
}

.feature-item p {
    color: #656d76;
    line-height: 1.5;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-description {
    font-size: 18px;
    color: #656d76;
    line-height: 1.6;
    margin-bottom: 40px;
}

.stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #238636;
    margin-bottom: 8px;
}

.stat-label {
    color: #656d76;
    font-weight: 500;
}

/* Extension Preview */
.about-visual {
    display: flex;
    justify-content: center;
}

.extension-preview {
    background-color: #0d1117;
    border-radius: 12px;
    overflow: hidden;
    max-width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.preview-header {
    background-color: #161b22;
    padding: 16px;
    color: #c9d1d9;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.preview-content {
    padding: 20px;
}

.preview-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-item {
    background-color: #21262d;
    color: #c9d1d9;
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.menu-item:hover {
    background-color: #30363d;
}

.menu-item i {
    color: #238636;
}

/* Footer */
.footer {
    background-color: #24292f;
    color: #c9d1d9;
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 12px;
}

.footer-logo i {
    font-size: 20px;
}

.footer-description {
    color: #8b949e;
    margin-bottom: 0;
}

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

.footer-links a {
    color: #c9d1d9;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #30363d;
    padding-top: 20px;
    text-align: center;
    color: #8b949e;
}

/* 动画效果增强 */
.fade-in {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 0.7s cubic-bezier(.4, 0, .2, 1), transform 0.7s cubic-bezier(.4, 0, .2, 1);
    will-change: opacity, transform;
    /* 确保元素始终可见但透明 */
    visibility: visible;
}

/* 当元素有visible类时显示 */
.fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

/* 强制确保关键内容始终可见 */
.tools-section .fade-in,
.features-section .fade-in,
.about-section .fade-in,
.footer .fade-in {
    /* 即使没有visible类，也让这些主要内容可见 */
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    visibility: visible !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero {
        padding-top: 64px;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-actions {
        justify-content: center;
    }

    .section-title {
        font-size: 28px;
        flex-direction: column;
        gap: 8px;
    }

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

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .stats {
        justify-content: center;
    }

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

    .footer-links {
        justify-content: center;
    }
}

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

    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-description {
        font-size: 16px;
    }

    .section-title {
        font-size: 24px;
    }

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

    .stats {
        flex-direction: column;
        gap: 20px;
    }

    .tool-actions {
        flex-direction: column;
    }

    .hero-actions {
        flex-direction: column;
    }
}