@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800;900&family=DM+Sans:wght@400;500;600;700&family=Orbitron:wght@500;700;900&display=swap');

:root {
    --bg: #060607;
    --panel: #0d0e11;
    --line: rgba(255, 45, 45, 0.18);
    --text: #e2dfdb;
    --muted: #8b8883;
    --red: #ff2a2a;
    --red-glow: rgba(255, 42, 42, 0.35);
    --white: #f5f3ef;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 125px;
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    width: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 14px;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
}

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    opacity: .08;
    background-image: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.5) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 3px 100%;
}

.topbar {
    height: 68px;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 max(4vw, 24px);
    position: sticky;
    top: 0;
    background: rgba(6, 6, 7, 0.94);
    backdrop-filter: blur(14px);
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.nav {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 36px;
    color: var(--muted);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.nav>a:hover {
    color: var(--red);
    text-shadow: 0 0 10px var(--red-glow);
}

.menu-toggle {
    display: none;
    position: absolute;
    left: 22px;
    background: none;
    border: 0;
    font-size: 22px;
    color: var(--text);
    cursor: pointer;
}

.hero {
    min-height: auto;
    padding-bottom: 0;
    position: relative;
    display: flex;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 30%, #1f0a0a 0%, #0d0707 40%, #060607 80%);
    border-bottom: 1px solid var(--line);
}

.hero-inner {
    width: min(780px, 90%);
    padding: 50px 0 30px;
    position: relative;
    z-index: 1;
}

.hero-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 28px;
    width: min(420px, 80%);
    filter: drop-shadow(0 0 25px rgba(255, 42, 42, 0.35));
}

.hero-logo-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.intro {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    letter-spacing: 0.12em;
    line-height: 1.75;
    color: #c9c5bf;
    margin: 0 auto 28px;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 13px 26px;
    border: 1px solid var(--line);
    border-radius: 2px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
}

.button-light {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    box-shadow: 0 0 12px rgba(255, 42, 42, 0.4);
}

.button-light:hover {
    background: #ff4d4d;
    box-shadow: 0 0 20px rgba(255, 42, 42, 0.7);
}

.news-container {
    max-width: 1480px;
    margin: 0 auto;
    padding: 60px max(4vw, 24px) 40px;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
}

.news-header h2 {
    font-family: 'Barlow Condensed', Impact, sans-serif;
    font-size: clamp(32px, 4vw, 48px);
    text-transform: uppercase;
    color: #fff;
    margin: 0;
    font-weight: 800;
}

.submit-toggle-btn {
    background: rgba(255, 42, 42, 0.15);
    border: 1px solid rgba(255, 42, 42, 0.5);
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 2px;
    cursor: pointer;
}

.news-submit-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 30px;
    position: relative;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    color: var(--red);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.form-control {
    background: #040404;
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 10px 14px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.form-actions {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.news-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 24px;
    position: relative;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.news-date {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    color: var(--red);
    letter-spacing: 0.1em;
}

.news-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 2px;
    text-transform: uppercase;
}

.news-title {
    font-family: 'Barlow Condensed', Impact, sans-serif;
    font-size: 24px;
    color: #fff;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.news-content {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.imperial-footer {
    background: #08090b;
    border-top: 1px solid var(--line);
    padding: 60px max(4vw, 24px) 30px;
    position: relative;
}

.footer-container {
    max-width: 1480px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo-flex {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-logo-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--red-glow));
}

.footer-brand-title {
    font-family: 'Barlow Condensed', Impact, sans-serif;
    font-size: 22px;
    color: #fff;
    text-transform: uppercase;
    margin: 0;
}

.footer-brand-desc {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
    max-width: 520px;
    margin: 0;
}

.footer-column-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--red);
    text-transform: uppercase;
    margin: 0 0 18px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--muted);
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    max-width: 1480px;
    margin: 30px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--muted);
}

.topbar-user-section {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    position: relative;
}

.user-icon-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.user-icon-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.user-dropdown-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--panel);
    border: 1px solid rgba(255, 42, 42, 0.4);
    border-radius: 4px;
    width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    z-index: 1000;
}

.user-dropdown-menu.open {
    display: flex;
}

.user-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    color: var(--muted);
    font-family: 'Orbitron', sans-serif;
}

.user-dropdown-item {
    background: none;
    border: none;
    padding: 12px 16px;
    text-align: left;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: block;
    font-family: inherit;
}

.user-dropdown-item:hover {
    background: rgba(255, 42, 42, 0.15);
    color: var(--red);
}

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-modal-card {
    background: var(--panel);
    border: 1px solid rgba(255, 42, 42, 0.4);
    width: 100%;
    max-width: 420px;
    padding: 30px;
    position: relative;
    border-radius: 4px;
}

.auth-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
}

.auth-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.auth-tab-btn.active {
    color: #fff;
    border-bottom-color: var(--red);
}

.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 480px;
    background: #0d0e11 !important;
    border: 1px solid rgba(255, 42, 42, 0.35) !important;
    padding: 22px;
    border-radius: 4px;
    z-index: 9999;
    display: none;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.95);
}

.cookie-banner p {
    margin: 0;
    color: #9e9b94;
    font-size: 12px;
    line-height: 1.6;
}

.cookie-banner p a {
    color: #f3e8d7;
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 9px 18px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.cookie-btn-accept {
    background: rgba(255, 42, 42, 0.15);
    border-color: rgba(255, 42, 42, 0.5);
    color: #ffcccc;
}

.servers-search-bar {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 14px 20px;
    color: #fff;
    font-size: 14px;
    outline: none;
    margin-bottom: 25px;
}

.servers-search-bar:focus {
    border-color: var(--red);
    box-shadow: 0 0 12px var(--red-glow);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    width: 100%;
}

.search-input-wrapper .servers-search-bar {
    margin-bottom: 0;
    padding-left: 45px;
}

.search-icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    fill: var(--muted);
    pointer-events: none;
}

/* =========================================================
   NEWS PAGINATION & SEARCH STYLING
   ========================================================= */

.news-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pagination-btn {
    background: var(--panel);
    border: 1px solid var(--line);
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--red);
    color: var(--red);
    box-shadow: 0 0 10px var(--red-glow);
}

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

.pagination-info {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    color: var(--muted);
}

.form-group.full-width {
    grid-column: 1 / -1;
    width: 100%;
}

.form-group.full-width textarea.form-control {
    width: 100%;
    min-height: 120px;
}

/* =========================================================
   RESOLUTION-PROOF MEDIA CONTAINERS (YOUTUBE & GALLERIES)
   ========================================================= */

.news-media-wrapper {
    width: 100% !important;
    margin-top: 16px !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    background: #000 !important;
    border: 1px solid var(--line) !important;
}

.gallery-image-viewport,
.news-video-box {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    max-height: none !important;
    height: auto !important;
    background: #000 !important;
    display: block !important;
    overflow: hidden !important;
}

.gallery-image-viewport img,
.news-video-box iframe,
.news-video-box video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    border: none !important;
    display: block !important;
}

.news-gallery-box {
    padding: 15px;
    text-align: center;
}

.gallery-carousel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.gallery-nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.gallery-nav-btn:hover {
    background: rgba(255, 42, 42, 0.2);
    border-color: var(--red);
    color: var(--red);
}

.gallery-counter {
    margin-top: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    color: var(--red);
    letter-spacing: 0.1em;
}

.status-badge.new {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #c084fc;
    /* Bright Purple */
}

.status-badge.replied {
    background: rgba(23, 162, 184, 0.15);
    border: 1px solid rgba(23, 162, 184, 0.4);
    color: #5bc0de;
}