/* Styles de base */
body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text);
    transition: background-color 0.3s, color 0.3s;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.col-span-1 {
    grid-column: span 1 / span 1;
}

.col-span-2 {
    grid-column: span 2 / span 2;
}

.col-span-3 {
    grid-column: span 3 / span 3;
}

.col-span-6 {
    grid-column: span 6 / span 6;
}

.col-span-8 {
    grid-column: span 8 / span 8;
}

.col-span-10 {
    grid-column: span 10 / span 10;
}

.col-span-12 {
    grid-column: span 12 / span 12;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: flex-end;
}

/* Spacing */
.m-0 {
    margin: 0;
}

.m-1 {
    margin: 0.25rem;
}

.m-2 {
    margin: 0.5rem;
}

.m-4 {
    margin: 1rem;
}

.m-6 {
    margin: 1.5rem;
}

.m-8 {
    margin: 2rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Typography */
.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

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

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--primary);
}

.text-light {
    color: var(--text-light);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-error {
    color: var(--error);
}

.text-info {
    color: var(--info);
}

.italic {
    font-style: italic;
}

/* Cards */
.card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.2s, transform 0.2s;
    overflow: hidden;
}

    .card:hover {
        box-shadow: var(--card-shadow-hover);
        transform: translateY(-1px);
    }

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--primary-light);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.card-description {
    color: var(--text-light);
    font-size: 0.875rem;
}

.card-content {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--primary-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--primary-light);
    color: var(--primary);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #059669;
}

.btn-warning {
    background-color: var(--warning);
    color: white;
}

    .btn-warning:hover:not(:disabled) {
        background-color: #d97706;
    }

.btn-error {
    background-color: var(--error);
    color: white;
}

    .btn-error:hover:not(:disabled) {
        background-color: #dc2626;
    }

.btn-ghost {
    background-color: transparent;
    color: var(--text-light);
}

    .btn-ghost:hover:not(:disabled) {
        background-color: var(--primary-light);
        color: var(--primary);
    }

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--background);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .form-input:focus,
    .form-textarea:focus,
    .form-select:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
    }

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
}

.badge-secondary {
    background-color: var(--border);
    color: var(--text-light);
}

.badge-success {
    background-color: #dcfce7;
    color: var(--success);
}

.badge-warning {
    background-color: #fef3c7;
    color: var(--warning);
}

.badge-error {
    background-color: #fee2e2;
    color: var(--error);
}

.badge-info {
    background-color: #dbeafe;
    color: var(--info);
}

/* User Badges */
.user-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Commun */
.user-badge.base {
    background: linear-gradient(135deg, #93c5fd, #3b82f6);
}

.user-badge.gold {
    background: linear-gradient(135deg, #facc15, #eab308);
}

.user-badge.silver {
    background: linear-gradient(135deg, #e5e7eb, #9ca3af);
    color: #1f2937;
}

.user-badge.bronze {
    background: linear-gradient(135deg, #d97706, #92400e);
}

.user-badge.rainbow {
    background: linear-gradient(270deg, #f43f5e, #f97316, #eab308, #84cc16, #22d3ee, #6366f1, #a855f7);
    background-size: 200% 200%;
    animation: rainbowShift 4s linear infinite;
}

@keyframes rainbowShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Rôles */
.user-badge.admin {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.user-badge.moderator {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.user-badge.premium {
    background: linear-gradient(135deg, #9333ea, #7e22ce);
}

.user-badge.user {
    background: linear-gradient(135deg, #6b7280, #374151);
}

/* Widgets */
.widget {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.2s;
}

    .widget:hover {
        box-shadow: var(--card-shadow-hover);
    }

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.widget-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.widget-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.trend-up {
    color: var(--success);
}

.trend-down {
    color: var(--error);
}

.trend-neutral {
    color: var(--text-light);
}

/* Avatars */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.avatar-md {
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.25rem;
}

.avatar-xl {
    width: 120px;
    height: 120px;
    font-size: 3rem;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Tables */
.table-container {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

    .table th,
    .table td {
        padding: 1rem;
        text-align: left;
        border-bottom: 1px solid var(--border);
    }

    .table th {
        background-color: var(--primary-light);
        font-weight: 600;
        color: var(--primary);
    }

    .table tr:hover {
        background-color: var(--primary-light);
    }

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-warning {
    background-color: #fef3c7;
    color: var(--warning);
    border: 1px solid #fcd34d;
}

.alert-error {
    background-color: #fee2e2;
    color: var(--error);
    border: 1px solid #fca5a5;
}

.alert-success {
    background-color: #dcfce7;
    color: var(--success);
    border: 1px solid #86efac;
}

.alert-info {
    background-color: #dbeafe;
    color: var(--info);
    border: 1px solid #93c5fd;
}

/* Notifications */
.notification-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: background-color 0.2s;
    cursor: pointer;
}

    .notification-item:hover {
        background-color: var(--primary-light);
    }

    .notification-item:last-child {
        border-bottom: none;
    }

    .notification-item.unread {
        background-color: #f0f9ff;
        border-left: 4px solid var(--primary);
    }

.dark-mode .notification-item.unread {
    background-color: #1e3a8a;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

    .notification-icon.reply {
        background: #dbeafe;
        color: var(--info);
    }

    .notification-icon.like {
        background: #fecaca;
        color: var(--error);
    }

    .notification-icon.mention {
        background: #fef3c7;
        color: var(--warning);
    }

    .notification-icon.badge {
        background: #dcfce7;
        color: var(--success);
    }

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

    .modal.show {
        display: flex;
        align-items: center;
        justify-content: center;
    }

.modal-content {
    background: var(--background);
    border-radius: 8px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

    .breadcrumb a {
        color: var(--text-light);
        transition: color 0.2s;
    }

        .breadcrumb a:hover {
            color: var(--text);
        }

.breadcrumb-separator {
    color: var(--text-light);
}

/* Forum specific styles */
.forum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.forum-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s;
}

    .forum-card:hover {
        box-shadow: var(--card-shadow-hover);
        transform: translateY(-2px);
    }

.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.forum-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.forum-description {
    color: var(--text-light);
    line-height: 1.5;
}

.forum-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Subcategory table layout */
.subcategory-table-header {
    display: grid;
    grid-template-columns: 60px 1fr 100px 100px 200px;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--primary-light);
    font-weight: 600;
    color: var(--primary);
}

.subcategory-item {
    display: grid;
    grid-template-columns: 60px 1fr 100px 100px 200px;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
    cursor: pointer;
}

    .subcategory-item:hover {
        background-color: var(--primary-light);
    }

    .subcategory-item:last-child {
        border-bottom: none;
    }

.subcategory-icon {
    font-size: 1.5rem;
    text-align: center;
}

.subcategory-content {
    min-width: 0; /* Permet la troncature */
}

.subcategory-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.subcategory-description {
    font-size: 0.875rem;
    color: var(--text-light);
}

.subcategory-stat {
    text-align: center;
}

    .subcategory-stat .stat-value {
        font-size: 1rem;
        font-weight: 600;
        color: var(--primary);
        display: block;
    }

    .subcategory-stat .stat-label {
        font-size: 0.75rem;
        color: var(--text-light);
    }

.subcategory-last-post {
    text-align: right;
    font-size: 0.75rem;
    min-width: 0;
}

    .subcategory-last-post .post-title {
        font-weight: 500;
        margin-bottom: 0.25rem;
    }

    .subcategory-last-post .post-meta {
        color: var(--text-light);
        line-height: 1.3;
    }

/* Mobile topic and subcategory styles */
.mobile-stats {
    display: none;
    margin-top: 0.5rem;
}

    .mobile-stats .stat-group {
        display: flex;
        gap: 1rem;
        margin-bottom: 0.5rem;
    }

    .mobile-stats .stat-item {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        font-size: 0.75rem;
        color: var(--text-light);
    }

/* Topic styles */
.topic-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
}

    .topic-item:hover {
        background-color: var(--primary-light);
    }

    .topic-item:last-child {
        border-bottom: none;
    }

.topic-content {
    flex: 1;
}

.topic-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.topic-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.topic-stats {
    display: flex;
    gap: 1.5rem;
    margin-left: 1rem;
}

.topic-last-reply {
    text-align: right;
    font-size: 0.75rem;
    min-width: 150px;
}

/* Post styles */
.post-content {
    line-height: 1.7;
}

    .post-content p {
        margin-bottom: 1rem;
    }

    .post-content strong {
        font-weight: 600;
    }

    .post-content em {
        font-style: italic;
    }

    .post-content blockquote {
        border-left: 4px solid var(--primary);
        padding-left: 1rem;
        margin: 1rem 0;
        font-style: italic;
        color: var(--text-light);
    }

    .post-content ul,
    .post-content ol {
        margin: 1rem 0;
        padding-left: 2rem;
    }

    .post-content li {
        margin-bottom: 0.5rem;
    }

    .post-content code {
        background: var(--primary-light);
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
        font-size: 0.875rem;
    }

    .post-content pre {
        background: var(--primary-light);
        padding: 1rem;
        border-radius: 6px;
        overflow-x: auto;
        margin: 1rem 0;
    }

        .post-content pre code {
            background: none;
            padding: 0;
        }

/* Editor toolbar */
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--primary-light);
    border-radius: 6px 6px 0 0;
    flex-wrap: wrap;
}

.editor-btn {
    padding: 0.5rem;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: var(--text-light);
}

    .editor-btn:hover {
        background: var(--background);
        color: var(--primary);
    }

/* Tabs */
.tabs {
    margin: 1rem 0;
}

.tab-list {
    display: flex;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

    .tab-list::-webkit-scrollbar {
        display: none;
    }

.tab-trigger {
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    color: var(--text-light);
    white-space: nowrap;
}

    .tab-trigger.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
    }

    .tab-trigger:hover {
        color: var(--primary);
    }

.tab-content {
    padding: 1rem 0;
}

/* Utilities */
.hidden {
    display: none;
}

.block {
    display: block;
}

.inline {
    display: inline;
}

.inline-block {
    display: inline-block;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.min-h-screen {
    min-height: 100vh;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.border {
    border: 1px solid var(--border);
}

.border-t {
    border-top: 1px solid var(--border);
}

.border-b {
    border-bottom: 1px solid var(--border);
}

.border-l {
    border-left: 1px solid var(--border);
}

.border-r {
    border-right: 1px solid var(--border);
}

.rounded {
    border-radius: 0.375rem;
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

.shadow {
    box-shadow: var(--card-shadow);
}

.shadow-md {
    box-shadow: var(--card-shadow-hover);
}

.transition {
    transition: all 0.2s;
}

.cursor-pointer {
    cursor: pointer;
}

.select-none {
    user-select: none;
}

/* Responsive utilities */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .forum-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .subcategory-table-header,
    .subcategory-item {
        grid-template-columns: 50px 1fr 80px 80px 150px;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .nav-links {
        display: none;
    }

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

    .forum-grid {
        grid-template-columns: 1fr;
    }

    .grid-cols-12 {
        grid-template-columns: 1fr;
    }

    .col-span-2,
    .col-span-6,
    .col-span-8,
    .col-span-10 {
        grid-column: span 1 / span 1;
    }

    .forum-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }

    .tab-list {
        flex-wrap: nowrap;
    }

    .editor-toolbar {
        flex-wrap: wrap;
    }

    /* Mobile subcategory layout */
    .subcategory-table-header {
        display: none;
    }

    .subcategory-item {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

        .subcategory-item .subcategory-icon {
            display: none;
        }

        .subcategory-item .subcategory-content {
            width: 100%;
        }

    .mobile-stats {
        display: block;
        width: 100%;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    /* Mobile header for tables */
    .table-header {
        display: none;
    }
}

@media (max-width: 640px) {
    .text-3xl {
        font-size: 1.5rem;
    }

    .text-2xl {
        font-size: 1.25rem;
    }

    .widget-value {
        font-size: 1.5rem;
    }

    .card-header,
    .card-content,
    .card-footer {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .subcategory-item,
    .topic-item {
        padding: 0.75rem;
    }
}

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.5s ease-out;
}

.animate-rotate {
    animation: rotate 0.5s ease-in-out;
}

/* Print styles */
@media print {
    .header,
    .nav-links,
    .btn,
    .modal {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #000;
    }

    body {
        background: white;
        color: black;
    }
}
