/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f9fafb;
    color: #374151;
    line-height: 1.5;
}

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

/* Header Styles */
.header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #6b7280;
}

.logo {
    background: #fbbf24;
    color: #000;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.logo:hover {
    background: #f59e0b;
}

.main-nav {
    display: flex;
    gap: 24px;
}

.main-nav a {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: #111827;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 12px;
    width: 200px;
}

.search-box i {
    color: #9ca3af;
    font-size: 14px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    font-size: 14px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #fbbf24;
    color: #000;
    border-color: #fbbf24;
}

.btn-primary:hover {
    background: #f59e0b;
    border-color: #f59e0b;
}

.btn-outline {
    background: transparent;
    color: #374151;
    border-color: #d1d5db;
}

.btn-outline:hover {
    background: #f9fafb;
}

.btn-reply {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.btn-reply:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.btn-login {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    width: 100%;
    justify-content: center;
}

.btn-login:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-back {
    background: white;
    color: #374151;
    border-color: #d1d5db;
    padding: 12px 16px;
}

.btn-back:hover {
    background: #f9fafb;
}

/* Forum Navigation */
.forum-nav {
    background: #2563eb;
    color: white;
}

.forum-nav-items {
    display: flex;
    gap: 24px;
    height: 48px;
    align-items: center;
}

.forum-nav a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.forum-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main-content {
    padding: 24px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb i {
    color: #9ca3af;
    font-size: 12px;
}

/* Thread Header */
.thread-header {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.thread-header h1 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 16px;
    color: #111827;
}

.thread-actions {
    display: flex;
    gap: 12px;
}

/* Posts Container */
.posts-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Post Styles */
.post {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    overflow: hidden;
}

.post-sidebar {
    width: 200px;
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
    padding: 16px;
}

.user-profile {
    text-align: center;
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #dbeafe;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin: 0 auto 8px;
}

.avatar-green {
    background: #dcfce7;
    color: #16a34a;
}

.avatar-purple {
    background: #f3e8ff;
    color: #9333ea;
}

.username {
    margin-bottom: 4px;
}

.username a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.username a:hover {
    text-decoration: underline;
}

.user-title {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.user-badges {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.badge {
    background: #e5e7eb;
    color: #374151;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    text-align: center;
}

.badge-small {
    font-size: 9px;
    padding: 1px 4px;
    margin: 1px;
}

.user-stats {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
}

.user-stats div {
    margin-bottom: 2px;
}

.post-content {
    flex: 1;
    padding: 16px;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
}

.post-number a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.post-number a:hover {
    text-decoration: underline;
}

.post-body {
    margin-bottom: 16px;
}

.post-body h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #111827;
}

.post-body p {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #374151;
}

.post-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.user-status {
    font-size: 11px;
    color: #6b7280;
}

/* Bottom Controls */
.bottom-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-top: 24px;
}

.pagination {
    font-size: 14px;
    color: #6b7280;
}

/* Back Link */
.back-link {
    margin-top: 24px;
}

.subforum-name {
    color: #2563eb;
    margin-left: 8px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Card Styles */
.card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.card-info {
    background: #fef2f2;
    border-color: #fecaca;
}

.card-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.card-info .card-header {
    border-bottom-color: #fecaca;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.card-info .card-header h3 {
    color: #b91c1c;
}

.card-content {
    padding: 16px;
}

.card-info .card-content {
    color: #dc2626;
}

.card-info .card-content p {
    font-size: 14px;
    margin-bottom: 12px;
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-links {
    text-align: center;
    margin: 16px 0;
}

.login-links a {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
}

.login-links a:hover {
    text-decoration: underline;
}

.register-link {
    text-align: center;
}

/* Footer */
.footer {
    background: #374151;
    color: white;
    margin-top: 48px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 24px 0;
    font-size: 14px;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
}

.footer-links a:hover {
    color: #93c5fd;
}

.footer-copyright {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 8px;
    line-height: 1.4;
}

.footer-time {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    padding-bottom: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .search-box {
        display: none;
    }

    .header-content {
        height: 56px;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .post {
        flex-direction: column;
    }

    .post-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .user-profile {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
    }

    .avatar {
        width: 48px;
        height: 48px;
        font-size: 14px;
        margin: 0;
    }

    .user-badges {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .forum-nav-items {
        flex-wrap: wrap;
        gap: 12px;
        height: auto;
        padding: 12px 0;
    }

    .breadcrumb {
        flex-wrap: wrap;
    }

    .thread-header {
        padding: 16px;
    }

    .thread-header h1 {
        font-size: 24px;
    }

    .thread-actions {
        flex-direction: column;
        gap: 8px;
    }

    .bottom-controls {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .header-right {
        gap: 8px;
    }

    .btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .thread-header h1 {
        font-size: 20px;
    }

    .post-content {
        padding: 12px;
    }

    .post-sidebar {
        padding: 12px;
    }
}

/* External Link Icon Styling */
.fa-external-link-alt {
    font-size: 10px;
    opacity: 0.7;
}

/* Hover Effects */
a:hover .fa-external-link-alt {
    opacity: 1;
}

/* Focus States for Accessibility */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
