﻿/* ===== Reset & Variables ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2128;
    --bg-card-hover: #252c35;
    --border: #30363d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent: #58a6ff;
    --green: #3fb950;
    --orange: #d29922;
    --purple: #bc8cff;
    --red: #f85149;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== Header ===== */
header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 6px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

/* ===== Hero ===== */
.hero {
    text-align: center;
    padding: 72px 24px 56px;
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-secondary);
    font-size: 17px;
    margin-top: 16px;
}

.search-box {
    margin-top: 28px;
    display: flex;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.search-box input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: 8px 0 0 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus { border-color: var(--accent); }

.search-box button {
    padding: 12px 24px;
    border: none;
    border-radius: 0 8px 8px 0;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.search-box button:hover { opacity: 0.85; }

/* ===== Main Layout ===== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 40px 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
}

.badge-blue   { background: var(--accent); }
.badge-green  { background: var(--green); }
.badge-orange { background: var(--orange); }
.badge-purple { background: var(--purple); }
.badge-pink   { background: #e91e63; }

/* ===== Grid ===== */
.grid {
    display: grid;
    gap: 14px;
}

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

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 14px;
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.card-text { min-width: 0; }

.card-text .title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-text .desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Icon Colors ===== */
.ic-red    { background: linear-gradient(135deg, #ea4335, #c62828); }
.ic-blue   { background: linear-gradient(135deg, #4285f4, #1565c0); }
.ic-green  { background: linear-gradient(135deg, #34a853, #2e7d32); }
.ic-orange { background: linear-gradient(135deg, #fbbc04, #e65100); }
.ic-purple { background: linear-gradient(135deg, #a142f4, #7b1fa2); }
.ic-cyan   { background: linear-gradient(135deg, #00bcd4, #00838f); }
.ic-gray   { background: linear-gradient(135deg, #607d8b, #37474f); }
.ic-pink   { background: linear-gradient(135deg, #e91e63, #ad1457); }

/* ===== Stats ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 32px 0 8px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.stat-card .num {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
}

.stat-card .label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 32px 24px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
}

footer a { color: var(--accent); text-decoration: none; }
footer code {
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stats  { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 32px; }
}

@media (max-width: 600px) {
    .grid-4,
    .grid-3,
    .grid-2 { grid-template-columns: 1fr; }
    .stats  { grid-template-columns: repeat(2, 1fr); }
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 16px;
        gap: 8px;
    }
    .nav-links { flex-wrap: wrap; }
    .hero { padding: 40px 16px 32px; }
    .hero h1 { font-size: 28px; }
}
