/* main.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f6f4f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1c1b18;
    line-height: 1.5;
}

/* Header */
.site-header {
    background: #0f2c2b;
    color: #efe6db;
    padding: 2rem 1.5rem;
    border-bottom: 4px solid #e68a2e;
}

.header-inner {
    max-width: 1300px;
    margin: 0 auto;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.site-title a {
    color: #efe6db;
    text-decoration: none;
}

.site-title span {
    color: #e68a2e;
}

.site-desc {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.3rem;
}

/* Search */
.search-wrap {
    background: white;
    border-bottom: 1px solid #e3ddd2;
    padding: 1.2rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-box {
    max-width: 1300px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    border: 2px solid #e3ddd2;
    border-radius: 60px;
    background: white;
    transition: 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #e68a2e;
    box-shadow: 0 0 0 3px rgba(230,138,46,0.1);
}

/* Main */
.main {
    max-width: 1300px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    min-height: 50vh;
}

/* Categories grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #e8e2d8;
    padding: 1.2rem;
    transition: 0.2s;
}

.category-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f0ebe3;
    padding-bottom: 0.6rem;
    margin-bottom: 1rem;
}

.cat-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1c1b18;
}

.cat-count {
    background: #f0ebe3;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    font-size: 0.7rem;
    color: #5a5244;
}

.question-list {
    list-style: none;
}

.question-list li {
    margin-bottom: 0.7rem;
}

.question-list a {
    text-decoration: none;
    font-size: 0.85rem;
    color: #2c6e6b;
    display: block;
    padding: 0.2rem 0;
    border-bottom: 1px dotted #f0e7de;
    transition: all 0.15s;
}

.question-list a:hover {
    color: #e68a2e;
    border-bottom-color: #e68a2e;
    padding-left: 0.3rem;
}

.no-results {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
    color: #8e816e;
    border: 1px solid #e8e2d8;
}

/* Footer */
.site-footer {
    background: #0f2c2b;
    color: #bfbcb2;
    padding: 2rem 1.5rem;
    margin-top: 2rem;
    font-size: 0.75rem;
    text-align: center;
}

.site-footer p {
    margin: 0.3rem 0;
}

/* Single question page */
.single-question {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.single-question h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #1c1b18;
}

.single-question .back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: #e68a2e;
    text-decoration: none;
    font-weight: 500;
}

.single-question .back-link:hover {
    text-decoration: underline;
}

.answer-content {
    line-height: 1.6;
    color: #2c2b28;
    margin-top: 1.5rem;
}

.answer-content p {
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 700px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .single-question {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .single-question h1 {
        font-size: 1.4rem;
    }
}