/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* --- Modern Dark Palette (Inspired by Twitter Dim / Glassmorphism) --- */
    --bg-main: #15202b;
    /* Deep Blue-Gray Background */
    --bg-glass: rgba(25, 39, 52, 0.65);
    /* Semi-transparent for Glass */
    --bg-glass-heavy: rgba(21, 32, 43, 0.85);
    /* Heavier glass for header */
    --bg-input: rgba(0, 0, 0, 0.2);
    /* Darker inputs */

    /* Accents */
    --primary: #3b82f6;
    /* Blue */
    --primary-hover: #2563eb;
    --primary-glass: rgba(59, 130, 246, 0.15);

    --secondary: #10b981;


    --danger: #ef4444;
    /* Red */

    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);

    /* Text */
    --text-main: #f7f9f9;
    /* Bright White */
    --text-muted: #94a3b8;
    /* Slate-400 */
    --text-link: #60a5fa;
    /* Blue-400 (Ligher for dark bg) */

    /* Borders & Shadows */
    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

    /* Spacing */
    --container-width: 1100px;
    /* Slightly narrower for focus */
    --header-height: 70px;
    --radius: 12px;
}

/* Highlight targeted comment/reply/topic */
.global-post:target,
.forum-post:target {
    animation: highlight-pulse 2s ease-out;
    background: rgba(253, 224, 71, 0.1) !important;
    box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.4), 0 8px 32px 0 rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(253, 224, 71, 0.5) !important;
    z-index: 10;
    position: relative;
    /* Ensure z-index works */
}

@keyframes highlight-pulse {
    0% {
        transform: scale(1.01);
    }

    100% {
        transform: scale(1);
    }
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Optional: Subtle gradient background */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 20%);
    background-attachment: fixed;
}

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

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

ul {
    list-style: none;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

main {
    flex: 1;
    padding: 40px 0;
}

/* --- Glassmorphism Utilities --- */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-glass);
}

/* --- Cards --- */
.card,
.card--form,
.global-card,
.global-form-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, border-color 0.2s;
    margin-bottom: 20px;
}

.card:hover,
.global-card:hover {
    border-color: var(--border-hover);
}

.btn--icon,
.btn-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.btn--icon:hover,
.btn-icon:hover {
    background: var(--primary-glass);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.giveaway-active {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 0.5em;
    letter-spacing: -0.01em;
}

h1 {
    font-size: 2.2rem;
}

h2 {
    font-size: 1.8rem;
}

h3 {
    font-size: 1.4rem;
}

/* =============================================================================
   BUTTON COMPONENT  —  BEM: .btn (block)  /  .btn--{modifier} (modifier)
   Old hyphen names kept as aliases so nothing breaks during template rollout.
   ============================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
    filter: brightness(0.9);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-glass);
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* -- Colour modifiers -- */
.btn--primary,
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

.btn--primary:hover,
.btn-primary:hover {
    background: var(--primary-hover);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
    text-decoration: none;
}

.btn--primary:active,
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.btn--outline,
.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border);
    color: var(--text-main);
}

.btn--outline:hover,
.btn-outline:hover,
.btn--outline.active,
.btn-outline.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-muted);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn--outline.active,
.btn-outline.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary);
    transform: none;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.btn--danger,
.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.btn--danger:hover,
.btn-danger:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn--warning,
.btn-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.2);
}

.btn--warning:hover,
.btn-warning:hover {
    background: #f59e0b;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.btn--info,
.btn-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.2);
}

.btn--info:hover,
.btn-info:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn--success,
.btn-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.btn--success:hover,
.btn-success:hover {
    background: #10b981;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn--secondary,
.btn-secondary {
    background: rgba(107, 114, 128, 0.1);
    color: #9ca3af;
    border-color: rgba(107, 114, 128, 0.2);
}

.btn--secondary:hover,
.btn-secondary:hover {
    background: #4b5563;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(75, 85, 99, 0.4);
}

.btn--green,
.btn-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    border: none;
}

.btn--green:hover,
.btn-green:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    color: white !important;
}

.btn--outline-green,
.btn-outline-green {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid #10b981;
    color: #10b981;
}

.btn--outline-green:hover,
.btn-outline-green:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: #34d399;
    color: #34d399;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    text-decoration: none;
}

/* -- Size modifiers -- */
.btn--sm,
.btn-sm,
.btn--small,
.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    height: auto;
}

.btn--xsmall,
.btn-xsmall {                          /* was undefined — now properly defined */
    padding: 4px 9px;
    font-size: 0.78rem;
    height: auto;
    gap: 5px;
}

/* --- Forms --- */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 15px;
    /* Harmonized with buttons (10px vertical) */
    background: rgba(0, 0, 0, 0.2);
    /* Darker, distinct background */
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
    /* Match button line-height */
}

/* Custom Select Styling */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238899a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    cursor: pointer;
}

select:focus {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Fix option styles for better visibility */
select option {
    background-color: #15202b !important;
    color: #f7f9f9 !important;
    padding: 10px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glass);
    background: rgba(0, 0, 0, 0.3);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =============================================================================
   FORM COMPONENT  —  BEM: .form__group, .form__control
   Old names kept as aliases during template rollout.
   ============================================================================= */
.form__group,
.form-group {
    margin-bottom: 24px;
}

/* Integrated Textarea (Markdown) */
textarea {
    min-height: 150px;
    line-height: 1.5;
    resize: vertical;
    display: block;
}

textarea.form__control,
textarea.form-control {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
}

/* --- Header --- */
.app-header {
    height: var(--header-height);
    border-bottom: 1px solid var(--border);
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header__content,
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    text-decoration: none;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- Dropdown System --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown__menu,
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-width: 180px;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 5px;
}

/* Modifier: Open Upwards */
.dropdown--up .dropdown__menu,
.dropdown--up .dropdown-menu,
.dropdown-up .dropdown__menu,
.dropdown-up .dropdown-menu {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 8px;
}

/* Active State (Only via JS or explicit class) */
.dropdown.active .dropdown__menu,
.dropdown.active .dropdown-menu {
    display: block;
    animation: dropdownFadeIn 0.2s ease-out;
}

.dropdown__menu a,
.dropdown__menu button,
.dropdown-menu a,
.dropdown-menu button {
    display: block;
    width: 100%;
    padding: 10px 15px;
    color: var(--text-main);
    border-radius: 6px;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.dropdown__menu a:hover,
.dropdown__menu button:hover,
.dropdown-menu a:hover,
.dropdown-menu button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* --- Tables & Lists --- */
/* --- Tables & Lists --- */
.data-table,
.global-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    /* Increased gap */
}

.data-table__header,
.global-table-header {
    padding: 12px 15px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

.table-row,
.global-row {
    background: rgba(30, 41, 59, 0.7);
    /* Darker, distinct base */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table-row td,
.global-row td {
    padding: 15px 20px;
    /* Increased padding */
    vertical-align: middle;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    color: var(--text-main);
    font-size: 0.95rem;
    height: 85px;
    /* Forced consistency */
}

.table-row td:first-child,
.global-row td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    border-left: 1px solid var(--border);
}

.table-row td:last-child,
.global-row td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-right: 1px solid var(--border);
}

.table-row:hover,
.global-row:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), rgba(30, 41, 59, 0.8));
    /* Liquid effect */
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border-color: rgba(59, 130, 246, 0.4);
    z-index: 5;
}

/* Forum Specifics */
.forum__title,
.forum-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    /* White */
    text-decoration: none;
    display: block;
    margin-bottom: 6px;
    transition: color 0.2s;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.forum__title:hover,
.forum-title:hover {
    color: var(--primary);
}

.forum__desc,
.forum-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Icon Column */
.forum__icon,
.forum-icon {
    font-size: 1.6rem;
    text-align: center;
    width: 70px;
    padding: 0 10px;
    color: var(--text-muted);
    /* Subtler icon */
}

.forum__stats,
.stats-cell {
    text-align: right;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.9;
}

.forum__last-post,
.last-post-cell {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
    line-height: 1.5;
    min-width: 180px;
    /* Ensure space for content */
}

/* Topic Titles (Restored) */
.topic-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    /* White */
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
    transition: color 0.2s;
}

.topic-title:hover {
    color: var(--primary);
}

.topic-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.forum__last-post a,
.last-post-cell a {
    font-weight: 600;
    color: var(--text-main);
}

/* Pins */
.table-row--pinned,
.global-row-pinned {
    background: rgba(16, 185, 129, 0.05);
    border-left: 3px solid var(--secondary);
}

.topic-pinned {
    color: var(--secondary);
    font-weight: 600;
}

.topic-locked {
    color: var(--text-muted);
}

/* --- Checkboxes (Restored) --- */
.checkbox-group,
.global-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-group__card,
.global-checkbox-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    color: var(--text-muted);
    font-weight: 500;
}

.checkbox-group__card:hover,
.global-checkbox-card:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.checkbox-group__card input[type="checkbox"],
.global-checkbox-card input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
    background: transparent;
    border-color: var(--text-muted);
}

.checkbox-group__card input[type="checkbox"]:checked,
.global-checkbox-card input[type="checkbox"]:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* Checkbox card label & icon */
.checkbox-group__label,
.global-checkbox-label {
    font-weight: 500;
    color: inherit;
}

.checkbox-group__icon,
.global-checkbox-icon {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9em;
}

/* --- Post View (Inline Style - Used for Giveaways) --- */
.post,
.global-post {
    display: block;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.post:hover,
.global-post:hover {
    border-color: var(--border-hover);
}

.post__header,
.global-post-header {
    background: rgba(0, 0, 0, 0.15);
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Forum View (Threaded Layout) --- */
.forum-post {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    margin-bottom: 25px;
    padding: 22px 25px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: all 0.3s ease;
}

.forum-post:hover {
    background: rgba(30, 45, 60, 0.9);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.forum-post .forum-post__sidebar,
.forum-post .post-sidebar {
    width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-top: 2px;
    height: 100%;
    min-height: 70px;
}

/* Thread line specifically for forum posts */
.forum-post .forum-post__sidebar::after,
.forum-post .post-sidebar::after {
    content: none !important;
}

.forum-post.is-last-post .forum-post__sidebar::after,
.forum-post.is-last-post .post-sidebar::after {
    display: none !important;
}

.forum-post .forum-post__main,
.forum-post .post-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.forum-post .post__header,
.forum-post .global-post-header {
    background: transparent;
    padding: 0 0 10px 0;
    margin: 0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forum-post .post__content,
.forum-post .global-post-content {
    padding: 10px 0 15px 0;
}

.forum-post .post__footer,
.forum-post .global-post-footer {
    padding: 8px 0 0 0;
    background: transparent;
    border-top: none;
}

/* Professional Separator between Topic and Replies */
.forum-separator,
.professional-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 40px 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.6;
}

.forum-separator::before,
.forum-separator::after,
.professional-separator::before,
.professional-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.forum-separator::before,
.professional-separator::before {
    margin-right: 20px;
}

.forum-separator::after,
.professional-separator::after {
    margin-left: 20px;
}

.post__meta,
.post-meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar--small,
.global-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background-size: cover;
    background-position: center;
    background-color: var(--bg-main);
}

.post__author,
.post-author {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
    text-decoration: none;
}

.post__role,
.post-role {
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.post__date,
.post-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    border-left: 1px solid var(--border);
    padding-left: 10px;
    margin-left: 5px;
}

.post__content,
.global-post-content {
    padding: 15px;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
    min-height: 60px;
    overflow-wrap: break-word;
    /* Prevent overflow of long words */
}

/* Markdown Specifics for Content */
.post__content p,
.global-post-content p {
    margin-bottom: 1rem;
}

.post__content p:last-child,
.global-post-content p:last-child {
    margin-bottom: 0;
}

.post__content blockquote,
.global-post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 5px 15px;
    margin: 1rem 0;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

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

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

.post__content pre,
.global-post-content pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow-x: auto;
    margin: 1rem 0;
}

.post__content code,
.global-post-content code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
}

/* Markdown Tables */
.post__content table,
.global-post-content table {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.post__content th,
.post__content td,
.global-post-content th,
.global-post-content td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid var(--border);
}

.post__content th,
.global-post-content th {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.post__content tr:nth-child(even),
.global-post-content tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);
}

.post__content tr:hover,
.global-post-content tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

.post__footer,
.global-post-footer {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    /* Standardize right alignment for inline */
    align-items: center;
    gap: 8px;
}

.post__actions,
.global-post-actions {
    display: flex;
    gap: 8px;
    /* Standardize tight spacing */
    align-items: center;
    margin-left: auto;
}

.post__actions .btn,
.global-post-actions .btn {
    margin: 0 !important;
    /* Force remove any default margins */
}

.post__actions,
.global-post-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
    /* Force to right if container is space-between */
}

/* =============================================================================
   BADGE COMPONENT  —  BEM: .badge (block)  /  .badge--{modifier} (modifier)
   Old hyphen names kept as aliases so nothing breaks during template rollout.
   ============================================================================= */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--bg-glass);
    color: var(--text-muted);
    border: 1px solid var(--border);
    vertical-align: middle;
    line-height: 1.4;
}

/* -- Colour modifiers -- */
.badge--success,
.badge-success,
.bg-success {                          /* bg-success: legacy Bootstrap alias */
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.badge--danger,
.badge-danger,
.bg-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.badge--warning,
.badge-warning,
.bg-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

.badge--primary,
.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.3);
}

.badge--info,
.badge-info,
.bg-info {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
}

.badge--muted,
.badge-muted {
    background: rgba(107, 114, 128, 0.15);
    color: var(--text-muted);
    border-color: rgba(107, 114, 128, 0.3);
}

.badge--secondary,
.badge-secondary,
.bg-secondary {                        /* bg-secondary: legacy Bootstrap alias */
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.3);
}

/* -- State modifiers (previously undefined — now properly defined) -- */
.badge--active,
.global-badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge--locked,
.global-badge-locked {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.badge--pinned,
.global-badge-pinned {
    background: rgba(16, 185, 129, 0.12);
    color: var(--secondary);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge--danger-state,
.global-badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge--warning-state,
.global-badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* -- Label variant: tighter, used inline next to titles (replaces .global-badge) -- */
.badge--label,
.global-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border);
    line-height: 1.4;
}

/* --- Pagination --- */
.pagination a,
.global-pagination a {
    display: inline-block;
    padding: 6px 10px;
    margin: 0 2px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all 0.2s;
    text-decoration: none;
}

.pagination a:hover,
.pagination a.active,
.global-pagination a:hover,
.global-pagination a.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* --- Markdown Toolbar --- */
.markdown-toolbar {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 8px;
    display: flex;
    gap: 4px;
}

.btn-toolbar__item,
.btn-toolbar-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toolbar__item:hover,
.btn-toolbar-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Footer */
.app-footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
}

/* Helper for mobile responsiveness */
@media (max-width: 768px) {
    .post__meta,
    .post-meta-left {
        flex-wrap: wrap;
        gap: 5px;
    }

    .post__date,
    .post-date {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
        width: 100%;
        font-size: 0.75rem;
    }
}


/* Edit Container Fix */
.post__edit,
.edit-post-container {
    max-width: 100%;
    /* Ensure it doesn't overflow parent */
    width: 100%;
    margin-top: 10px;
    padding: 0 15px 15px 15px;
    /* Added padding to match post content */
    box-sizing: border-box;
}

/* --- Shadow Delete Styling --- */
.post--deleted,
.table-row--deleted,
.global-row-shadow-deleted,
.global-post-shadow-deleted {
    opacity: 0.5;
    filter: grayscale(0.5);
    background: rgba(139, 0, 0, 0.05) !important;
    border: 1px dashed rgba(239, 68, 68, 0.4) !important;
    position: relative;
    box-shadow: inset 0 0 15px rgba(239, 68, 68, 0.1) !important;
}

.global-row-shadow-deleted:hover {
    opacity: 0.7;
    background: rgba(139, 0, 0, 0.1) !important;
}

/* --- Loader / Spinner --- */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader,
.global-loader {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
    flex-shrink: 0;
}


/* --- Alert Component --- */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.92rem;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert--danger,
.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.alert--warning,
.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}

.alert--success,
.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

.alert--info,
.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

.post__edit textarea,
.edit-post-container textarea {
    max-width: 100%;
    box-sizing: border-box;
    resize: vertical;
}

/* --- Blockquotes --- */
blockquote {
    border-left: 4px solid var(--primary);
    background: rgba(255, 255, 255, 0.05);
    margin: 10px 0;
    padding: 10px 15px;
    border-radius: 0 6px 6px 0;
    color: var(--text-muted);
    font-style: italic;
}

blockquote p {
    margin: 0;
}

blockquote strong {
    color: var(--text-main);
    font-style: normal;
    display: block;
    margin-bottom: 5px;
}

blockquote strong::after {
    content: " said:";
    font-weight: 400;
    color: var(--text-muted);
}

/* Global Modal Styles */
/* =============================================================================
   MODAL COMPONENT  —  BEM: .modal (block)  /  .modal__{element} (elements)
   Old .global-modal-* names kept as aliases during template rollout.
   IDs (#global-modal, #global-modal-title etc.) are NOT changed — JS uses them.
   ============================================================================= */
.modal,
.global-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal__backdrop,
.global-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal__card,
.global-modal-card {
    position: relative;
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.modal__header,
.global-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.modal__header h3,
.global-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: white;
}

.modal__close,
.global-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0 4px;
}

.modal__close:hover,
.global-modal-close:hover {
    color: white;
}

.modal__body,
.global-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal__footer,
.global-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Markdown Editor Enhancements */
.markdown-toolbar {
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px;
    border-radius: 8px 8px 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
}

.btn-toolbar__item,
.btn-toolbar-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toolbar__item:hover,
.btn-toolbar-item:hover {
    background: var(--primary-glass);
    color: white;
    border-color: var(--primary);
}

/* --- Notifications & Modern Icons --- */
.nav__icon-container,
.nav-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    color: var(--text-muted);
}

.nav__icon-container:hover,
.nav-icon-container:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.nav__badge,
.nav-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-main);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    padding: 15px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    text-decoration: none !important;
    color: inherit !important;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
    transform: translateX(5px);
}

.notification-item--unread,
.notification-item.unread {
    background: rgba(59, 130, 246, 0.05);
    border-left: 4px solid var(--primary);
}

.notification-item__content,
.notification-item .content {
    flex: 1;
}

.notification-item__message,
.notification-item .message {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: var(--text-main);
}

.notification-item__time,
.notification-item .time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.notification-item__actions,
.notification-item .actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.notification-item:hover .notification-item__actions,
.notification-item:hover .actions {
    opacity: 1;
}

.notification-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.notification-item__delete,
.btn-delete-single {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #f87171;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

.notification-item__delete:hover,
.btn-delete-single:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.notification-item {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.notification-wrapper:hover .notification-item {
    border-color: rgba(59, 130, 246, 0.5) !important;
    background: rgba(255, 255, 255, 0.05);
}

/* Slot Banner */
.slot-banner {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.slot-banner__info,
.slot-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slot-banner__icon,
.slot-icon {
    font-size: 1.5rem;
}


/* --- Custom Haptic Tooltips --- */
.tooltip,
.gs-tooltip {
    position: fixed;
    z-index: 10000;
    padding: 8px 12px;
    background: rgba(21, 32, 43, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-hover);
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.95) translateY(5px);
    transition: opacity 0.1s ease, transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}


.tooltip.active,
.gs-tooltip.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* --- Support System Styling --- */
.support-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
}

.support-status-badge--open,
.support-status-open {
    background: var(--danger);
}

.support-status-badge--pending,
.support-status-pending {
    background: var(--secondary);
}

/* --- Footer Socials --- */
.footer-socials {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.footer-brand__socials,
.footer-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer-brand__social-link,
.footer-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.footer-brand__social-link:hover,
.footer-icon-circle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.footer-brand__social-icon,
.social-icon {
    width: 14px;
    height: 14px;
}

.support-status-badge--answered,
.support-status-answered {
    background: var(--primary);
}

.support-status-badge--closed,
.support-status-closed {
    background: var(--text-muted);
}

.support-pagination {
    display: flex;
    gap: 8px;
    margin-top: 30px;
    justify-content: center;
    align-items: center;
}

.support-pagination__item,
.support-pagination-item {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.03);
}

.support-pagination__item:hover,
.support-pagination-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: var(--text-muted);
}

.support-pagination__item--active,
.support-pagination-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.support-thread {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.support-thread__message,
.support-message-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    border-radius: 16px;
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 88%;
}

.support-thread__message--user,
.support-user-message {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-left: 5px solid var(--border);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.support-thread__message--admin,
.support-admin-reply {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.04) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-right: 5px solid var(--primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.support-thread__message-header,
.support-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
    margin-bottom: 5px;
}

.support-thread__message-author,
.support-message-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.support-thread__avatar,
.support-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    padding: 2px;
    background: var(--bg-main);
    border: 2px solid var(--border);
}

.support-thread__message--admin .support-thread__avatar,
.support-admin-reply .support-avatar {
    border-color: var(--primary);
}

.support-thread__staff-badge,
.support-staff-badge {
    font-size: 0.65rem;
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 8px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.support-thread__message-content,
.support-message-content {
    line-height: 1.7;
    white-space: pre-wrap;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.95);
}

.support-modal__backdrop,
.support-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    overflow-y: auto;
    padding: 40px 20px;
}

.support-modal__container,
.support-modal-container {
    max-width: 900px;
    margin: 40px auto;
    background: rgba(20, 20, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
}

.support-header__actions,
.support-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.support-header__labels,
.support-label-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
}

.support-header__id,
.support-id-display {
    text-align: right;
}

.support-header__id-label,
.support-id-label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.support-header__id-value,
.support-id-value {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* --- Card Images (Background) --- */
.card__image,
.card-image {
    width: 100%;
    height: 150px;
    background-size: cover;
    background-position: center;
    background-color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 3rem;
    transition: transform 0.4s ease;
    border-radius: var(--radius) var(--radius) 0 0;
}

.card:hover .card__image,
.card:hover .card-image {
    transform: scale(1.05);
}

/* --- Giveaway Card Redesign --- */
.ga-card {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
    position: relative;
}

.ga-card__img-link {
    display: block;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    text-decoration: none;
}

.ga-card__price {
    position: absolute;
    top: 9px;
    right: 9px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.35);
    letter-spacing: 0.02em;
    line-height: 1.5;
    pointer-events: none;
}

.ga-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 13px 14px 13px;
    min-width: 0;
}

.ga-card__title {
    font-size: 0.98rem;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ga-card__title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.15s;
}

.ga-card__title a:hover {
    color: var(--secondary);
}

.ga-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.ga-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.ga-tag--bundle {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

.ga-tag--dlc {
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
}

.ga-tag--private {
    background: rgba(147, 51, 234, 0.12);
    color: #a855f7;
    border-color: rgba(147, 51, 234, 0.3);
}

.ga-tag--region {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.ga-tag--level {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.25);
}

.ga-card__creator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.81rem;
    color: var(--text-muted);
    min-width: 0;
}

.ga-card__creator a {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.15s;
    min-width: 0;
    overflow: hidden;
}

.ga-card__creator a:hover {
    color: white;
}

.ga-card__creator-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.ga-card__bull {
    opacity: 0.35;
    flex-shrink: 0;
}

.ga-card__timer {
    flex-shrink: 0;
    white-space: nowrap;
}

.ga-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    border-top: 1px solid var(--border);
    font-size: 0.81rem;
    background: rgba(255, 255, 255, 0.018);
    flex-shrink: 0;
}

.ga-card__status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.ga-card__status--active  { color: var(--secondary); }
.ga-card__status--cancelled { color: #ef4444; }
.ga-card__status--ended   { color: var(--text-muted); }

.ga-card__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.ga-card__status--active .ga-card__dot {
    background: var(--secondary);
    box-shadow: 0 0 5px rgba(16, 185, 129, 0.7);
}

.ga-card__status--cancelled .ga-card__dot { background: #ef4444; }
.ga-card__status--ended .ga-card__dot     { background: var(--text-muted); }

.ga-card__copies {
    color: var(--text-muted);
}

/* --- Giveaway Hero (Details Page) --- */
.giveaway-hero {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    background-color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 5rem;
    /* Reasonably big */
    transition: opacity 0.2s;
    border-radius: 12px;
    /* Match container */
}

.giveaway-hero:hover {
    opacity: 0.9;
}

/* --- Responsive Design (Mobile) --- */
.mobile-menu-toggle {
    display: none;
    font-size: 1.4rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 900px) {

    /* Header */
    .app-header {
        height: auto;
        min-height: var(--header-height);
        padding: 10px 0;
    }

    .app-header__content,
    .header-content {
        flex-wrap: wrap;
    }

    .mobile-menu-toggle {
        display: block;
        order: 1;
        /* Logo is 0 */
    }

    .header-menu-container {
        display: none;
        width: 100%;
        order: 2;
        flex-direction: column;
        margin-top: 15px;
        border-top: 1px solid var(--border);
        padding-top: 15px;
        animation: slideDown 0.3s ease-out;
    }

    .header-menu-container.active {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 15px;
        margin-bottom: 20px;
    }

    .nav-link {
        display: block;
        padding: 5px 0;
        font-size: 1.1rem;
    }

    .nav-link.active::after {
        display: none;
        /* Remove bottom bar on mobile */
    }

    .user-menu {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: center;
        gap: 15px;
        order: 2;
        /* Ensure it's inside the flex container if needed, but flex-direction is set on user-menu */
    }

    .user-menu .dropdown {
        width: auto;
    }

    .user-menu .dropdown-toggle {
        width: auto;
        justify-content: flex-start;
    }

    /* Forums Table Responsive */
    .data-table,
    .global-table {
        display: block;
        width: 100%;
    }

    .data-table thead,
    .global-table thead {
        display: none;
        /* Hide headers */
    }

    .data-table tbody,
    .data-table tr,
    .data-table td,
    .global-table tbody,
    .global-table tr,
    .global-table td {
        display: block;
        width: 100%;
    }

    .table-row,
    .global-row {
        margin-bottom: 15px;
        border-radius: 8px;
        position: relative;
        padding-bottom: 10px;
        height: auto !important;
        /* Override fixed height */
    }

    .table-row td,
    .global-row td {
        border: none;
        padding: 10px 15px;
        text-align: left;
        height: auto;
    }

    .table-row td:first-child,
    .global-row td:first-child {
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
        border-bottom-left-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: flex;
        justify-content: flex-start;
        align-items: center;
        background: rgba(0, 0, 0, 0.2);
    }

    .table-row td:last-child,
    .global-row td:last-child {
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
    }

    /* Adjust specific columns */
    .data-table__header,
    .global-table-header {
        display: none;
    }

    .forum__stats,
    .stats-cell {
        text-align: left !important;
        font-size: 0.85rem;
        color: var(--text-muted);
        padding-top: 0 !important;
    }

    .forum__stats::before,
    .stats-cell::before {
        content: "Stat: ";
        font-weight: bold;
    }

    .forum__last-post,
    .last-post-cell {
        text-align: left !important;
        padding-top: 0 !important;
    }

    .forum__last-post::before,
    .last-post-cell::before {
        content: "Last Post: ";
        font-weight: bold;
        color: var(--text-muted);
    }

    /* Hide less important elements if needed */
    .forum__desc,
    .forum-desc {
        font-size: 0.85rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Fix Desktop Menu Layout */
@media (min-width: 901px) {
    .header-menu-container {
        display: flex;
        align-items: center;
        flex-grow: 1;
        justify-content: space-between;
        margin-left: 30px;
        /* Space from logo */
    }
}

/* Fix Mobile Dropdown - Revert to absolute for inline menu */
@media (max-width: 900px) {
    .user-menu .dropdown-menu {
        position: absolute;
        /* Revert to absolute */
        width: auto;
        /* Reset width */
        min-width: 180px;
        right: 0;
        left: auto;
        margin-top: 10px;
        background: var(--bg-glass-heavy);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
        border: 1px solid var(--border);
    }

    .user-menu .dropdown.active .dropdown-menu {
        display: block;
        animation: dropdownFadeIn 0.2s ease-out;
        /* Restore animation */
    }
}

/* --- Responsive Design for Giveaway Details --- */
@media (max-width: 900px) {

    /* Target the grid container in giveaway_details.twig */
    .giveaway-grid-container {
        grid-template-columns: 1fr !important;
        /* Stack columns */
    }

    /* Reset width for sidebar/content */
    .giveaway-sidebar {
        width: 100% !important;
        position: static !important;
        /* Remove sticky on mobile */
    }
}

/* --- Section Headers (Responsive) --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Align to top to handle multi-line titles */
    gap: 20px;
    margin-bottom: 30px;
}

.section-header__info,
.section-header-info {
    flex: 1;
    min-width: 0;
    /* Important for text-overflow */
}

.section-header__info h1,
.section-header-info h1 {
    margin: 0;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.section-header__actions,
.section-header-actions {
    display: flex;
    gap: 20px;
    /* Increased from 10px */
    align-items: stretch;
    /* Force all buttons/search to same height */
    flex-shrink: 0;
}

/* Responsive Forum Search */
.search-form {
    display: flex;
    gap: 8px;
    width: auto;
    flex: 1;
    max-width: 600px;
    /* Better desktop width */
    align-items: stretch;
    /* Match height of input and button */
}

.search-form__input,
.search-input {
    flex: 7;
    /* Occupy ~70% of the form */
    min-width: 150px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    color: white !important;
    outline: none !important;
    transition: 0.3s !important;
}

.search-form .btn {
    flex: 2;
    /* Occupy ~20% of the form */
    white-space: nowrap;
    padding: 10px !important;
}

.search-form__input:focus,
.search-input:focus {
    border-color: var(--primary) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .section-header__actions,
    .section-header-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .search-form {
        width: 100%;
        max-width: none;
    }

    .search-form__input,
    .search-input {
        width: 100% !important;
    }

    .section-header__actions .btn,
    .section-header-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════
   Giveaway list — search + filter controls
═══════════════════════════════════════════════ */

.ga-controls {
    margin: 36px 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Search row */
.ga-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 640px;
}

.ga-search-form__wrap,
.ga-search-wrap {
    position: relative;
    flex: 1;
}

.ga-search-form__icon,
.ga-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.85rem;
}

.ga-search-form__input,
.ga-search-input {
    width: 100%;
    padding: 10px 16px 10px 38px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.ga-search-form__input::placeholder,
.ga-search-input::placeholder {
    color: var(--text-muted);
}

.ga-search-form__input:focus,
.ga-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: rgba(25, 39, 52, 0.85);
}

.ga-search-form__btn,
.ga-search-btn {
    border-radius: 8px;
    padding: 10px 18px;
    white-space: nowrap;
    font-size: 0.9rem;
}

.ga-search-form__clear,
.ga-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: transparent;
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ga-search-form__clear:hover,
.ga-clear-btn:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
}

/* Filter bar */
.ga-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
}

.ga-filter-bar__group,
.ga-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ga-filter-bar__label,
.ga-filter-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    white-space: nowrap;
    padding-right: 4px;
}

.ga-filter-bar__pills,
.ga-filter-pills {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.ga-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    text-decoration: none;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
    white-space: nowrap;
    cursor: pointer;
}

.ga-pill:hover {
    border-color: rgba(59, 130, 246, 0.5);
    color: white;
    background: rgba(59, 130, 246, 0.08);
}

.ga-pill--active {
    background: rgba(59, 130, 246, 0.18);
    border-color: var(--primary);
    color: white;
}

.ga-pill--active:hover {
    background: rgba(59, 130, 246, 0.28);
}

/* Separator between sort group and toggle */
.ga-filter-bar__sep,
.ga-filter-sep {
    width: 1px;
    height: 22px;
    background: var(--border);
    flex-shrink: 0;
}

/* Exclude-entered toggle */
.ga-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.18s;
    white-space: nowrap;
}

.ga-toggle:hover {
    border-color: rgba(16, 185, 129, 0.5);
    color: white;
    background: rgba(16, 185, 129, 0.08);
}

.ga-toggle--active {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--secondary);
    color: var(--secondary);
}

.ga-toggle--active:hover {
    background: rgba(16, 185, 129, 0.25);
}

/* Results meta + active filter tags */
.ga-results-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.ga-results-meta__count,
.ga-results-count {
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.ga-results-meta__filters,
.ga-active-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ga-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #93c5fd;
}

.ga-active-tag--green {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

.ga-active-tag__remove {
    display: inline-flex;
    align-items: center;
    color: inherit;
    opacity: 0.6;
    text-decoration: none;
    transition: opacity 0.15s;
    font-size: 0.7rem;
    margin-left: 2px;
}

.ga-active-tag__remove:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .ga-search-form {
        max-width: 100%;
    }

    .ga-filter-bar {
        gap: 8px;
        padding: 10px 12px;
    }

    .ga-filter-bar__sep,
    .ga-filter-sep {
        display: none;
    }

    .ga-filter-bar__label,
    .ga-filter-label {
        display: none;
    }
}

/* ── Giveaway view toggle (card / compact) ─────────────────────────────── */

.ga-view-toggle {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-bottom: 16px;
    justify-content: flex-end;
}

.ga-view-toggle__btn,
.ga-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.18s ease;
}

.ga-view-toggle__btn:hover,
.ga-view-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

.ga-view-toggle__btn--active,
.ga-view-btn--active {
    background: rgba(99, 102, 241, 0.18);
    border-color: var(--primary);
    color: var(--primary);
}

/* ── Compact list view ──────────────────────────────────────────────────── */

.ga-compact-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ga-compact-row {
    position: relative;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(15, 20, 35, 0.6);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

/* Left-edge accent on hover */
.ga-compact-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 2;
    border-radius: 10px 0 0 10px;
}

.ga-compact-row:hover::before {
    opacity: 1;
}

.ga-compact-row:hover {
    border-color: rgba(99, 102, 241, 0.45);
    background: rgba(20, 27, 48, 0.75);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.ga-compact-row--glow {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.14);
}

.ga-compact-row--glow::before {
    background: #10b981;
}

.ga-compact-row--glow:hover {
    border-color: rgba(16, 185, 129, 0.65);
    background: rgba(16, 185, 129, 0.05);
    box-shadow: 0 2px 20px rgba(16, 185, 129, 0.18);
}

/* Game art as faded full-row background */
.ga-compact-row__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.09;
    filter: blur(4px) saturate(1.2);
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.ga-compact-row:hover .ga-compact-row__bg {
    opacity: 0.14;
}

.ga-compact-row__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(8, 12, 24, 0.88) 0%,
        rgba(8, 12, 24, 0.45) 35%,
        rgba(8, 12, 24, 0.65) 100%
    );
}

/* Content row sits above the bg */
.ga-compact-row__content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px 10px 14px;
    min-height: 64px;
}

/* Thumbnail */
.ga-compact-row__thumb {
    flex-shrink: 0;
    width: 84px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.ga-compact-row__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Title + tags */
.ga-compact-row__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ga-compact-row__title {
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    transition: color 0.15s ease;
}

.ga-compact-row:hover .ga-compact-row__title {
    color: #fff;
}

.ga-compact-row__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    line-height: 1;
}

.ga-compact-row__tags .ga-tag {
    font-size: 0.67rem;
    padding: 2px 7px;
    letter-spacing: 0.01em;
}

/* Hide tag text label on very narrow info column */
.ga-tag__label,
.ga-tag-label {
    display: inline;
}

/* Creator */
.ga-compact-row__creator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
    min-width: 100px;
}

/* Timer */
.ga-compact-row__timer {
    flex-shrink: 0;
    font-size: 0.79rem;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 88px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Cost badge */
.ga-compact-row__cost {
    flex-shrink: 0;
}

.ga-compact-row__cost-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(99, 102, 241, 0.32);
    color: #a5b4fc;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

/* Copies */
.ga-compact-row__copies {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Status dot */
.ga-compact-row__status {
    flex-shrink: 0;
}

/* Standalone colored dots for compact view */
.ga-card__dot--active {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.ga-card__dot--cancelled {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.ga-card__dot--ended {
    background: var(--text-muted);
}

/* Responsive — compact view */
@media (max-width: 1000px) {
    /* Hide text label from tags, keep icon+title tooltip */
    .ga-tag__label,
    .ga-tag-label {
        display: none;
    }

    .ga-compact-row__tags .ga-tag {
        padding: 2px 5px;
    }
}

@media (max-width: 900px) {
    .ga-compact-row__creator {
        display: none;
    }
}

@media (max-width: 700px) {
    .ga-compact-row__copies {
        display: none;
    }
}

@media (max-width: 640px) {
    .ga-compact-row__thumb {
        width: 58px;
        height: 36px;
    }

    .ga-compact-row__timer {
        min-width: 62px;
        font-size: 0.74rem;
    }

    .ga-compact-row__content {
        padding: 8px 10px;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .ga-compact-row__thumb {
        display: none;
    }

    .ga-compact-row__timer {
        display: none;
    }
}

/* Enhanced Mini Profile */
.mini-profile-card {
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    width: 310px;
    color: white;
    position: absolute;
    z-index: 10001;
    display: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    pointer-events: auto;
}

.mini-profile-card.active {
    display: block;
    animation: miniProfileIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mini-profile-card.persistent {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

@keyframes miniProfileIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.mini-profile-content {
    padding: 20px;
}

.mini-profile-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.mini-profile-avatar-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.mini-profile-avatar-wrapper img {
    border-radius: 10px;
}

/* Fix for profile-like tags */
.mini-profile-avatar-wrapper .lvl-tag {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 0.65rem;
    padding: 1px 6px;
    min-width: 32px;
}

.mini-profile-user-info {
    flex: 1;
    min-width: 0;
}

.mini-profile-username {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-profile-rank-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    line-height: 1.4;
    flex-wrap: wrap;
}

.lvl-text {
    font-weight: 700;
}

.mini-profile-role {
    font-weight: 700;
}

.mini-profile-joined {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
    opacity: 0.6;
}

/* Featured Achievement — Mini Profile */
a.mini-profile-featured-ach {
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s;
}

a.mini-profile-featured-ach:hover {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.12);
}

/* Mini-profile featured achievement — per-gradient container tints */
.mini-profile-featured-ach.ach-featured--purple  { background: rgba(139, 92,  246, 0.08); border-color: rgba(139, 92,  246, 0.2); }
.mini-profile-featured-ach.ach-featured--pink    { background: rgba(236, 72,  153, 0.08); border-color: rgba(236, 72,  153, 0.2); }
.mini-profile-featured-ach.ach-featured--rose    { background: rgba(244, 63,  94,  0.08); border-color: rgba(244, 63,  94,  0.2); }
.mini-profile-featured-ach.ach-featured--red     { background: rgba(239, 68,  68,  0.08); border-color: rgba(239, 68,  68,  0.2); }
.mini-profile-featured-ach.ach-featured--orange  { background: rgba(249, 115, 22,  0.08); border-color: rgba(249, 115, 22,  0.2); }
.mini-profile-featured-ach.ach-featured--gold    { background: rgba(245, 158, 11,  0.08); border-color: rgba(245, 158, 11,  0.2); }
.mini-profile-featured-ach.ach-featured--green   { background: rgba(16,  185, 129, 0.08); border-color: rgba(16,  185, 129, 0.2); }
.mini-profile-featured-ach.ach-featured--teal    { background: rgba(13,  148, 136, 0.08); border-color: rgba(13,  148, 136, 0.2); }
.mini-profile-featured-ach.ach-featured--indigo  { background: rgba(99,  102, 241, 0.08); border-color: rgba(99,  102, 241, 0.2); }

a.mini-profile-featured-ach.ach-featured--purple:hover  { border-color: rgba(139, 92,  246, 0.45); background: rgba(139, 92,  246, 0.12); }
a.mini-profile-featured-ach.ach-featured--pink:hover    { border-color: rgba(236, 72,  153, 0.45); background: rgba(236, 72,  153, 0.12); }
a.mini-profile-featured-ach.ach-featured--rose:hover    { border-color: rgba(244, 63,  94,  0.45); background: rgba(244, 63,  94,  0.12); }
a.mini-profile-featured-ach.ach-featured--red:hover     { border-color: rgba(239, 68,  68,  0.45); background: rgba(239, 68,  68,  0.12); }
a.mini-profile-featured-ach.ach-featured--orange:hover  { border-color: rgba(249, 115, 22,  0.45); background: rgba(249, 115, 22,  0.12); }
a.mini-profile-featured-ach.ach-featured--gold:hover    { border-color: rgba(245, 158, 11,  0.45); background: rgba(245, 158, 11,  0.12); }
a.mini-profile-featured-ach.ach-featured--green:hover   { border-color: rgba(16,  185, 129, 0.45); background: rgba(16,  185, 129, 0.12); }
a.mini-profile-featured-ach.ach-featured--teal:hover    { border-color: rgba(13,  148, 136, 0.45); background: rgba(13,  148, 136, 0.12); }
a.mini-profile-featured-ach.ach-featured--indigo:hover  { border-color: rgba(99,  102, 241, 0.45); background: rgba(99,  102, 241, 0.12); }

.mini-profile-featured-ach {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 16px;
    padding: 10px 12px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
}

.mini-profile-featured-ach__icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.mini-profile-featured-ach__info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.mini-profile-featured-ach__name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-profile-featured-ach__desc {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-profile-trust-section {
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.25);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.trust-label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trust-label {
    color: var(--text-muted);
}

.trust-value {
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.8rem;
    font-weight: 800;
}

.trust-value.trust-high { background: #10b981; }
.trust-value.trust-med { background: #f59e0b; }
.trust-value.trust-low { background: #ef4444; }
.trust-value.trust-neutral { background: #6b7280; }

.trust-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.trust-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.trust-high { background: linear-gradient(90deg, #10b981, #34d399); }
.trust-med { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.trust-low { background: linear-gradient(90deg, #ef4444, #f87171); }
.trust-neutral { background: linear-gradient(90deg, #6b7280, #9ca3af); }

.mini-profile-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.mini-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 0;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    flex-shrink: 0;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    margin-left: 8px;
}

.mini-profile-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 18px;
}

.modern-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border: none;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
    padding: 12px !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
}

.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    filter: brightness(1.1);
}

.mini-profile-card__close,
.mini-profile-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    font-size: 14px;
}

.mini-profile-card__close:hover,
.mini-profile-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* Level Colors for Minimal Design */
.lvl-color-0 { color: #10b981; }
.lvl-color-1 { color: #dfa168; }
.lvl-color-2 { color: #94a3b8; }
.lvl-color-3 { color: #eab308; }
.lvl-color-4 { color: #cbd5e1; }
.lvl-color-5 { color: #34d399; }
.lvl-color-6 { color: #f87171; }
.lvl-color-7 { color: #a7f3d0; }
.lvl-color-8 { color: #60a5fa; }
.lvl-color-9 { color: #d946ef; }
.lvl-color-10 { color: #c084fc; }

/* DLC base-game notice on giveaway detail page */
.dlc-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 8px;
    color: #93c5fd;
    font-size: 0.9rem;
    margin-bottom: 30px;
}
.dlc-notice a {
    color: #60a5fa;
    font-weight: 600;
    text-decoration: none;
}
.dlc-notice a:hover { text-decoration: underline; }

/* ── Achievement gradient helpers ─────────────────────────────────────────
   Generic icon background classes used on any icon container element across
   all pages (admin panel, mini-profile, settings, profile hero, etc.).
   ────────────────────────────────────────────────────────────────────────── */
.ach-gradient--blue    { background: linear-gradient(135deg, #3b82f6, #06b6d4) !important; box-shadow: 0 2px 8px rgba(59,  130, 246, 0.35) !important; color: #fff !important; }
.ach-gradient--purple  { background: linear-gradient(135deg, #8b5cf6, #a855f7) !important; box-shadow: 0 2px 8px rgba(139, 92,  246, 0.35) !important; color: #fff !important; }
.ach-gradient--pink    { background: linear-gradient(135deg, #ec4899, #f472b6) !important; box-shadow: 0 2px 8px rgba(236, 72,  153, 0.35) !important; color: #fff !important; }
.ach-gradient--rose    { background: linear-gradient(135deg, #f43f5e, #fb7185) !important; box-shadow: 0 2px 8px rgba(244, 63,  94,  0.35) !important; color: #fff !important; }
.ach-gradient--red     { background: linear-gradient(135deg, #ef4444, #f97316) !important; box-shadow: 0 2px 8px rgba(239, 68,  68,  0.35) !important; color: #fff !important; }
.ach-gradient--orange  { background: linear-gradient(135deg, #f97316, #fbbf24) !important; box-shadow: 0 2px 8px rgba(249, 115, 22,  0.35) !important; color: #fff !important; }
.ach-gradient--gold    { background: linear-gradient(135deg, #f59e0b, #fde047) !important; box-shadow: 0 2px 8px rgba(245, 158, 11,  0.4)  !important; color: #fff !important; }
.ach-gradient--green   { background: linear-gradient(135deg, #10b981, #34d399) !important; box-shadow: 0 2px 8px rgba(16,  185, 129, 0.35) !important; color: #fff !important; }
.ach-gradient--teal    { background: linear-gradient(135deg, #0d9488, #2dd4bf) !important; box-shadow: 0 2px 8px rgba(13,  148, 136, 0.35) !important; color: #fff !important; }
.ach-gradient--indigo  { background: linear-gradient(135deg, #6366f1, #818cf8) !important; box-shadow: 0 2px 8px rgba(99,  102, 241, 0.35) !important; color: #fff !important; }

/* ── Markdown media embeds (.md-media-embed) ─────────────────────────────── */
/* Wraps direct-image URLs from Imgur / PostImg / Giphy / Tenor.              */
/* background-image is used instead of <img> so large GIFs do not hang the   */
/* browser while loading — the image loads lazily via CSS background engine.  */

.md-media-embed {
    display: block;      /* block so parent width always constrains it */
    max-width: 280px;    /* never wider than this thumbnail size */
    margin: 8px 0;
    line-height: 0;      /* collapse descender gap */
}

.md-media-embed__bg {
    display: block;
    width: 100%;         /* fill .md-media-embed's constrained width */
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.04); /* placeholder until image loads */
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: zoom-in;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}

.md-media-embed__bg:hover {
    opacity: 0.88;
    border-color: var(--border-hover);
}

/* Zoom overlay */
#md-zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

#md-zoom-overlay.md-zoom--active {
    display: flex;
}

.md-zoom-overlay__media {
    width: min(90vw, 960px);
    height: min(85vh, 720px);
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Close hint */
#md-zoom-overlay::after {
    content: "✕  click to close";
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
    letter-spacing: 0.5px;
}

