/* Modern Minimalist Forum Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #1e293b;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #0ea5e9 0%, #22c55e 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1100;
    backdrop-filter: blur(10px);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.logo i {
    margin-right: 0.5rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger.active {
    color: #f8fafc;
}

.nav-link {
    text-decoration: none;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #0ea5e9 0%, #22c55e 100%);
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        box-shadow: 0 12px 30px rgba(0,0,0,0.15);
        border-bottom-left-radius: 16px;
        border-bottom-right-radius: 16px;
    }

    .nav.active {
        display: flex;
    }

    .header .container {
        position: relative;
    }
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    transform: translateY(-2px);
}

/* Main Content */
.main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

h2 {
    margin-bottom: 2rem;
    color: #1e293b;
    font-weight: 700;
    font-size: 2rem;
}

h2 i {
    margin-right: 0.5rem;
    color: #0ea5e9;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.category-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(203, 213, 225, 0.4);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #0ea5e9 0%, #06b6d4 50%, #22c55e 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.category-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(15, 165, 233, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.category-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 24px 64px rgba(15, 165, 233, 0.15);
    border-color: rgba(15, 165, 233, 0.3);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover .category-icon-wrapper {
    transform: scale(1.15) rotate(-5deg);
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
}

.category-card:hover .category-badge {
    background: #0ea5e9;
    color: white;
    transform: scale(1.05);
}

.category-card:hover .view-link {
    gap: 0.7rem;
    color: #0ea5e9;
}

.category-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-icon-wrapper {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    color: #0ea5e9;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(15, 165, 233, 0.15);
}

.category-card h3 {
    margin-bottom: 0.75rem;
    color: #1e293b;
    font-weight: 700;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.category-card:hover h3 { color: #0ea5e9; }

.category-card p {
    color: #64748b;
    margin-bottom: 1.75rem;
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
}

.category-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    color: #475569;
    padding: 0.75rem;
    background: rgba(226, 232, 240, 0.5);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.category-card:hover .category-stats {
    background: rgba(15, 165, 233, 0.08);
}

.category-stats span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

.category-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(203, 213, 225, 0.4);
}

.view-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.view-link i {
    transition: transform 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn.primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #22c55e 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.btn.primary:hover {
    background: linear-gradient(135deg, #0284c7 0%, #16a34a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.6);
}

.btn:hover {
    transform: translateY(-2px);
}

/* Category Header */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Threads List */
.threads-list {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.thread-item {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: background-color 0.3s ease;
}

.thread-item:hover {
    background-color: #f8fafc;
}

.thread-item:last-child {
    border-bottom: none;
}

.thread-info h3 {
    margin-bottom: 0.5rem;
}

.thread-info h3 a {
    text-decoration: none;
    color: #1e293b;
    font-weight: 600;
    transition: color 0.3s ease;
}

.thread-info h3 a:hover {
    color: #0ea5e9;
}

.thread-meta {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.thread-preview {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.thread-stats {
    text-align: right;
    font-size: 0.8rem;
    color: #64748b;
    min-width: 120px;
}

/* Thread Header */
.thread-header {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.thread-header h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

/* Posts List */
.posts-list {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 2rem;
}

.post {
    padding: 2rem;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.3s ease;
}

.post:hover {
    background-color: #f8fafc;
}

.post:last-child {
    border-bottom: none;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #0ea5e9;
    object-fit: cover;
    background-color: #f3f4f6;
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.1);
}

.post-author strong {
    display: block;
    color: #1e293b;
    font-weight: 600;
}

.post-author p {
    font-size: 0.8rem;
    color: #64748b;
}

.post-date {
    font-size: 0.8rem;
    color: #64748b;
    font-style: italic;
}

.post-content {
    line-height: 1.7;
    color: #374151;
}

/* Reply Section */
.reply-section {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.reply-section h3 {
    margin-bottom: 1.5rem;
    color: #1e293b;
    font-weight: 600;
}

.reply-section h3 i {
    margin-right: 0.5rem;
    color: #0ea5e9;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

input, select, textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    background-color: #fff;
}

textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #0ea5e9 0%, #22c55e 100%);
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.footer p {
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .thread-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .thread-stats {
        text-align: left;
        min-width: auto;
    }

    .post {
        padding: 1rem;
    }

    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .reply-section {
        padding: 1rem;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
    }

    .category-card {
        padding: 1rem;
    }
    .category-card p { display: none; }

    h2 {
        font-size: 1.5rem;
    }

    .thread-header {
        padding: 1rem;
    }

    .thread-header h2 {
        font-size: 1.5rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card, .thread-item, .post, .reply-section {
    animation: fadeInUp 0.7s ease-out;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.35s; }
.category-card:nth-child(4) { animation-delay: 0.5s; }

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0ea5e9 0%, #22c55e 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0284c7 0%, #16a34a 100%);
}

/* Authentication Styles */
.auth-container {
    max-width: 500px;
    margin: 2rem auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
}

.auth-tabs {
    display: flex;
    background: linear-gradient(135deg, #0ea5e9 0%, #22c55e 100%);
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.auth-tab.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.auth-tab:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.auth-form {
    padding: 2rem;
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1e293b;
    font-weight: 700;
}

.auth-form h2 i {
    margin-right: 0.5rem;
    color: #0ea5e9;
}

.btn.full-width {
    width: 100%;
    margin-top: 1rem;
}

/* User Status */
.user-status {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
}

.user-status.logged-in {
    background: linear-gradient(135deg, #0ea5e9 0%, #22c55e 100%);
    color: #fff;
}

.user-status.logged-out {
    background: #f8f9fa;
    color: #666;
}

.user-status a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.user-status a:hover {
    text-decoration: underline;
}

/* Login Required Modal */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.login-modal.active {
    opacity: 1;
    visibility: visible;
}

.login-modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.login-modal h3 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.login-modal p {
    margin-bottom: 2rem;
    color: #666;
}

.login-modal .btn {
    margin: 0 0.5rem;
}

.char-counter {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
    text-align: right;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Sidebar Styles */
.forum-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #1e293b;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.popular-thread-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.popular-thread-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.popular-thread-item h4 {
    font-size: 0.95rem;
    line-height: 1.4;
}

.popular-thread-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
}

@media (max-width: 1024px) {
    .forum-layout {
        grid-template-columns: 1fr;
    }

    .header .container {
        padding: 1rem 1rem;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 1rem;
    }

    .nav {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .nav-link {
        width: 100%;
        justify-content: center;
    }

    .main {
        padding: 1.5rem 0;
    }

    .container {
        padding: 0 1rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        padding: 1rem;
    }

    .category-card p {
        display: none;
    }

    .category-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 600px) {
    .header .container {
        padding: 1rem 0.75rem;
    }

    .logo-container img {
        width: 56px;
    }
}

.btn-like-thread.active {
    color: #ef4444 !important;
    transform: scale(1.2);
}

/* Admin Toolbar Support for Forum Pages */
@media (min-width: 769px) {
    body.admin-toolbar-active {
        padding-bottom: 50px;
    }
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 640px) {
    /* Thread and Post Layouts */
    .post {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .post-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .post-author {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .avatar {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px;
    }

    .post-author > div {
        flex: 1;
        min-width: 0;
    }

    .post-author strong {
        display: block;
        word-break: break-word;
        font-size: 0.95rem;
    }

    .post-author p {
        font-size: 0.8rem;
        margin: 0.25rem 0 0 0;
    }

    .post-date {
        font-size: 0.8rem;
        width: 100%;
        text-align: left;
    }

    /* Post Actions - Stack Vertically on Mobile */
    .post-actions {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .post-actions button,
    .post-actions a {
        width: 100%;
        padding: 10px 12px !important;
        font-size: 0.9rem !important;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .post-actions i {
        margin-right: 0.25rem;
    }

    /* Thread Header Buttons - Stack on Mobile */
    .thread-header > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .thread-header .btn {
        width: 100%;
        min-height: 44px;
        padding: 10px 12px !important;
    }

    /* Images - Better Sizing */
    .post img:not(.avatar) {
        max-height: 300px !important;
        margin-bottom: 0.75rem !important;
    }

    /* Post Content */
    .post-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Forms */
    textarea,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="file"],
    select {
        font-size: 1rem !important; /* Prevents zoom on iOS */
        padding: 12px !important;
        min-height: 44px;
    }

    .reply-section {
        padding: 1rem;
    }

    .reply-section h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .char-counter {
        font-size: 0.85rem;
        margin: 0.5rem 0;
    }

    /* Modal Improvements */
    div[style*="background:#1e293b;padding:2rem"] {
        padding: 1rem !important;
        width: 95% !important;
        max-width: 95vw !important;
        margin: 1rem auto !important;
        border-radius: 12px;
    }

    /* Modals - Ensure Scrollable */
    div[style*="overflow-y:auto"] {
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Category Cards */
    .category-card {
        padding: 1rem;
    }

    .category-icon-wrapper {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }

    .category-card h3 {
        font-size: 1rem;
    }

    .category-card p {
        display: none;
    }

    /* Thread List Items */
    .thread-item {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .thread-info h3 {
        font-size: 1rem;
    }

    .thread-meta {
        font-size: 0.85rem;
    }

    .thread-preview {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .thread-stats {
        text-align: left;
        font-size: 0.85rem;
        min-width: unset;
    }

    /* Buttons - Better Touch Targets */
    .btn {
        min-height: 44px;
        padding: 10px 16px !important;
        font-size: 0.95rem !important;
        border-radius: 6px;
    }

    .btn i {
        margin-right: 0.5rem;
    }

    /* Navigation Links */
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Reduce Header Padding */
    .header .container {
        padding: 0.75rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    /* Container Padding */
    .container {
        padding: 0 0.75rem;
    }

    /* Thread Header */
    .thread-header {
        padding: 1rem;
    }

    .thread-header h2 {
        font-size: 1.25rem;
    }

    .thread-meta {
        font-size: 0.9rem;
    }

    /* Section Titles */
    .section-title {
        font-size: 1.75rem;
    }
}

/* Extra Small Devices (320px - 375px) */
@media (max-width: 375px) {
    .post {
        padding: 0.75rem;
    }

    .post-actions button,
    .post-actions a {
        padding: 8px 10px !important;
        font-size: 0.85rem !important;
        min-height: 40px;
    }

    .thread-header .btn {
        padding: 8px 10px !important;
        font-size: 0.85rem !important;
    }

    .btn {
        padding: 8px 12px !important;
        font-size: 0.85rem !important;
    }

    textarea,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="file"],
    select {
        padding: 10px !important;
        min-height: 40px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .thread-header h2 {
        font-size: 1.1rem;
    }
}

/* Quill Editor Mobile Responsiveness */
@media (max-width: 768px) {
    /* Quill Container */
    #editor,
    #create-thread-editor,
    #edit-thread-editor,
    #edit-reply-editor,
    .ql-container {
        min-height: 200px !important;
        font-size: 1rem;
    }

    /* Quill Toolbar - Stack Buttons Better */
    .ql-toolbar {
        padding: 0.5rem;
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 4px;
        margin-bottom: 0.5rem;
    }

    .ql-toolbar.ql-snow .ql-formats {
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .ql-toolbar button {
        min-width: 30px;
        min-height: 30px;
        padding: 4px !important;
    }

    .ql-toolbar button i {
        font-size: 0.9rem;
    }

    /* Quill Editor Content Area */
    .ql-editor {
        min-height: 180px;
        padding: 12px;
        font-size: 1rem;
    }

    .ql-editor p {
        line-height: 1.6;
    }

    /* Modal Styling for Quill */
    #create-thread-modal,
    #edit-thread-modal,
    #edit-reply-modal {
        max-height: 95vh;
        overflow-y: auto;
    }
}

@media (max-width: 640px) {
    #editor,
    #create-thread-editor,
    #edit-thread-editor,
    #edit-reply-editor,
    .ql-container {
        min-height: 180px !important;
    }

    .ql-editor {
        min-height: 150px;
        padding: 10px;
    }

    .ql-toolbar {
        flex-wrap: wrap;
        padding: 0.5rem 0.25rem;
    }

    .ql-toolbar button {
        width: 28px;
        height: 28px;
        padding: 2px !important;
    }

    /* Form Groups in Modals */
    .form-group {
        margin-bottom: 0.75rem;
    }

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 1rem !important;
        padding: 10px !important;
        min-height: 40px;
    }
}

@media (max-width: 375px) {
    #editor,
    #create-thread-editor,
    #edit-thread-editor,
    #edit-reply-editor,
    .ql-container {
        min-height: 150px !important;
    }

    .ql-editor {
        min-height: 130px;
        padding: 8px;
        font-size: 0.95rem;
    }

    .ql-toolbar button {
        width: 24px;
        height: 24px;
        padding: 2px !important;
        font-size: 0.75rem;
    }
}