/* 全局样式 */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --bg-color: #ffffff;
    --code-bg: #f3f4f6;
    --border-color: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* 导航栏样式 */
header {
    background-color: var(--bg-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

nav a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 主要内容区域 */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

article {
    background-color: var(--bg-color);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 2rem;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    line-height: 1.2;
}

h2 {
    font-size: 1.875rem;
    color: var(--secondary-color);
    margin: 2rem 0 1rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 1.5rem 0 1rem;
}

p {
    margin-bottom: 1rem;
}

/* 代码块样式 */
pre {
    background-color: var(--code-bg);
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin: 1rem 0;
}

code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.875rem;
}

/* 列表样式 */
ul {
    list-style-position: inside;
    margin: 1rem 0;
}

li {
    margin-bottom: 0.5rem;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--code-bg);
    margin-top: 4rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    article {
        padding: 1rem;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #3b82f6;
        --secondary-color: #60a5fa;
        --text-color: #f3f4f6;
        --bg-color: #1f2937;
        --code-bg: #374151;
        --border-color: #4b5563;
    }

    body {
        background-color: var(--bg-color);
    }

    pre {
        background-color: var(--code-bg);
    }

    footer {
        background-color: var(--code-bg);
    }
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
  display: block;
} 