.forum-page {
    background: transparent; /* Let global body background show through */
    padding-bottom: 80px;
}

.forum-hero {
    padding: 80px 20px 76px;
    position: relative;
    min-height: 250px;
    margin-bottom: 5px;
}

.forum-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 470px;
    background: linear-gradient(145deg, rgba(5, 7, 13, 0.85), rgba(10, 14, 24, 0.85)), url('/assets/images/forum-bg.jpg');
    background-size: cover;
    background-position: center;
    clip-path: url(#hero-mask);
    z-index: 1;
    pointer-events: none;
}

/* Add texture overlay to hero if needed, or rely on transparency */

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    align-items: stretch;
    position: relative;
    z-index: 2;
    margin-top: -60px;
}

.forum-hero .hero-content {
    padding: 32px;
    background: rgba(20, 20, 20, 0.8);
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.9rem;
    color: #d4af37;
    margin: 0 0 10px;
    font-weight: bold;
}

.hero-content h1 {
    margin: 0 0 15px;
    font-family: 'norsebold', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-copy {
    margin: 0 0 25px;
    color: #ccc;
    line-height: 1.6;
    font-size: 1.1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.forum-page .btn {
    display: inline-block;
    border: none;
    border-radius: 2px;
    padding: 12px 26px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Segoe UI', sans-serif;
}

.forum-page .btn-primary {
    background: #d4af37;
    color: #10121c;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

.forum-page .btn-primary:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.forum-page .btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.forum-page .btn-ghost:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 15px;
    margin: 0;
}

.hero-stats div {
    background: rgba(0, 0, 0, 0.4);
    padding: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-stats dt {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888;
    margin: 0 0 6px;
}

.hero-stats dd {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #d4af37;
}

.hero-search {
    background: rgba(20, 20, 20, 0.8);
    padding: 24px;
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
}

.search-field {
    position: relative;
}

.search-field i {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    color: #888;
}

.search-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 18px 14px 50px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    color: #fff;
    font-size: 1rem;
}

.search-field input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.5);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.forum-search-status {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 15px 25px;
    border-radius: 4px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
}

.reset-search {
    color: #d4af37;
    font-weight: 600;
}

.forum-content {
    max-width: 1200px;
    margin: 30px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    padding: 0 20px;
}

/* Only apply negative margin when forum-hero exists (on index page) */
.forum-hero ~ .forum-content {
    margin-top: -70px;
}

.forum-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.forum-section {
    background: rgba(20, 20, 20, 0.9);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
}

.section-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #d4af37;
    margin: 0 0 5px;
    font-size: 0.75rem;
    font-weight: bold;
}

.section-header h2 {
    margin: 0;
    font-family: 'norsebold', sans-serif;
    font-size: 2rem;
    color: #fff;
}

.section-description {
    margin: 8px 0 0;
    color: #aaa;
    max-width: 650px;
}

.section-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #888;
    font-size: 0.85rem;
}

.section-meta i {
    margin-right: 6px;
    color: #d4af37;
}

.forum-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.forum-card {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 22px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: flex-start;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.forum-card:hover {
    transform: translateY(-2px);
    border-color: #d4af37;
}

.forum-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    background: rgba(212, 175, 55, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4af37;
    font-size: 1.4rem;
}

.forum-card-icon i {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-style: normal;
}

.forum-card-body h3 {
    margin: 0 0 6px;
    font-size: 1.2rem;
    font-family: 'norsebold', sans-serif;
}

.forum-card-body h3 a {
    color: #fff;
    text-decoration: none;
}

.forum-card-body h3 a:hover {
    color: #d4af37;
}

.forum-card-body p {
    margin: 0 0 12px;
    color: #ccc;
    line-height: 1.5;
    font-size: 0.95rem;
}

.forum-card-headline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.forum-card-activity {
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
}

.forum-subforums {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.subforum-pill {
    padding: 4px 12px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: #aaa;
    text-decoration: none;
    background: rgba(0,0,0,0.2);
}

.subforum-pill:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.forum-card-stats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.forum-card-stats .label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.08em;
}

.forum-card-stats .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #d4af37;
}

.forum-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 10;
}

.sidebar-card {
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 24px;
}

.sidebar-card h3 {
    margin: 0 0 20px;
    font-family: 'norsebold', sans-serif;
    color: #d4af37;
    font-size: 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.latest-posts, .trending-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.latest-posts li a,
.trending-list li a {
    display: block;
    padding: 12px 14px;
    border-radius: 4px;
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid transparent;
    text-decoration: none;
}

.latest-posts li a:hover,
.trending-list li a:hover {
    border-color: #d4af37;
    background: rgba(30, 30, 30, 0.8);
}

.latest-posts .title {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
}

.latest-posts .excerpt {
    display: block;
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 6px;
}

.latest-posts .meta {
    font-size: 0.75rem;
    color: #666;
}

.trend-name {
    display: block;
    font-weight: 600;
    color: #fff;
}

.trend-meta {
    font-size: 0.8rem;
    color: #888;
}

.support-card p,
.guides-card p {
    color: #ccc;
    line-height: 1.5;
}

.guides-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guides-card li a {
    color: #ddd;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    transition: color 0.2s;
}

.guides-card li a:hover {
    color: #d4af37;
}

.support-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.forum-empty {
    text-align: center;
    padding: 60px 20px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
}

.forum-empty h2 {
    margin-top: 0;
    font-family: 'norsebold', sans-serif;
    color: #fff;
}

.muted {
    color: #666;
}

@media (max-width: 1100px) {
    .forum-content {
        grid-template-columns: 1fr;
    }

    .forum-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-card {
        flex: 1 1 320px;
    }
}

@media (max-width: 768px) {
    .hero-inner {
        grid-template-columns: 1fr !important;
        gap: 20px;
        padding: 80px 15px 20px;
        margin-top: 0;
    }

    .forum-content {
        grid-template-columns: 1fr !important;
        padding: 0 10px;
        gap: 15px;
        max-width: 100%;
    }

    .forum-main {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        gap: 15px;
    }

    .forum-section {
        padding: 15px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .hero-content,
    .hero-search,
    .sidebar-card {
        padding: 15px;
        max-width: 100%;
        box-sizing: border-box;
    }

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

    .forum-card-stats {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
    }

    .forum-search-status {
        flex-direction: column;
        text-align: center;
    }

    .forum-category-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .forum-card {
        padding: 15px;
    }
}

/* Category View Styles */
.forum-header-wrapper {
    background: rgba(20, 20, 20, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0;
    margin-bottom: 30px;
}

.forum-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.forum-breadcrumbs {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.forum-breadcrumbs a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}

.forum-breadcrumbs a:hover {
    color: #d4af37;
}

.forum-breadcrumbs .separator {
    color: #444;
    font-size: 0.8rem;
}

.forum-breadcrumbs .current {
    color: #fff;
    font-weight: 600;
}

.category-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.category-info {
    flex: 1;
    min-width: 0;
}

.category-actions {
    flex-shrink: 0;
    align-self: flex-start;
}

.category-info h1 {
    font-family: 'norsebold', sans-serif;
    font-size: 2.5rem;
    color: #fff;
    margin: 0 0 10px;
}

.category-description {
    color: #aaa;
    margin: 0;
    font-size: 1rem;
    max-width: 800px;
}

.forum-thread-list {
    display: flex;
    flex-direction: column;
    gap: 2px; /* Small gap for list feel */
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.thread-item {
    display: grid;
    grid-template-columns: 60px 1fr 120px 200px;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(30, 30, 30, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    align-items: center;
    transition: background 0.2s;
}

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

.thread-item:hover {
    background: rgba(40, 40, 40, 0.6);
}

.thread-avatar {
    display: flex;
    justify-content: center;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    color: #d4af37;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.thread-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.thread-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.thread-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.thread-title a:hover {
    color: #d4af37;
}

.thread-meta {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    gap: 10px;
}

.thread-meta i {
    margin-right: 4px;
    color: #666;
}

.thread-stats {
    display: flex;
    justify-content: center;
}

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

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ddd;
}

.stat-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
}

.thread-last-post {
    text-align: right;
    font-size: 0.85rem;
}

.last-post-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.last-post-date {
    color: #aaa;
}

.last-post-user {
    color: #d4af37;
}

.sidebar-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sidebar-stats div {
    background: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.sidebar-stats dt {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.sidebar-stats dd {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

@media (max-width: 768px) {
    .category-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .thread-item {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
    }
    
    .thread-avatar, .thread-stats, .thread-last-post {
        display: none; /* Simplify for mobile or rearrange */
    }
    
    .thread-main {
        width: 100%;
    }
}

/* Topic View Styles */
.topic-meta-header {
    display: flex;
    gap: 15px;
    color: #aaa;
    font-size: 0.9rem;
    margin-top: 5px;
}

.topic-meta-header i {
    color: #d4af37;
    margin-right: 5px;
}

.topic-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.forum-post {
    display: grid;
    grid-template-columns: 200px 1fr;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.post-sidebar {
    background: rgba(30, 30, 30, 0.4);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.avatar-circle.large {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.user-details .username {
    display: block;
    font-weight: bold;
    color: #d4af37;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.user-details .user-role {
    display: block;
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
}

.post-content-wrapper {
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #888;
    font-size: 0.85rem;
}

.post-body {
    flex: 1;
    color: #ddd;
    line-height: 1.7;
    font-size: 1rem;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.post-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: flex-end;
}

.reply-section {
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 30px;
    margin-top: 30px;
}

.reply-section h3 {
    margin-top: 0;
    color: #fff;
    font-family: 'norsebold', sans-serif;
}

.forum-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 15px;
    color: #fff;
    font-family: inherit;
    resize: vertical;
}

.forum-form textarea:focus {
    outline: none;
    border-color: #d4af37;
}

.login-to-reply {
    text-align: center;
    padding: 30px;
    background: rgba(20, 20, 20, 0.9);
    border-radius: 4px;
    margin-top: 30px;
    color: #aaa;
}

.login-to-reply a {
    color: #d4af37;
    text-decoration: none;
}

@media (max-width: 768px) {
    .forum-post {
        grid-template-columns: 1fr;
    }
    
    .post-sidebar {
        flex-direction: row;
        text-align: left;
        padding: 15px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        gap: 15px;
    }
    
    .avatar-circle.large {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-bottom: 0;
    }
    
    .post-content-wrapper {
        padding: 20px;
    }
}

/* Simple Editor Styles */
.simple-editor {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.editor-toolbar {
    background: rgba(40, 40, 40, 0.9);
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.editor-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #ccc;
    width: 32px;
    height: 32px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.editor-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.editor-btn:active {
    background: rgba(212, 175, 55, 0.2);
    color: #d4af37;
}

.toolbar-separator {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 5px;
}

.editor-content {
    min-height: 200px;
    padding: 15px;
    color: #ddd;
    outline: none;
    line-height: 1.6;
}

.editor-content:focus {
    background: rgba(0, 0, 0, 0.2);
}

.editor-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}

.editor-content ul, .editor-content ol {
    padding-left: 20px;
    margin: 10px 0;
}

.editor-content a {
    color: #d4af37;
    text-decoration: underline;
}

/* Forum Image Attachments & Lightbox */
.forum-attachment-preview {
    max-width: 300px !important;
    max-height: 300px !important;
    width: auto !important;
    height: auto !important;
    border-radius: 4px;
    cursor: zoom-in;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s, border-color 0.2s;
    display: block;
    margin: 10px 0;
}

.forum-attachment-full {
    max-width: 100%;
    width: auto;
    height: auto;
    border-radius: 4px;
    cursor: zoom-in;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
    margin: 10px 0;
}

.forum-attachment-preview:hover, .forum-attachment-full:hover {
    transform: scale(1.01);
    border-color: #d4af37;
}

/* Lightbox Overlay */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 95%;
    max-height: 95%;
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    border-radius: 2px;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: #d4af37;
}

/* Editor Modal */
.editor-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
    backdrop-filter: blur(3px);
}

.editor-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.editor-modal {
    background: #1e1e1e;
    border: 1px solid #d4af37;
    border-radius: 4px;
    padding: 25px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    position: relative;
}

.editor-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

.editor-modal-close:hover {
    color: #d4af37;
}

.editor-modal h3 {
    margin-top: 0;
    color: #d4af37;
    font-family: 'norsebold', sans-serif;
    font-size: 1.5rem;
}

.editor-modal p {
    color: #ccc;
    margin-bottom: 25px;
}

.editor-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.editor-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.2s;
}

.editor-modal-btn.primary {
    background: #d4af37;
    color: #000;
}

.editor-modal-btn.primary:hover {
    background: #fff;
}

.editor-modal-btn.secondary {
    background: #333;
    color: #fff;
    border: 1px solid #555;
}

.editor-modal-btn.secondary:hover {
    border-color: #d4af37;
    color: #d4af37;
}

/* Custom Select Styles */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select-trigger {
    position: relative;
    display: block;
    width: 100%;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

.custom-select-trigger:after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0; 
    height: 0; 
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #d4af37;
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: #d4af37;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #d4af37;
    border-top: 0;
    background: #1e1e1e;
    transition: all 0.2s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.custom-select-wrapper.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.custom-option {
    position: relative;
    display: block;
    padding: 10px 15px;
    font-size: 0.95rem;
    font-weight: 300;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-option:hover {
    background-color: #d4af37;
    color: #000;
}

.custom-option.selected {
    color: #d4af37;
    font-weight: bold;
    background-color: rgba(212, 175, 55, 0.1);
}

.custom-option.selected:hover {
    color: #000;
    background-color: #d4af37;
}

.custom-option-group {
    padding: 10px 15px;
    font-weight: bold;
    color: #d4af37;
    background: #252525;
    cursor: default;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Form Elements */
.forum-select {
    width: 100%;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23d4af37%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
    cursor: pointer;
    color-scheme: dark;
}

.forum-select:focus {
    outline: none;
    border-color: #d4af37;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
}

.forum-select option {
    background-color: #1e1e1e;
    color: #fff;
    padding: 10px;
}

.forum-select optgroup {
    background-color: #1e1e1e;
    color: #d4af37;
    font-weight: bold;
}

.forum-input {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 4px;
    box-sizing: border-box;
}

.forum-input:focus {
    outline: none;
    border-color: #d4af37;
}
