/* 1. 色彩与主题定义 */
:root {
    --color-bg: #fff;
    --color-surface: #f9fafb;
    --color-border: #e5e7eb;
    --color-text-header: #111827;
    --color-text-body: #374151;
    --color-text-muted: #6b7280;
    --color-primary: #FF4500;
    --gradient-primary: linear-gradient(90deg, #FF4500 0%, #FF8C00 100%);
    --shadow-color: rgba(0, 0, 0, .1);
    --header-bg: rgba(255, 255, 255, .8)
}

.dark-theme {
    --color-bg: #0A0C0F;
    --color-surface: #141618;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-text-header: #ffffff;
    --color-text-body: #94A3B8;
    --color-text-muted: #64748B;
    --color-primary: #FF6347;
    --gradient-primary: linear-gradient(135deg, #FF6347 0%, #FFA500 100%);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --header-bg: rgba(10, 12, 15, 0.8)
}

/* 2. 基础与布局 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-body);
    line-height: 1.7;
    transition: background-color .3s, color .3s;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: 20px 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-header);
    font-weight: 700;
}

/* 3. 页面结构 */
.header {
    padding: 60px 0;
    text-align: center;
}

.header h1 {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.header-description {
    max-width: 600px;
    margin: 0 auto 30px;
    font-size: 16px;
    color: var(--color-text-muted);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-emphasis-color: transparent
}

.tab-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-bottom: 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 50px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.tab-btn {
    padding: 14px 28px;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s;
    border: 1px solid transparent;
    cursor: pointer;
    background-color: transparent;
    color: var(--color-text-muted);
    font-size: 16px;
    position: relative;
    bottom: -1px;
    border-bottom-color: transparent;
}

.tab-btn:hover {
    background-color: var(--color-surface);
    color: var(--color-text-header);
}

.tab-btn.active {
    color: var(--color-text-header);
    background-color: transparent;
}

.tab-btn.active {
    color: var(--color-text-header);
    background-color: transparent;
    border-color: transparent;
    border-bottom: 2px solid var(--color-primary);
}

.content-wrapper {
    flex: 1;
}

.main-content {
    padding: 40px 0;
}

.category-content {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.category-content.active {
    display: grid;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 28px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1'%3e%3cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3e%3ccircle cx='12' cy='12' r='3'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right -40px bottom -40px;
    background-size: 120px 120px;
    opacity: 0.8;
    transition: all 0.3s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 99, 71, 0.3);
    box-shadow: 0 0 15px rgba(255, 99, 71, 0.1);
}

.card:hover::before {
    opacity: 1;
    transform: scale(1.1) rotate(-5deg);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='1'%3e%3cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3e%3ccircle cx='12' cy='12' r='3'/%3e%3c/svg%3e");
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 69, 0, 0.08);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.card-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--color-primary);
    stroke-width: 1.5;
    transition: all 0.3s ease;
}

.card:hover .card-icon {
    background: rgba(255, 69, 0, 0.1);
}

.card:hover .card-icon svg {
    stroke: var(--color-primary);
    transform: scale(1.1);
}

.card h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text-header);
    margin: 0;
}

.card p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-body);
    margin-left: 0;
    margin-top: 16px;
}