:root {
    --main: #2563eb;
    --sub: #7c3aed;
    --hot: #f59e0b;
    --green: #10b981;
    --bg: #f8fafc;
    --text: #1e293b;
    --gray: #64748b;
    --light: #94a3b8;
    --border: #e2e8f0;
    --white: #ffffff;
    --shad: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shad2: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shad3: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

html {
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.75;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

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

.header {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

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

.nav-menu li {
    margin-left: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 4px;
}

.hamburger:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.main-content {
    padding: 2rem 0;
}

.grid-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.left-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    align-self: start;
}

.card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shad2);
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.15);
    border-color: var(--main);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border);
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
}

.card-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header h2 i {
    color: var(--main);
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem;
}

.item {
    display: flex;
    padding: 1.25rem 0.5rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
    border-radius: 8px;
}

.item:hover {
    background: #f8fafc;
}

.item:last-child {
    border-bottom: none;
}

.tit {
    font-size: 1.125rem;
    margin-bottom: 0.625rem;
    line-height: 1.5;
}

.tit a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.tit a:hover {
    color: var(--main);
}

.desc {
    color: var(--gray);
    font-size: 0.9375rem;
    margin-bottom: 0.625rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta {
    display: flex;
    font-size: 0.8125rem;
    color: var(--light);
    gap: 1.25rem;
    flex-wrap: wrap;
}

.meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.meta i {
    color: var(--main);
    opacity: 0.7;
}

.footer {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
}

.footer h5 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer p {
    font-size: 0.9375rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 0.5rem;
    opacity: 0.9;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .hamburger {
        display: block !important;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
        flex-direction: column;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s;
        z-index: 999;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
        width: 100%;
        text-align: center;
    }
    
    .nav-menu a {
        display: block;
        padding: 0.75rem 1.5rem;
        font-size: 1.125rem;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .card {
        border-radius: 12px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.breadcrumb {
    padding: 1rem 0;
    font-size: 0.875rem;
    color: var(--gray);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumb a {
    color: var(--main);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--sub);
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text);
    font-weight: 500;
    margin: 0 0.5rem;
}

.breadcrumb span::before {
    content: "›";
    margin-right: 0.5rem;
    color: var(--light);
}

.breadcrumb span:first-child::before {
    display: none;
}

.article-title {
    font-size: 2rem;
    margin-bottom: 1.25rem;
    color: var(--text);
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(to right, #f8fafc, #ffffff);
    border-radius: 8px;
    border-left: 3px solid var(--main);
    color: var(--gray);
    font-size: 0.9375rem;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-meta i {
    color: var(--main);
}

.article-content {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--text);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text);
    font-weight: 700;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.article-content blockquote {
    border-left: 4px solid var(--main);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--gray);
    font-style: italic;
}

.article-content code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--sub);
}

.article-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.answer-wrap {
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.answer-wrap:hover {
    border-color: var(--main);
}

.user-row {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.info {
    display: flex;
    flex-direction: column;
}

.name {
    font-size: 0.9375rem;
    color: var(--text);
}

.time {
    font-size: 0.8125rem;
    color: var(--light);
}

.time i {
    margin-right: 0.25rem;
}

.text {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 1rem;
}

.like-row {
    display: flex;
    justify-content: flex-end;
}

.like-row span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.like-row i {
    color: var(--main);
}