
:root {
    --bg-color: #f4f7f9;
    --card-bg: #ffffff;
    --text-color: #334155;
    --text-dim: #64748b;
    --accent-color: #004a99;
    --accent-light: #e0f2fe;
    --accent-glow: rgba(0, 74, 153, 0.1);
    --border-color: #e2e8f0;
    --header-height: 420px;
    --container-width: 1050px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    height: var(--header-height);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #001529 0%, #004a99 100%);
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1.2) contrast(1.1);
}

.similar-threads-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--accent-light);
}

.similar-threads-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.similar-item {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.similar-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.similar-title {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
}

.similar-meta {
    font-size: 0.85rem;
    color: var(--text-dim);
}

header:hover .hero-image {
    transform: scale(1.08);
}

.header-content {
    position: relative;
    z-index: 1000;
    padding: 20px;
    width: 100%;
}

h1 {
    font-size: 3.8rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 0.5rem;
}

.header-content p {
    font-size: 1.1rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 6px;
    font-weight: 500;
    opacity: 0.9;
}

.container {
    max-width: var(--container-width);
    margin: -80px auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 50px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.thread-list {
    list-style: none;
}

.thread-item {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    border-radius: 12px;
    margin-bottom: 5px;
}

.thread-item:last-child { border-bottom: none; }
.thread-item:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: var(--accent-light);
}

.thread-link {
    color: #1e293b;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.thread-link:hover {
    color: var(--accent-color);
}

.metadata {
    font-size: 0.95rem;
    color: var(--text-dim);
    display: flex;
    gap: 15px;
    align-items: center;
}

.author-badge {
    background: var(--accent-light);
    color: var(--accent-color);
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.post {
    margin-bottom: 50px;
    padding: 30px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: border-color 0.2s;
}

.post:hover {
    border-color: var(--accent-light);
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.95rem;
}

.username {
    color: var(--accent-color);
    font-weight: 800;
}

.post-content {
    font-size: 1.15rem;
    color: #334155;
}

.post-content blockquote {
    border-left: 5px solid var(--accent-color);
    padding: 15px 25px;
    margin: 20px 0;
    font-style: italic;
    background: var(--bg-color);
    border-radius: 0 12px 12px 0;
    color: var(--text-dim);
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 30px;
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.back-link:hover { color: var(--accent-color); }

footer {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-dim);
    font-size: 1rem;
    background: #fff;
    border-top: 1px solid var(--border-color);
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.search-container {
    margin: 20px auto;
    max-width: 600px;
    position: relative;
    z-index: 1001;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    right: 20px;
    width: 20px;
    height: 20px;
    fill: var(--text-dim);
    pointer-events: none;
}

#search-input {
    width: 100%;
    padding: 15px 55px 15px 20px;
    border-radius: 50px;
    background: #fff;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.1rem;
    outline: none;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

#search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-glow);
}

#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-top: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 2000;
}

.search-result-item {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--accent-light); }

.search-result-title { font-weight: 600; font-size: 0.95rem; display: block; }
.search-result-meta { font-size: 0.8rem; color: var(--text-dim); }

.seo-section {
    line-height: 1.8;
    color: var(--text-color);
}

.seo-section h2 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 2rem;
}

.seo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.breadcrumbs {
    margin-bottom: 25px;
    font-size: 0.95rem;
    color: var(--text-color);
    background: #e2e2e2;
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumbs a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: #003366;
    text-decoration: underline;
}

.breadcrumbs span.bc-current {
    color: var(--text-dim);
}

.bc-sep {
    color: #94a3b8;
    margin: 0 10px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    header { height: 350px; }
    .container { margin-top: -40px; }
    .card { padding: 30px; }
    .thread-link { font-size: 1.2rem; }
    .seo-grid { grid-template-columns: 1fr; }
}
