@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* XenForo 2.x Light Theme */
    --xf-bg-color: #eceef3;
    --xf-content-bg: #ffffff;
    --xf-header-bg: #185899;
    --xf-nav-bg: #214977;
    --xf-nav-active: rgba(255, 255, 255, 0.15);
    --xf-border-color: #d8dbe0;
    --xf-text-color: #141414;
    --xf-text-muted: #8c8c8c;
    --xf-accent-color: #2577b1;
    --xf-node-header: #f2f5f7;
    --xf-node-hover: #f5f8fa;
    --xf-sidebar-width: 300px;
    --xf-sidebar-gap: 20px;
}

[data-theme="dark"] {
    /* XenForo 2.x Dark Theme */
    --xf-bg-color: #0b0e11;
    --xf-content-bg: #15191e;
    --xf-header-bg: #1a1e23;
    --xf-nav-bg: #1f2429;
    --xf-nav-active: #252b31;
    --xf-border-color: #2e343a;
    --xf-text-color: #d1d5db;
    --xf-text-muted: #8b949e;
    --xf-accent-color: #3b82f6;
    --xf-node-header: #1f2429;
    --xf-node-hover: #1c2126;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--xf-bg-color);
    color: var(--xf-text-color);
    font-family: 'Segoe UI', 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    transition: background-color 0.2s;
}

a {
    color: var(--xf-accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.p-pageWrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* Header & Nav Structure */
.p-header {
    background: var(--xf-header-bg);
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.p-header-logo {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.p-nav {
    background: var(--xf-nav-bg);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.p-nav-list {
    display: flex;
    list-style: none;
}

.p-nav-list a {
    display: block;
    padding: 14px 20px;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.2s;
}

.p-nav-list a:hover,
.p-nav-list a.is-selected {
    background: var(--xf-nav-active);
    text-decoration: none;
}

.p-sectionLinks {
    background: var(--xf-content-bg);
    border-bottom: 1px solid var(--xf-border-color);
    padding: 10px 0;
}

.p-sectionLinks-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.p-breadcrumbs {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.p-breadcrumbs li:not(:last-child)::after {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 9px;
    margin-left: 8px;
    color: var(--xf-text-muted);
}

/* Main Body Grid */
.p-body {
    flex: 1;
    margin: 20px 0;
}

.p-body-main {
    display: flex;
    gap: var(--xf-sidebar-gap);
}

.p-body-content {
    flex: 1;
    min-width: 0;
    /* Prevents overflow */
}

.p-body-sidebar {
    width: var(--xf-sidebar-width);
    flex-shrink: 0;
}

/* Blocks & Nodes (XenForo Styled) */
.block {
    margin-bottom: 24px;
}

.block-container {
    background: var(--xf-content-bg);
    border: 1px solid var(--xf-border-color);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.block-header {
    background: var(--xf-node-header);
    padding: 12px 15px;
    font-weight: 700;
    color: var(--xf-accent-color);
    border-bottom: 1px solid var(--xf-border-color);
    font-size: 16px;
}

.node {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--xf-border-color);
    transition: background 0.1s;
}

.node:last-child {
    border-bottom: none;
}

.node:hover {
    background: var(--xf-node-hover);
}

.node-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--xf-accent-color);
    margin-right: 15px;
    opacity: 0.8;
}

.node-main {
    flex: 1;
}

.node-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.node-title a {
    color: var(--xf-text-color);
}

.node-description {
    font-size: 13px;
    color: var(--xf-text-muted);
}

.node-stats {
    display: flex;
    gap: 30px;
    width: 140px;
    justify-content: center;
    font-size: 13px;
    color: var(--xf-text-muted);
    text-align: center;
}

.node-extra {
    width: 280px;
    font-size: 12px;
    padding-left: 15px;
    border-left: 1px solid rgba(0, 0, 0, 0.03);
}

.node-extra-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Widgets */
.block-minorHeader {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    background: var(--xf-node-header);
    border-bottom: 1px solid var(--xf-border-color);
}

.block-body {
    padding: 12px;
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.button--primary {
    background: #2577b1;
    color: #fff;
}

.button--primary:hover {
    background: #185899;
    text-decoration: none;
}

.button--alt {
    background: var(--xf-node-header);
    border-color: var(--xf-border-color);
    color: var(--xf-text-color);
}

.button--alt:hover {
    background: var(--xf-node-hover);
    text-decoration: none;
}

/* Footer */
.p-footer {
    background: var(--xf-content-bg);
    border-top: 1px solid var(--xf-border-color);
    padding: 40px 0;
    font-size: 13px;
    color: var(--xf-text-muted);
}

.p-footer-inner {
    display: flex;
    justify-content: space-between;
}

/* Utility */
#theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--xf-border-color);
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    display: block;
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-input:focus {
    border-color: var(--xf-accent-color);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1), inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--xf-text-color);
}

.captcha-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.captcha-question {
    font-weight: 700;
    color: var(--xf-accent-color);
    font-size: 16px;
    background: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    border: 1px dashed var(--xf-accent-color);
}

/* Profile Page Styles */
.profile-header {
    background: var(--xf-content-bg);
    border: 1px solid var(--xf-border-color);
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.profile-header-top {
    height: 150px;
    background: linear-gradient(135deg, var(--xf-header-bg), var(--xf-accent-color));
    position: relative;
}

.profile-avatar-container {
    position: absolute;
    bottom: -50px;
    left: 20px;
    width: 120px;
    height: 120px;
    background: var(--xf-content-bg);
    border: 4px solid var(--xf-content-bg);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: var(--xf-text-muted);
}

.profile-header-bottom {
    padding: 60px 20px 20px 160px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.profile-username {
    font-size: 24px;
    font-weight: 700;
}

.profile-rank {
    font-size: 14px;
    color: var(--xf-text-muted);
}

.profile-stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    padding-left: 160px;
    padding-bottom: 20px;
}

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

.profile-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--xf-accent-color);
}

.profile-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--xf-text-muted);
}

/* Modern Editor Styles */
.editor-container {
    border: 1px solid var(--xf-border-color);
    border-radius: 4px;
    overflow: hidden;
}

.editor-toolbar {
    background: var(--xf-node-header);
    border-bottom: 1px solid var(--xf-border-color);
    padding: 5px;
    display: flex;
    gap: 5px;
}

.editor-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 3px;
    color: var(--xf-text-color);
    cursor: pointer;
    font-size: 14px;
}

.editor-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.editor-textarea {
    width: 100%;
    padding: 15px;
    border: none;
    background: var(--xf-content-bg);
    color: var(--xf-text-color);
    font-family: inherit;
    font-size: 15px;
    resize: vertical;
    min-height: 150px;
}

.editor-textarea:focus {
    outline: none;
}

/* BBCode & Quote Styles */
.bbCodeBlock {
    margin: 10px 0;
    border: 1px solid var(--xf-border-color);
    border-left: 3px solid var(--xf-accent-color);
    background: var(--xf-node-header);
    border-radius: 3px;
}

.bbCodeBlock-title {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--xf-accent-color);
    background: rgba(0, 0, 0, 0.02);
}

.bbCodeBlock-content {
    padding: 10px 12px;
    font-style: italic;
    font-size: 14px;
}

/* XenForo Style Message Layout */
.message {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    background: var(--xf-content-bg);
    border: 1px solid var(--xf-border-color);
    border-radius: 4px;
}

.message-inner {
    display: flex;
}

.message-cell {
    padding: 15px;
}

.message-cell--user {
    width: 180px;
    flex-shrink: 0;
    background: var(--xf-node-header);
    border-right: 1px solid var(--xf-border-color);
    text-align: center;
}

.message-cell--main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.message-user-avatar {
    width: 90px;
    height: 90px;
    background: var(--xf-node-header);
    border-radius: 4px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: var(--xf-accent-color);
    position: relative;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--xf-border-color);
}

.status-indicator {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #95a5a6;
    border: 3px solid var(--xf-content-bg);
    z-index: 2;
}

.status-indicator--online {
    background: #2ecc71;
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.4);
}

.message-user-name {
    font-weight: 700;
    font-size: 15px;
    display: block;
    margin-bottom: 5px;
    color: var(--xf-accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

/* ADMIN: Elegant Golden Shadow */
.username--role-admin {
    color: #c5a059 !important;
    text-shadow: 0 0 1px rgba(197, 160, 89, 0.3);
    letter-spacing: 0.3px;
}

/* AI MODERATOR: Subtle Digital Pulse */
.username--rank-5 {
    color: #00e5ff !important;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
    animation: aiNamePulse 3s infinite ease-in-out;
}

/* CORPORATE: Professional Deep Blue */
.username--rank-4 {
    color: #003366 !important;
    font-weight: 800;
}

/* MODERATOR: Sleek Silver-ish Blue */
.username--role-mod,
.username--role-super_mod {
    color: #4a6fa5 !important;
}

@keyframes aiNamePulse {

    0%,
    100% {
        opacity: 1;
        text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
    }

    50% {
        opacity: 0.85;
        text-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
    }
}

.message-user-name:hover {
    filter: brightness(1.2);
}

/* --- LUXURY & PROFESSIONAL RANK BANNERS (V2) --- */
.user-banner {
    display: inline-block;
    padding: 5px 15px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 4px;
    margin: 10px auto;
    text-align: center;
    min-width: 110px;
    position: relative;
    letter-spacing: 1.5px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Base style for rank-specific colors */
.user-banner[style*="--banner-color"] {
    background: color-mix(in srgb, var(--banner-color), transparent 85%);
    border: 1px solid color-mix(in srgb, var(--banner-color), transparent 60%);
    color: var(--banner-color);
}

/* ADMIN: Carbon Fiber Luxury with Gold Accents */
.user-banner--role-admin {
    background:
        linear-gradient(45deg, #111 25%, transparent 25%) -5px 0,
        linear-gradient(-45deg, #111 25%, transparent 25%) -5px 0,
        linear-gradient(45deg, transparent 75%, #111 75%),
        linear-gradient(-45deg, transparent 75%, #111 75%),
        #1a1a1a !important;
    background-size: 10px 10px !important;
    color: #c5a059 !important;
    border: 1.5px solid #c5a059 !important;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.15), inset 0 0 10px rgba(0, 0, 0, 0.5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* AI MODERATOR: Cyber Digital Circuit */
.user-banner--rank-5 {
    background: #001a1a !important;
    background-image:
        radial-gradient(circle at 2px 2px, rgba(0, 229, 255, 0.1) 1px, transparent 0) !important;
    background-size: 4px 4px !important;
    color: #00e5ff !important;
    border: 1px solid #00e5ff !important;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

/* MODERATOR: Deep Frosted Glass (Midnight Blue) */
.user-banner--role-mod,
.user-banner--role-super_mod {
    background: linear-gradient(135deg, #0d2137 0%, #1a3c5a 100%) !important;
    color: #a5c1d6 !important;
    border: 1px solid rgba(165, 193, 214, 0.3) !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* KURUMSAL: High-End Minimalist (Silk White) */
.user-banner--rank-4 {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border: 1.5px solid #1a1a1a !important;
    font-weight: 900;
}

/* ELITE: Dark Graphite Stealth */
.username--rank-3 {
    background: #232323 !important;
    color: #f1f1f1 !important;
    border: 1px solid #444 !important;
}

/* Subtle Sweep Animation for Staff */
.user-banner--role-admin::after,
.user-banner--rank-5::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-25deg);
    animation: luxurySweep 8s infinite;
}

@keyframes luxurySweep {
    0% {
        left: -100%;
    }

    15% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

.user-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.message-user-extras {
    font-size: 11px;
    color: var(--xf-text-muted);
    margin-top: 15px;
    border-top: 1px solid var(--xf-border-color);
    padding-top: 12px;
}

.message-user-extras dl {
    display: flex;
    justify-content: space-between;
    margin: 0 0 5px 0;
}

.message-user-extras dt {
    font-weight: 600;
    color: var(--xf-text-muted);
}

.message-user-extras dd {
    font-weight: 700;
    color: var(--xf-text-muted);
}

.achievement-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin-top: 10px;
}

.badge-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    cursor: help;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.badge-icon:hover {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    filter: brightness(1.2);
}

.badge-icon--staff {
    background: #e74c3c;
}

.badge-icon--senior {
    background: #9b59b6;
}

.badge-icon--active {
    background: #2ecc71;
}

.badge-icon--corporate {
    background: #3498db;
}

.reputation-display {
    text-align: center;
    margin-top: 12px;
    background: var(--xf-node-header);
    border-radius: 4px;
    padding: 5px;
    font-size: 11px;
}

.reputation-display .label {
    color: var(--xf-text-muted);
    font-weight: 600;
    margin-right: 5px;
}

.reputation-display .value {
    color: var(--xf-accent-color);
    font-weight: 700;
}

.message-header {
    font-size: 12px;
    color: var(--xf-text-muted);
    border-bottom: 1px solid var(--xf-border-color);
    padding-bottom: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}

.message-body {
    font-size: 15px;
    line-height: 1.6;
    flex: 1;
}

.message-footer {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 12px;
}

.message-signature {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px dotted var(--xf-border-color);
    font-size: 12px;
    color: var(--xf-text-muted);
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .profile-header-bottom {
        padding: 60px 20px 20px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-avatar-container {
        left: 50%;
        margin-left: -60px;
    }

    .profile-stats {
        padding-left: 0;
        justify-content: center;
    }
}

/* Responsive */
@media (max-width: 1000px) {
    .p-body-main {
        flex-direction: column;
    }

    .p-body-sidebar {
        width: 100%;
    }

    .node-stats,
    .node-extra {
        display: none;
    }
}

@media (max-width: 768px) {
    .message-inner {
        flex-direction: column;
    }

    .message-cell--user {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--xf-border-color);
        display: flex;
        align-items: center;
        gap: 15px;
        text-align: left;
        padding: 10px 15px;
    }

    .message-user-avatar {
        width: 48px;
        height: 48px;
        margin: 0;
        font-size: 20px;
    }

    .message-user-extras {
        display: none;
    }
}
/* Mobile Header & Responsive Styles */
.p-header-mobile {
    display: none;
    position: fixed; /* Sticky top */
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--xf-header-bg);
    z-index: 500;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.p-header-mobile-left, 
.p-header-mobile-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.p-header-mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
}

.p-header-mobile-logo img {
    height: 32px;
}

.mobile-icon-link {
    color: #fff;
    font-size: 20px;
    position: relative;
    text-decoration: none;
}

.mobile-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--xf-header-bg);
}

.mobile-user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
}

.mobile-user-avatar i {
    font-size: 28px;
    color: #fff;
}

/* Off Canvas Menu */
.p-offCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: var(--xf-bg-color);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.p-offCanvas.is-active {
    transform: translateX(0);
}

.p-offCanvas-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    backdrop-filter: blur(2px);
}

.p-offCanvas-backdrop.is-active {
    opacity: 1;
    visibility: visible;
}

.p-offCanvas-header {
    background: var(--xf-node-header);
    padding: 20px;
    border-bottom: 1px solid var(--xf-border-color);
    position: relative;
}

.p-offCanvas-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.p-offCanvas-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.p-offCanvas-avatar i {
    font-size: 48px;
    color: var(--xf-text-muted);
}

.p-offCanvas-info {
    overflow: hidden;
}

.p-offCanvas-username {
    font-weight: 700;
    font-size: 16px;
    color: var(--xf-text-color);
}

.p-offCanvas-rank {
    font-size: 12px;
    color: var(--xf-accent-color);
    font-weight: 600;
}

.p-offCanvas-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--xf-text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.p-offCanvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.p-offCanvas-nav {
    list-style: none;
}

.p-offCanvas-nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: var(--xf-text-color);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.p-offCanvas-nav a i {
    width: 20px;
    text-align: center;
    color: var(--xf-accent-color);
}

.p-offCanvas-nav a:hover {
    background: var(--xf-node-header);
}

.nav-divider {
    height: 1px;
    background: var(--xf-border-color);
    margin: 10px 0;
}

.nav-label {
    display: block;
    padding: 5px 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--xf-text-muted);
}

/* Media Queries */
@media (max-width: 768px) {
    /* Hide Desktop Elements */
    .p-header, 
    .p-nav, 
    .p-sectionLinks { 
        display: none !important; 
    }

    /* Show Mobile Elements */
    .p-header-mobile {
        display: flex !important;
    }

    /* Adjust page wrapper for sticky header */
    .p-pageWrapper {
        padding-top: 60px;
    }

    /* Adjust Grid Layout */
    .p-body-main {
        flex-direction: column;
        gap: 20px;
    }

    .p-body-sidebar {
        width: 100% !important;
    }
    
    /* Stats Widget Scroll */
    .block-body table {
        min-width: 600px; /* Ensure tables are scrollable */
    }
    
    .stats-tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }
}

/* Profile Responsive Styles */
.profile-layout {
    display: grid; 
    grid-template-columns: 300px 1fr; 
    gap: 20px; 
    align-items: start;
}

@media (max-width: 768px) {
    .profile-layout {
        display: flex;
        flex-direction: column;
    }

    /* Stack Sidebar below Main Content? Standard: Sidebar below often. 
       If 'About' is secondary, put it below. But HTML order is Sidebar first.
       Let's keep Sidebar on top or make it collapsible? 
       Actually user wants "mobile compatible". Standard simple stack is Sidebar then Content.
    */
    
    .profile-header-top {
        height: 120px;
    }

    .profile-avatar-container {
        left: 50%;
        transform: translateX(-50%);
        bottom: -40px;
        width: 100px;
        height: 100px;
        border-width: 3px;
    }
    
    .profile-avatar-container img {
        border-radius: 50%; /* Ensure circle on mobile */
    }

    .profile-header-bottom {
        padding: 50px 15px 15px 15px; /* Reset padding-left */
        flex-direction: column;
        align-items: center;
        gap: 15px;
        text-align: center;
    }
    
    .profile-username {
        font-size: 20px;
        justify-content: center;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    .user-banner {
        margin: 5px auto 0;
    }

    .profile-stats {
        padding-left: 0;
        justify-content: center;
        margin-top: 15px;
        border-top: 1px solid var(--xf-border-color);
        padding-top: 15px;
        width: 100%;
    }
    
    .profile-header-bottom > div {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .profile-header-bottom .button {
        flex: 1;
        justify-content: center;
    }
}

/* Profile Mobile Fixes: Reorder & Stretch */
@media (max-width: 768px) {
    .profile-layout {
        align-items: stretch; /* Ensure full width */
    }
    
    /* Sidebar (About) - Move to bottom */
    .profile-layout > div:first-child {
        order: 2;
    }
    
    /* Main Content (Bio/Activities) - Move to top */
    .profile-layout > div:last-child {
        order: 1;
    }
}

/* Enhanced Footer Styles */
.p-footer {
    background: linear-gradient(135deg, #1a1e23 0%, #2c3e50 100%);
    border-top: 3px solid var(--xf-accent-color);
    padding: 60px 0 0;
    color: #ecf0f1;
    margin-top: 40px;
}

.p-footer-main {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.p-footer-column {
    display: flex;
    flex-direction: column;
}

.p-footer-logo img {
    filter: brightness(0) invert(1);
}

.p-footer-description {
    color: #bdc3c7;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.p-footer-social {
    display: flex;
    gap: 10px;
}

.social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: var(--xf-accent-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 119, 177, 0.3);
}

.p-footer-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.p-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.p-footer-links li {
    margin-bottom: 12px;
}

.p-footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.p-footer-links a i {
    width: 16px;
    color: var(--xf-accent-color);
    font-size: 12px;
}

.p-footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

.p-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    font-size: 13px;
    color: #95a5a6;
}

.p-footer-copyright {
    font-weight: 500;
}

.p-footer-credits {
    font-size: 12px;
}

.p-footer-credits strong {
    color: var(--xf-accent-color);
}

/* Footer Mobile Responsive */
@media (max-width: 992px) {
    .p-footer-main {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .p-footer {
        padding: 40px 0 0;
    }

    .p-footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-bottom: 30px;
    }

    .p-footer-column {
        text-align: center;
    }

    .p-footer-logo {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .p-footer-social {
        justify-content: center;
    }

    .p-footer-links a {
        justify-content: center;
    }

    .p-footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 20px 0;
    }
}
