:root {
    --bg-color: #f7f8fa;
    --surface: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --primary: #2563eb;
    --primary-light: #dbeafe;
    --border: #e5e7eb;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --success: #10b981;
    --success-light: #d1fae5;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --nav-height: 65px;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--nav-height) + 20px);
}
a {
    color: inherit;
    text-decoration: none;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}
header {
    background: var(--surface);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero {
    padding: 40px 0 20px;
    text-align: center;
}
.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.hero-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 32px;
}
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
}
.search-input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface);
    color: var(--text-main);
    transition: all 0.2s;
    outline: none;
}
.search-input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    max-height: 400px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    text-align: left;
}
.search-results-dropdown.active {
    display: block;
}
.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.2s;
}
.search-result-item:last-child {
    border-bottom: none;
}
.search-result-item:hover {
    background: var(--bg-color);
}
.search-result-title {
    font-weight: 600;
    color: var(--text-main);
}
.search-result-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}
.search-result-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    margin-left: auto;
}
.result-type-brand { background: var(--primary-light); color: var(--primary); }
.result-type-error { background: var(--danger-light); color: var(--danger); }
.section {
    padding: 32px 0;
}
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.section-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
}
.brand-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 16px 8px;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.brand-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}
.brand-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}
.brand-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
}
.error-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.error-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.error-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.error-code {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}
.error-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
}
.badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-high { background: var(--danger-light); color: var(--danger); }
.badge-medium { background: var(--warning-light); color: var(--warning); }
.badge-low { background: var(--success-light); color: var(--success); }
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.blog-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.blog-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}
.blog-title {
    font-size: 1rem;
    font-weight: 700;
}
.blog-excerpt {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
summary {
    padding: 16px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
summary::-webkit-details-marker {
    display: none;
}
summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--primary);
}
details[open] summary::after {
    content: '-';
}
details .faq-content {
    padding: 0 16px 16px;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    flex: 1;
    text-decoration: none;
    transition: color 0.2s;
}
.nav-item.active {
    color: var(--primary);
}
.nav-item svg {
    width: 24px;
    height: 24px;
}
.nav-label {
    font-size: 0.65rem;
    font-weight: 500;
}
.nav-item-center {
    position: relative;
    top: -20px;
    background: var(--primary);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,210,255,0.4);
    text-decoration: none;
    transition: transform 0.2s;
    border: 4px solid var(--surface);
    flex: none;
}
.nav-item-center:hover {
    transform: translateY(-4px);
}
.nav-item-center svg {
    width: 24px;
    height: 24px;
    color: #fff;
}
.nav-item-center .nav-label {
    display: none;
}
.brand-header-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.brand-header-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}
.brand-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.empty-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

/* Animations */
.animate-page {
    animation: slideIn 0.4s ease-out forwards;
}
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Skeletons */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: var(--border);
    color: transparent !important;
    border-color: transparent !important;
    user-select: none;
    pointer-events: none;
}
.skeleton * {
    visibility: hidden;
}
.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.2s infinite;
}
@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Glow Effects for Modal */
.glow-high {
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.4), 0 10px 25px rgba(0,0,0,0.2) !important;
}
.glow-medium {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.4), 0 10px 25px rgba(0,0,0,0.2) !important;
}
.glow-low {
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4), 0 10px 25px rgba(0,0,0,0.2) !important;
}

/* Blog Detail TOC & Layout */
.blog-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.blog-toc-sidebar {
    position: sticky;
    top: 100px;
    width: 280px;
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.blog-toc-sidebar h3 {
    font-size: 1.125rem;
    margin-bottom: 16px;
    color: var(--text-main);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 8px;
}
#toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
}
#toc-list::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
    z-index: 0;
}
#toc-list li {
    position: relative;
    z-index: 1;
    padding-left: 20px;
}
#toc-list a {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: color 0.3s, transform 0.3s;
    position: relative;
}
#toc-list a::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 6px;
    width: 10px;
    height: 10px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 50%;
    transition: all 0.3s;
}
#toc-list a:hover {
    color: var(--primary);
    transform: translateX(4px);
}
#toc-list a.active {
    color: var(--primary);
    font-weight: 700;
}
#toc-list a.active::before {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}
#toc-list a.toc-sub {
    font-size: 0.85rem;
}

.blog-main-content {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .blog-container {
        flex-direction: row;
        gap: 16px;
    }
    .blog-toc-sidebar {
        width: 80px;
        position: sticky;
        top: 80px;
        height: calc(100vh - 100px);
        overflow-y: auto;
        padding: 16px 4px;
        background: transparent;
        box-shadow: none;
        border: none;
    }
    .blog-toc-sidebar h3 {
        display: none;
    }
    #toc-list {
        gap: 16px;
    }
    #toc-list a {
        font-size: 0.65rem;
        line-height: 1.3;
    }
    #toc-list a.toc-sub {
        font-size: 0.6rem;
    }
}
