/* Support Template CSS - Friendly and helpful design */
:root {
  --error-color: #f04747;
  --font-primary: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --primary-color: #00b8d4;
    --secondary-color: #00acc1;
    --accent-color: #26a69a;
    --background-color: #f7f9fc;
    --surface-color: #ffffff;
    --card-color: #ffffff;
    --text-primary: #263238;
    --text-secondary: #455a64;
    --text-muted: #90a4ae;
    --border-color: #e1e8ed;
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 25px color-mix(in srgb, var(--primary-color) 15%, transparent);
    --font-primary: 'Open Sans', sans-serif;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: var(--background-color);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

/* Hamburger Menu Toggle Button */
.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand i {
    font-size: 2rem;
    color: var(--primary-color);
}

.nav-brand h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
}

/* Main Content */
.main {
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 4rem;
    background: var(--surface-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, color-mix(in srgb, var(--primary-color) 10%, transparent) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.stat i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.stat span {
    display: block;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stat small {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sections */
section {
    margin-bottom: 4rem;
}

section h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}

section h3 i {
    color: var(--primary-color);
}

/* Thread Cards - Enhanced for support template */
.threads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.thread-card {
    background: linear-gradient(135deg, var(--card-color), rgba(88, 101, 242, 0.02));
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.thread-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.thread-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 50% 0%, rgba(88, 101, 242, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.thread-card:hover::before {
    transform: scaleX(1);
}

.thread-card:hover::after {
    opacity: 1;
}

.thread-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(88, 101, 242, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.08), var(--card-color));
}

.thread-header h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.thread-header h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.thread-header h4 a:hover {
    color: var(--primary-color);
}

.thread-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.thread-meta i {
    color: var(--secondary-color);
}

.thread-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.thread-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.thread-stats i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
}

/* Channel Cards - Enhanced for support template */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.channel-card {
    background: linear-gradient(135deg, var(--card-color), rgba(67, 181, 129, 0.02));
    border: 2px solid var(--border-color);
    border-radius: 18px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.channel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-color);
    border-radius: 12px 12px 0 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.channel-card:hover::before {
    transform: scaleX(1);
}

.channel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--success-color), var(--primary-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.channel-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 50% 0%, rgba(67, 181, 129, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.channel-card:hover::before {
    transform: scaleX(1);
}

.channel-card:hover::after {
    opacity: 1;
}

.channel-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(67, 181, 129, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(67, 181, 129, 0.08), var(--card-color));
}

.channel-header h4 a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.channel-header h4 a:hover {
    color: var(--accent-color);
}

.server-name {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
    margin-top: 0.5rem;
}

.channel-topic {
    color: var(--text-secondary);
    margin: 1rem 0;
    font-style: italic;
}

.channel-stats {
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.channel-stats i {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: var(--font-primary);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--primary-color) 40%, transparent);
    background: var(--secondary-color);
}

.view-all {
    text-align: center;
    margin-top: 3rem;
}

/* Footer */
.footer {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Thread Page Styles */
.breadcrumb {
    padding: 1rem 0 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

.thread-page {
    background: var(--surface-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.thread-title {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.thread-content {
    padding: 2rem;
}

/* Individual Posts */
.post {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 2rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 12px 12px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.post:hover::before {
    opacity: 1;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--primary-color) 20%, transparent);
    border: 2px solid var(--primary-color);
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-info {
    flex: 1;
}

.post-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.post-timestamp {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-timestamp i {
    color: var(--secondary-color);
}

.post-content {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content p:last-child {
    margin-bottom: 0;
}

/* Images and Media */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-content img {
    margin: 1.5rem 0;
}

.attachment {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
    text-decoration: none;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
}

.attachment:hover {
    background: color-mix(in srgb, var(--primary-color) 15%, transparent);
    transform: translateY(-1px);
}

.embed {
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin: 1rem 0;
    background: color-mix(in srgb, var(--primary-color) 5%, transparent);
    border-radius: 0 8px 8px 0;
}

/* User avatars and logos */
.avatar, .logo {
    border-radius: 8px;
    max-width: 60px;
    max-height: 60px;
    object-fit: cover;
    margin: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.logo {
    max-width: 120px;
    max-height: 80px;
}

/* Channel Page Enhancements */
.channel-page {
    max-width: 100%;
}

.channel-header {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.channel-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.channel-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.channel-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.channel-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.channel-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-weight: 500;
}

.channel-info i {
    color: var(--primary-color);
}

.channel-threads h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.threads-list {
    display: grid;
    gap: 1.5rem;
}

.thread-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--shadow);
}

.thread-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 12px 12px 0 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.thread-item:hover::before {
    transform: scaleX(1);
}

.thread-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.thread-item h4 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.thread-item h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.thread-item h4 a:hover {
    color: var(--primary-color);
}

.thread-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.thread-item .thread-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    flex-wrap: wrap;
}

.thread-item .thread-meta i {
    color: var(--secondary-color);
    margin-right: 0.3rem;
}

/* Leaderboard Page Enhancements */
.leaderboard-page {
    max-width: 900px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    background: var(--surface-color);
    padding: 3rem 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.page-header h1 i {
    color: #ffd700;
    font-size: 2.2rem;
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.leaderboard-list {
    display: grid;
    gap: 1rem;
}

.leaderboard-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--shadow);
}

.leaderboard-item:nth-child(1) {
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, var(--surface-color) 100%);
}

.leaderboard-item:nth-child(2) {
    border-color: #c0c0c0;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1) 0%, var(--surface-color) 100%);
}

.leaderboard-item:nth-child(3) {
    border-color: #cd7f32;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.1) 0%, var(--surface-color) 100%);
}

.leaderboard-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.leaderboard-rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 40px;
    text-align: center;
    background: rgba(0, 184, 212, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
}

.leaderboard-item:nth-child(1) .leaderboard-rank {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
}

.leaderboard-item:nth-child(2) .leaderboard-rank {
    color: #c0c0c0;
    background: rgba(192, 192, 192, 0.2);
}

.leaderboard-item:nth-child(3) .leaderboard-rank {
    color: #cd7f32;
    background: rgba(205, 127, 50, 0.2);
}

.leaderboard-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.leaderboard-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.leaderboard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.leaderboard-name a:hover {
    color: var(--primary-color);
}

.leaderboard-username {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.leaderboard-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.leaderboard-stats .stat {
    text-align: center;
    background: rgba(0, 184, 212, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-width: 70px;
}

.leaderboard-stats .stat span {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.leaderboard-stats .stat small {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leaderboard-stats .total-score {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
}

.leaderboard-stats .total-score span {
    color: white;
}

.leaderboard-stats .total-score small {
    color: rgba(255, 255, 255, 0.9);
}

/* Search Page Enhancements */
.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-form {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.search-box {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--background-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    font-family: var(--font-primary);
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 184, 212, 0.1);
}

.search-filters {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.search-filters label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--text-secondary);
}

.search-filters label:hover {
    border-color: var(--primary-color);
    background: rgba(0, 184, 212, 0.05);
}

.search-filters input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.search-filters input[type="radio"]:checked + label,
.search-filters label:has(input[type="radio"]:checked) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.search-results {
    display: grid;
    gap: 1.5rem;
}

.search-placeholder {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-muted);
}

.search-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.search-result {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
}

.search-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 12px 12px 0 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.search-result:hover::before {
    transform: scaleX(1);
}

.search-result:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.search-result h4 {
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.search-result h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.search-result h4 a:hover {
    color: var(--primary-color);
}

.search-result p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.search-result-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    flex-wrap: wrap;
}

.result-type {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

/* Thread Page Enhancements */
.thread-page {
    max-width: 900px;
    margin: 0 auto;
}

.breadcrumb {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.thread-header {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.thread-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.thread-title {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.3;
    font-weight: 600;
}

.thread-info {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.thread-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.thread-info i {
    color: var(--secondary-color);
}

.archived-badge,
.locked-badge {
    background: #f39c12;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.locked-badge {
    background: #e74c3c;
}

.posts {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.post {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.post:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

.post-header {
    background: rgba(0, 184, 212, 0.03);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    overflow: hidden;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.post-avatar .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-author-info {
    flex: 1;
}

.post-author a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-author a:hover {
    color: var(--primary-color);
}

.post-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.edited {
    font-style: italic;
    opacity: 0.8;
}

.post-actions {
    display: flex;
    gap: 0.5rem;
}

.post-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.post-link:hover {
    background: rgba(0, 184, 212, 0.1);
    color: var(--primary-color);
}

.post-content {
    padding: 1.5rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.post-attachments,
.post-embeds {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.attachment {
    background: rgba(0, 184, 212, 0.05);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.attachment a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.file-size {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.embed {
    background: rgba(0, 184, 212, 0.05);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.embed-image {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
}

.thread-navigation {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

.btn-secondary {
    background: var(--background-color);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--surface-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .threads-grid,
    .channels-grid {
        grid-template-columns: 1fr;
    }
    
    .thread-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .channel-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .leaderboard-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .leaderboard-stats {
        justify-content: center;
    }
    
    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-result-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .thread-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .post-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .thread-navigation {
        flex-direction: column;
    }
    
    .thread-item .thread-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
