/* ==========================================================================
   INVISION MUWEB FORUM STYLESHEET
   Description: Extreme fidelity frontend design for Mu Online MMORPG forum.
   Version: 1.0.0
   Author: Antigravity Agent
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. DESIGN SYSTEM & VARIABLES
   -------------------------------------------------------------------------- */
:root {
    /* Color Palette */
    --bg-dark: #0a0a0a;
    --bg-container: #1d1d1d;
    --bg-sidebar: #202020;
    --bg-sidebar-active: #2a2a2a;
    --bg-block-header: #3b3b3b;
    --bg-light: #f8f8f8;
    --bg-white: #ffffff;

    --color-gold: #d4af37;
    --color-text-dark: #333333;
    --color-text-light: #ffffff;
    --color-text-muted: #777777;
    --color-text-description: #666666;

    --color-blue: #0072bc;
    --color-blue-hover: #005a96;

    /* Social Colors */
    --color-facebook: #3b5998;
    --color-twitter: #1da1f2;
    --color-youtube: #ff0000;
    --color-instagram: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);

    /* Fonts */
    --font-serif: 'Cinzel', 'Merriweather', Georgia, serif;
    --font-sans: 'Roboto', 'Open Sans', Arial, sans-serif;

    /* Spacing & Borders */
    --border-radius: 4px;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --------------------------------------------------------------------------
   1. GLOBAL RESETS
   -------------------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    font-family: var(--font-sans);
    color: var(--color-text-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    padding-bottom: 50px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --------------------------------------------------------------------------
   2. PAGE WRAPPER & HEADER
   -------------------------------------------------------------------------- */
.page-wrapper {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
}

/* Forum Top Header */
.forum-header {
    width: 100%;
    height: 250px;
    background-image: url('../assets/background.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    border: 1px solid #2e2e2e;
    border-bottom: none;
}

.header-container {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 0 30px;
}

/* Logo placement and sizes */
.logo-link {
    display: inline-block;
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
}

.logo-image {
    height: auto;
    width: 320px;
    /* Precise layout scaling */
    object-fit: contain;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
}

/* --------------------------------------------------------------------------
   3. MAIN WRAPPER CONTAINER
   -------------------------------------------------------------------------- */
.main-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    background-color: var(--bg-container);
    border: 1px solid #2e2e2e;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   4. SIDEBAR STYLES (LEFT COLUMN)
   -------------------------------------------------------------------------- */
.sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid #2b2b2b;
    display: flex;
    flex-direction: column;
    padding-bottom: 30px;
}

.sidebar-block {
    margin-bottom: 25px;
}

.sidebar-block:last-child {
    margin-bottom: 0;
}

/* Block Header */
.sidebar-block .block-title {
    background-color: var(--bg-block-header);
    color: var(--color-text-light);
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    padding: 16px 10px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #4a4a4a;
    box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.2);
}

/* Menu List */
.sidebar-block .menu-list {
    list-style: none;
    width: 100%;
}

.sidebar-block .menu-link {
    display: block;
    color: var(--color-text-light);
    font-family: var(--font-sans);
    font-size: 17px;
    text-align: center;
    padding: 12px 15px;
    border-bottom: 1px solid #252525;
    position: relative;
    z-index: 1;
}

.sidebar-block .menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-sidebar-active);
    z-index: -1;
    opacity: 0;
    transition: var(--transition-smooth);
}

/* Menu Link Hover and Active States */
.sidebar-block .menu-link:hover {
    color: var(--color-text-light);
    padding-left: 20px;
    /* Subtle micro-interaction shift */
    letter-spacing: 0.5px;
}

.sidebar-block .menu-link:hover::before {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   5. CONTENT AREA STYLES (RIGHT COLUMN)
   -------------------------------------------------------------------------- */
.content-area {
    background-color: var(--bg-white);
    display: flex;
    flex-direction: column;
}

/* 5.1 Barra Superior (Top Bar) */
.top-bar {
    background-color: var(--bg-container);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #2e2e2e;
    min-height: 60px;
}

/* User Badge */
.user-badge {
    background-color: #262626;
    border: 1px solid #3c3c3c;
    border-radius: 20px;
    padding: 8px 18px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-light);
    letter-spacing: 0.8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Admin Message Centered */
.admin-message {
    color: var(--color-gold);
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    flex: 1;
    padding: 0 15px;
}

/* Social Buttons Grid */
.social-icons {
    display: flex;
    gap: 6px;
}

.social-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    color: var(--color-text-light);
    transition: var(--transition-smooth);
}

.social-svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.social-btn.facebook {
    background-color: var(--color-facebook);
}

.social-btn.twitter {
    background-color: var(--color-twitter);
}

.social-btn.youtube {
    background-color: var(--color-youtube);
}

.social-btn.instagram {
    background: var(--color-instagram);
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    filter: brightness(1.15);
}

/* 5.2 Breadcrumbs Bar */
.breadcrumb-bar {
    background-color: #f2f2f2;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

/* Home Arrow Chevron Style */
.breadcrumbs {
    display: flex;
    align-items: center;
}

.breadcrumb-home {
    display: inline-block;
    background: var(--bg-white);
    color: var(--color-text-dark);
    padding: 6px 20px 6px 15px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #cccccc;
    border-right: none;
    border-radius: 4px 0 0 4px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.breadcrumb-home::after {
    content: '';
    position: absolute;
    right: -10px;
    top: -1px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 10px solid var(--bg-white);
    z-index: 2;
}

.breadcrumb-home::before {
    content: '';
    position: absolute;
    right: -11px;
    top: -1px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 10px solid #cccccc;
    z-index: 1;
}

.breadcrumb-home:hover {
    color: var(--color-blue);
}

/* All Activity Button */
.activity-btn {
    background-color: var(--bg-white);
    border: 1px solid #cccccc;
    border-radius: 4px;
    padding: 6px 14px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    color: #444444;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.activity-icon {
    width: 14px;
    height: 14px;
}

.activity-btn:hover {
    background-color: var(--bg-light);
    color: var(--color-blue);
    border-color: #bbbbbb;
}

/* 5.3 Category Rows */
.categories-container {
    width: 100%;
}

.category-row {
    min-height: 95px;
    display: flex;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid #eaeaea;
    transition: background-color 0.2s ease-in-out;
    background-color: var(--bg-white);
}

.category-row:hover {
    background-color: #fafafa;
}

/* Icon Column */
.category-icon-col {
    width: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.comment-icon {
    width: 22px;
    height: 22px;
    fill: #555555;
    transition: var(--transition-smooth);
}

.category-row:hover .comment-icon {
    fill: var(--color-blue);
    transform: scale(1.1);
}

/* Main Text (Title/Description) Column */
.category-main-col {
    flex: 1;
    padding-right: 20px;
}

.category-title {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 4px;
}

.category-title a:hover {
    color: var(--color-blue);
    text-decoration: underline;
}

.category-desc {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-text-description);
    line-height: 1.4;
}

/* Statistics Column */
.category-stats-col {
    width: 90px;
    flex-shrink: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats-num {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 700;
    color: #333333;
    line-height: 1;
}

.stats-lbl {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: lowercase;
    margin-top: 2px;
}

/* Last Post Column */
.category-lastpost-col {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 1px solid #f0f0f0;
    padding-left: 20px;
}

.lastpost-avatar {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.lastpost-avatar svg {
    display: block;
}

.lastpost-info {
    flex: 1;
    min-width: 0;
    /* Ensures overflow text ellipsis works */
}

.lastpost-title {
    display: block;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    color: #333333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lastpost-title:hover {
    color: var(--color-blue);
    text-decoration: underline;
}

.lastpost-meta {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lastpost-author {
    font-weight: 600;
    color: #555555;
}

.lastpost-author:hover {
    color: var(--color-blue);
}

/* 5.4 Actions Row & Start New Topic Button */
.start-topic-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    background-color: var(--bg-white);
    border-bottom: 1px solid #eaeaea;
}

.btn-start-topic {
    background-color: #111111;
    color: var(--color-text-light);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: var(--border-radius);
    padding: 14px 34px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: var(--transition-smooth);
}

.btn-start-topic:hover {
    background-color: var(--color-blue);
    box-shadow: 0 4px 12px rgba(0, 114, 188, 0.4);
    transform: translateY(-1px);
}

.btn-start-topic:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 114, 188, 0.2);
}

/* 5.5 Member Statistics Panel */
.statistics-panel {
    background-color: var(--bg-white);
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    margin: 25px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Panel Header */
.statistics-header {
    background-color: #ebebeb;
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.statistics-header h4 {
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 700;
    color: #444444;
    letter-spacing: 0.5px;
    text-transform: none;
}

/* Panel Columns */
.statistics-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    padding: 20px 10px;
    align-items: center;
}

.stat-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #eeeeee;
    padding: 10px;
}

.stat-column:nth-child(2) {
    border-right: 1px solid #eeeeee;
}

.stat-column.newest-member-col {
    border-right: none;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding-left: 30px;
    gap: 15px;
}

/* Stat Large Number */
.stat-number {
    font-family: var(--font-sans);
    font-size: 32px;
    font-weight: 700;
    color: #111111;
    line-height: 1;
}

.stat-label {
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 600;
    margin-top: 4px;
}

/* Newest Member Special Layout */
.newest-member-badge {
    width: 36px;
    height: 36px;
    background-color: var(--color-blue);
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 18px;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.newest-member-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.newest-member-info .meta-label {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
}

.newest-member-info .member-name {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    color: #222222;
}

.newest-member-info .member-name:hover {
    color: var(--color-blue);
    text-decoration: underline;
}

.newest-member-info .meta-joined {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--color-text-muted);
}

/* 5.6 Pagination Widget Styles */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 40px 20px;
    gap: 15px;
    background-color: var(--bg-white);
}

.pagination-arrows {
    display: flex;
    gap: 30px;
}

.arrow-btn {
    background: none;
    border: none;
    color: #444444;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.arrow-svg {
    width: 24px;
    height: 24px;
}

.arrow-btn:hover {
    color: var(--color-blue);
    background-color: var(--bg-light);
}

/* Slider Track Bar */
.pagination-bar-wrapper {
    width: 240px;
    padding: 5px 0;
}

.pagination-bar-track {
    width: 100%;
    height: 16px;
    background-color: #222222;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
    border: 1px solid #333333;
}

.pagination-bar-slider {
    width: 80px;
    height: 100%;
    background-color: #888888;
    position: absolute;
    left: 80px;
    /* Centered index mock position */
    border-radius: 1px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.2s;
    cursor: pointer;
}

.pagination-bar-slider:hover {
    background-color: #aaaaaa;
}

/* --------------------------------------------------------------------------
   6. RESPONSIVENESS AND BREAKPOINTS
   -------------------------------------------------------------------------- */

/* Large screens and normal display (>= 1024px) */
@media (min-width: 1024px) {
    /* No overrides needed, defaults designed for 1024px to 1600px+ */
}

/* Medium screens (tablets, small laptops: < 1024px) */
@media (max-width: 1024px) {
    .forum-header {
        height: 200px;
    }

    .logo-image {
        width: 250px;
    }

    .main-container {
        grid-template-columns: 1fr;
        /* Stacks sidebar and content */
    }

    .sidebar {
        border-right: none;
        border-bottom: 2px solid #2b2b2b;
        flex-direction: row;
        flex-wrap: wrap;
        padding-bottom: 0;
    }

    .sidebar-block {
        flex: 1 1 30%;
        /* Three blocks spread horizontally */
        margin-bottom: 0;
        border-right: 1px solid #2b2b2b;
    }

    .sidebar-block:last-child {
        border-right: none;
    }

    .sidebar-block .block-title {
        font-size: 18px;
        padding: 12px 10px;
    }

    .sidebar-block .menu-link {
        font-size: 15px;
        padding: 10px;
    }

    .statistics-content {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .stat-column.newest-member-col {
        grid-column: span 2;
        border-top: 1px solid #eeeeee;
        justify-content: center;
        padding-left: 10px;
        padding-top: 15px;
    }
}

/* Small screens (large mobile, portrait tablets: < 768px) */
@media (max-width: 768px) {
    body {
        padding-bottom: 20px;
    }

    .forum-header {
        height: 150px;
    }

    .logo-link {
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .logo-image {
        width: 200px;
    }

    .sidebar-block {
        flex: 1 1 100%;
        /* Side bar items stack on mobile */
        border-right: none;
        border-bottom: 1px solid #2b2b2b;
    }

    .sidebar-block:last-child {
        border-bottom: none;
    }

    .top-bar {
        flex-direction: column;
        gap: 12px;
        padding: 15px;
        align-items: center;
    }

    .admin-message {
        order: -1;
        /* Puts message at the top of vertical stack */
        font-size: 12px;
    }

    .category-row {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        gap: 10px;
    }

    .category-icon-col {
        display: none;
        /* Hide icons on small mobile to save space */
    }

    .category-main-col {
        padding-right: 0;
    }

    .category-stats-col {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        gap: 10px;
        margin-top: 5px;
    }

    .stats-num {
        font-size: 16px;
    }

    .stats-lbl {
        font-size: 13px;
        margin-top: 0;
        display: inline-flex;
        align-items: center;
    }

    .category-lastpost-col {
        width: 100%;
        border-left: none;
        border-top: 1px solid #f0f0f0;
        padding-left: 0;
        padding-top: 10px;
    }

    .statistics-content {
        grid-template-columns: 1fr;
    }

    .stat-column {
        border-right: none;
        border-bottom: 1px solid #eeeeee;
        padding: 15px 0;
    }

    .stat-column.newest-member-col {
        grid-column: span 1;
        border-top: none;
        border-bottom: none;
        padding-left: 0;
    }

    .details-stats-container {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .profile-about-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}

.online-member-link:hover {
    text-decoration: underline;
}