/* MistForums-style CSS */
.forum-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(157, 78, 221, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.header-content h1 {
    color: #00d4ff;
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.header-content p {
    color: #999;
    margin: 0;
    font-size: 1.1rem;
}

.new-topic-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(45deg, #00d4ff, #9d4edd);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.new-topic-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.forum-categories {
    display: grid;
    gap: 1rem;
    margin-bottom: 3rem;
}

.category-card {
    background: rgba(0, 0, 0, 0.6);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 1rem;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(45deg, #00d4ff, #9d4edd);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.category-card:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.category-card:hover::before {
    transform: scaleY(1);
}

.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.2), rgba(157, 78, 221, 0.2));
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.category-icon i {
    font-size: 1.5rem;
    color: #00d4ff;
}

.category-info h3 {
    margin: 0 0 0.5rem 0;
    color: #e0e6ed;
    font-size: 1.2rem;
}

.category-info h3 a {
    color: #e0e6ed;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-info h3 a:hover {
    color: #00d4ff;
}

.category-info p {
    margin: 0;
    color: #999;
    font-size: 0.9rem;
    line-height: 1.4;
}

.category-stats {
    display: flex;
    gap: 1.5rem;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-number {
    color: #00d4ff;
    font-size: 1.2rem;
    font-weight: 600;
}

.stat-label {
    color: #999;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recent-topics {
    background: rgba(0, 0, 0, 0.6);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-topics h2 {
    color: #00d4ff;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topic-list {
    display: grid;
    gap: 1rem;
}

.topic-item {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.topic-item:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(0, 212, 255, 0.2);
}

.topic-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.default-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00d4ff, #9d4edd);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.topic-content h4 {
    margin: 0 0 0.5rem 0;
    color: #e0e6ed;
    font-size: 1.1rem;
    line-height: 1.3;
}

.topic-content h4 a {
    color: #e0e6ed;
    text-decoration: none;
    transition: color 0.3s ease;
}

.topic-content h4 a:hover {
    color: #00d4ff;
}

.topic-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #999;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.category-tag {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topic-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.stat-replies {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-replies .stat-number {
    color: #00d4ff;
    font-size: 1.1rem;
    font-weight: 600;
}

.stat-replies .stat-label {
    color: #999;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.last-post {
    color: #999;
    font-size: 0.75rem;
}

.no-topics {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.no-topics p {
    font-size: 1.1rem;
    margin: 0;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: #999;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #00d4ff;
    text-decoration: none;
}

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

/* Category Page */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(157, 78, 221, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-title i {
    font-size: 2rem;
    color: #00d4ff;
}

.category-title h1 {
    margin: 0 0 0.5rem 0;
    color: #e0e6ed;
}

.category-title p {
    margin: 0;
    color: #999;
}

.topics-container {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.topics-header {
    display: grid;
    grid-template-columns: 1fr 100px 150px;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: #00d4ff;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.topic-row {
    display: grid;
    grid-template-columns: 1fr 100px 150px;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

.topic-row:hover {
    background: rgba(0, 0, 0, 0.4);
}

.topic-row.pinned {
    background: rgba(0, 212, 255, 0.05);
    border-left: 4px solid #00d4ff;
}

.topic-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topic-icon {
    color: #00d4ff;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.topic-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

.topic-info h3 a {
    color: #e0e6ed;
    text-decoration: none;
}

.topic-info h3 a:hover {
    color: #00d4ff;
}

.topic-meta {
    color: #999;
    font-size: 0.85rem;
}

.topic-date {
    margin-left: 0.5rem;
}

.topic-replies {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.reply-count {
    color: #00d4ff;
    font-size: 1.2rem;
    font-weight: 600;
}

.reply-label {
    color: #999;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.topic-last-post {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.last-post-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.last-post-time {
    color: #e0e6ed;
    font-size: 0.85rem;
}

.last-post-by {
    color: #999;
    font-size: 0.75rem;
}

.no-replies {
    color: #999;
    font-size: 0.85rem;
}

/* Topic Page */
.topic-header {
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(157, 78, 221, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.topic-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pinned-icon {
    color: #ffd700;
}

.locked-icon {
    color: #ff6b6b;
}

.topic-title h1 {
    margin: 0;
    color: #e0e6ed;
    font-size: 1.8rem;
}

.posts-container {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.post-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.topic-post {
    border-left: 4px solid #00d4ff;
}

.post-author {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.author-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.75rem;
}

.default-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00d4ff, #9d4edd);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.5rem;
    margin: 0 auto 0.75rem;
}

.author-info h4 {
    margin: 0 0 0.5rem 0;
    color: #e0e6ed;
    font-size: 1.1rem;
}

.user-role {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-role.admin {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.user-role.moderator {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.user-role.member {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
}

.post-number {
    display: block;
    margin-top: 0.5rem;
    color: #999;
    font-size: 0.8rem;
}

.post-content {
    padding: 1.5rem;
}

.post-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-date {
    color: #999;
    font-size: 0.85rem;
}

.post-body {
    color: #e0e6ed;
    line-height: 1.6;
    font-size: 1rem;
}

/* Reply Form */
.reply-form {
    background: rgba(0, 0, 0, 0.6);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.reply-form h3 {
    color: #00d4ff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reply-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e0e6ed;
    font-family: inherit;
    resize: vertical;
}

.reply-form textarea:focus {
    outline: none;
    border-color: #00d4ff;
}

.login-prompt, .locked-notice {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
}

.locked-notice {
    color: #ff6b6b;
}

.locked-notice i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* New Topic Form */
.new-topic-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(157, 78, 221, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.form-header h1 {
    color: #00d4ff;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-header p {
    color: #999;
    margin: 0;
}

.new-topic-form {
    background: rgba(0, 0, 0, 0.6);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e0e6ed;
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e0e6ed;
    font-family: inherit;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #00d4ff;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, #00d4ff, #9d4edd);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e6ed;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.error-messages {
    margin-bottom: 2rem;
}

.error-message {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .forum-container {
        padding: 1rem;
    }
    
    .forum-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem;
    }
    
    .category-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    
    .category-stats {
        justify-content: center;
    }
    
    .topic-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.75rem;
    }
    
    .topic-meta {
        justify-content: center;
    }
    
    .category-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .topics-header, .topic-row {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .topic-main {
        justify-content: center;
    }
    
    .post-item {
        grid-template-columns: 1fr;
    }
    
    .post-author {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .form-actions {
        flex-direction: column;
    }
}