/* ============================================
   NE BULA — Rust-Inspired Theme for Azuriom
   Author: ALVAS
   Style: Industrial / Survival / Rust
   ============================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
    --rust-bg: #0d0a08;
    --rust-bg2: #1a120b;
    --rust-bg3: #2c1810;
    --rust-card: #1a120be8;
    --rust-metal: #3d3229;
    --rust-metal-light: #5c4f42;
    --rust-rust: #b45309;
    --rust-rust-dark: #78350f;
    --rust-blood: #dc2626;
    --rust-blood-dark: #991b1b;
    --rust-warning: #f59e0b;
    --rust-warning-dark: #b45309;
    --rust-text: #d4d0c8;
    --rust-text-muted: #8a7e72;
    --rust-border: rgba(180, 83, 9, 0.25);
    --rust-glow: rgba(220, 38, 38, 0.3);
    --rust-radius: 4px;
    --rust-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Base ---- */
body {
    background: var(--rust-bg);
    color: var(--rust-text);
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    font-weight: 500;
    letter-spacing: 0.3px;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h1.text-warning {
    color: var(--rust-warning) !important;
    text-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
    font-size: 1.8rem;
}

a {
    color: var(--rust-warning);
    text-decoration: none;
    transition: var(--rust-transition);
}

a:hover {
    color: #fbbf24;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- Links in text ---- */
.content a:not(.btn):not(.nav-link):not(.dropdown-item) {
    border-bottom: 1px dotted var(--rust-rust);
    padding-bottom: 1px;
}
.content a:not(.btn):not(.nav-link):not(.dropdown-item):hover {
    border-bottom-color: var(--rust-warning);
}

/* ---- Cards / Glass panels (Rust sheet metal) ---- */
.card, .post-preview {
    background: var(--rust-card) !important;
    border: 1px solid var(--rust-border) !important;
    border-radius: var(--rust-radius) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: var(--rust-transition);
    position: relative;
}

.card:hover, .post-preview:hover {
    border-color: rgba(220, 38, 38, 0.3) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(220, 38, 38, 0.1);
}

.card-header {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--rust-border);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--rust-border);
    color: var(--rust-text-muted);
}

/* ---- Rust-style hr ---- */
hr {
    border: 0;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        var(--rust-rust) 0px,
        var(--rust-rust) 10px,
        transparent 10px,
        transparent 20px
    );
    opacity: 0.5;
}

/* ---- Navbar (industrial) ---- */
.navbar {
    background: rgba(13, 10, 8, 1) !important;
    border-bottom: 2px solid var(--rust-border);
    padding: 0;
    position: relative;
    z-index: 1030;
}

.navbar .container {
    position: relative;
}

.navbar .nav-item {
    position: static;
}

@media (min-width: 768px) {
    .navbar .nav-item {
        position: relative;
    }
}

/* Fix: dropdown z-index MUST be above content */
.navbar .dropdown-menu {
    position: absolute !important;
    z-index: 9999 !important;
    transform: none !important;
    top: 100% !important;
    left: 0 !important;
    margin-top: 0;
}

.navbar .dropdown-menu.dropdown-menu-end {
    left: auto !important;
    right: 0 !important;
}

/* ---- Nav links ---- */
.navbar .nav-link {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.75rem 1rem;
    color: var(--rust-text) !important;
    background: transparent !important;
    border: none !important;
    transition: var(--rust-transition);
    position: relative;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--rust-warning) !important;
    background: transparent !important;
}

.navbar .nav-link.active::before {
    content: '▸';
    color: var(--rust-blood);
    margin-right: 4px;
}

/* ---- Navbar brand ---- */
.navbar-brand {
    padding: 0.5rem 0;
}

.navbar-brand img {
    max-height: 50px;
    max-width: 180px;
    filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.3));
}

/* ---- Dropdown ---- */
.dropdown-menu {
    background: rgba(13, 10, 8, 0.98);
    border: 1px solid var(--rust-border);
    border-radius: var(--rust-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    padding: 0.5rem;
    z-index: 9999 !important;
}

.dropdown-item {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 2px;
    color: var(--rust-text);
    padding: 0.5rem 1rem;
    transition: var(--rust-transition);
    background: transparent !important;
    border: none !important;
}

.dropdown-item:hover,
.dropdown-item.active {
    background: rgba(220, 38, 38, 0.15) !important;
    color: var(--rust-warning) !important;
}

.dropdown-divider {
    border-top: 1px solid var(--rust-border);
}

/* ---- Server Status Bar (inline, single line) ---- */
.server-status-bar {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.08), rgba(245, 158, 11, 0.05));
    border: 1px solid var(--rust-border);
    border-left: 3px solid var(--rust-blood);
    border-radius: var(--rust-radius);
    padding: 0.6rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 2rem;
    margin-bottom: 1.5rem;
    transition: var(--rust-transition);
}

.server-status-bar:hover {
    border-color: rgba(220, 38, 38, 0.4);
}

.server-status-bar .server-online {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.server-status-bar .server-online i,
.server-status-bar .server-online .status-dot {
    color: #22c55e;
    font-size: 0.8rem;
}

.server-status-bar .server-offline i,
.server-status-bar .server-offline .status-dot {
    color: var(--rust-blood);
}

.server-status-bar .server-btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.server-status-bar .server-address {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: var(--rust-text-muted);
    letter-spacing: 0.5px;
}

/* ---- Buttons (Rust style: heavy, industrial) ---- */
.btn {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--rust-radius);
    padding: 0.55rem 1.25rem;
    transition: var(--rust-transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

/* Primary = Rust Warning Orange */
.btn-primary {
    background: linear-gradient(180deg, #d97706, #b45309);
    border-color: #f59e0b;
    color: #0d0a08 !important;
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #f59e0b, #d97706);
    border-color: #fbbf24;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
    color: #0d0a08 !important;
}

/* Danger = Rust Blood Red */
.btn-danger {
    background: linear-gradient(180deg, #dc2626, #b91c1c);
    border-color: #ef4444;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(180deg, #ef4444, #dc2626);
    border-color: #f87171;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
    transform: translateY(-1px);
}

/* Success = muted green */
.btn-success {
    background: linear-gradient(180deg, #166534, #15803d);
    border-color: #22c55e;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.btn-success:hover {
    background: linear-gradient(180deg, #15803d, #166534);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
    transform: translateY(-1px);
}

/* Secondary = Rust Metal */
.btn-secondary {
    background: linear-gradient(180deg, #3d3229, #2c1810);
    border-color: #5c4f42;
    color: var(--rust-text) !important;
}

.btn-secondary:hover {
    background: linear-gradient(180deg, #5c4f42, #3d3229);
    border-color: #8a7e72;
    color: #fff !important;
}

/* ---- Progress Bar (server player bar) ---- */
.progress {
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--rust-radius);
    border: 1px solid var(--rust-border);
    height: 1.25rem;
}

.progress-bar {
    background: repeating-linear-gradient(
        -45deg,
        var(--rust-blood),
        var(--rust-blood) 10px,
        #ef4444 10px,
        #ef4444 20px
    );
    background-size: 20px 20px;
    border-radius: var(--rust-radius);
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.3);
    animation: rust-progress-stripes 1s linear infinite;
}

@keyframes rust-progress-stripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 0;
    }
}

/* ---- Badges ---- */
.badge {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--rust-radius);
    padding: 0.35em 0.75em;
}

.badge.bg-danger {
    background: linear-gradient(180deg, #dc2626, #991b1b) !important;
}

.badge.bg-success {
    background: linear-gradient(180deg, #22c55e, #166534) !important;
}

/* ---- Footer ---- */
footer {
    background: rgba(13, 10, 8, 0.95) !important;
    border-top: 2px solid var(--rust-border);
    padding: 1.25rem 0 !important;
}

footer p {
    font-size: 0.85rem;
    color: var(--rust-text-muted);
    margin: 0;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

footer a {
    color: var(--rust-text-muted) !important;
}

footer a:hover {
    color: var(--rust-warning) !important;
}

/* ---- Form Elements ---- */
.form-control {
    background: rgba(26, 18, 11, 0.8);
    border: 1px solid var(--rust-border);
    border-radius: var(--rust-radius);
    color: var(--rust-text);
    font-family: 'Rajdhani', sans-serif;
    transition: var(--rust-transition);
}

.form-control:focus {
    background: rgba(26, 18, 11, 0.95);
    border-color: var(--rust-warning);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
    color: var(--rust-text);
}

.form-control::placeholder {
    color: var(--rust-text-muted);
    opacity: 0.6;
}

/* ---- Modal ---- */
.modal-content {
    background: var(--rust-card);
    border: 1px solid var(--rust-border);
    border-radius: var(--rust-radius);
}

.modal-header {
    border-bottom: 1px solid var(--rust-border);
}

.modal-footer {
    border-top: 1px solid var(--rust-border);
}

.modal .btn-close {
    filter: invert(0.8);
}

/* ---- Alerts ---- */
.alert {
    border-radius: var(--rust-radius);
    border: 1px solid transparent;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}

.alert-success {
    background: rgba(22, 101, 52, 0.2);
    border-color: rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.alert-danger {
    background: rgba(153, 27, 27, 0.2);
    border-color: rgba(220, 38, 38, 0.3);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(180, 83, 9, 0.2);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fde68a;
}

.alert-info {
    background: rgba(30, 58, 138, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

/* ---- Pagination ---- */
.pagination {
    gap: 0.25rem;
}

.pagination .page-link {
    background: var(--rust-bg3);
    border: 1px solid var(--rust-border);
    color: var(--rust-text);
    border-radius: var(--rust-radius);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
    transition: var(--rust-transition);
}

.pagination .page-link:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--rust-blood);
    color: var(--rust-warning);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(180deg, #dc2626, #991b1b);
    border-color: #ef4444;
    color: #fff;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.4;
}

/* ---- Section Title ---- */
.section-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--rust-text);
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        var(--rust-blood) 0px,
        var(--rust-blood) 10px,
        transparent 10px,
        transparent 15px
    );
    margin-top: 0.3rem;
}

/* ---- Home: Welcome Section ---- */
.welcome-section {
    padding: 2rem 0;
    text-align: center;
}

.welcome-section h1 {
    font-size: 2.5rem;
    letter-spacing: 3px;
    color: var(--rust-warning);
    text-shadow: 0 0 40px rgba(245, 158, 11, 0.2);
}

.welcome-section .subtitle {
    font-family: 'Rajdhani', sans-serif;
    color: var(--rust-text-muted);
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ---- Notification Badge ---- */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 0.6rem;
    padding: 0.2em 0.4em;
    min-width: 18px;
    min-height: 18px;
    border-radius: 50%;
    background: var(--rust-blood);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

/* ---- User Avatar in Nav ---- */
.nav-user-avatar {
    border-radius: 0 !important;
    border: 1px solid var(--rust-border);
    filter: drop-shadow(0 0 4px rgba(180, 83, 9, 0.2));
}

/* ---- Navbar Toggler ---- */
.navbar-toggler {
    border: 1px solid var(--rust-border);
    border-radius: var(--rust-radius);
    padding: 0.4rem;
}

.navbar-toggler-icon {
    filter: brightness(0.7);
}

/* ---- Content spacing ---- */
.content {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

/* ---- Custom scrollbar (industrial) ---- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--rust-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--rust-metal);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--rust-metal-light);
}

/* ---- Bootstrap overrides ---- */
.table {
    color: var(--rust-text);
    border-color: var(--rust-border);
}

.table > :not(caption) > * > * {
    background: transparent;
    border-bottom-color: var(--rust-border);
}

.table-hover > tbody > tr:hover > * {
    background: rgba(220, 38, 38, 0.05);
}

.list-group-item {
    background: transparent;
    border-color: var(--rust-border);
    color: var(--rust-text);
}

.list-group-flush > .list-group-item {
    border-width: 0 0 1px;
}

.list-group-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.text-muted, .text-body-secondary {
    color: var(--rust-text-muted) !important;
}

.text-success { color: #86efac !important; }
.text-info { color: #67e8f9 !important; }
.text-warning { color: var(--rust-warning) !important; }
.text-danger { color: var(--rust-blood) !important; }

.breadcrumb {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--rust-border);
    border-radius: var(--rust-radius);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--rust-text-muted);
}

/* ---- Navbar User Name ---- */
.navbar .nav-link.user-name {
    font-family: 'Rajdhani', sans-serif;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.9rem;
}

/* ---- Floating elements (vote/host) ---- */
body > .na-host,
body > .golos {
    position: fixed;
    z-index: 999;
}

/* ---- Responsive tweaks ---- */
@media (max-width: 768px) {
    .server-status-bar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .welcome-section h1 {
        font-size: 1.5rem;
    }

    .navbar .dropdown-menu {
        position: static !important;
        box-shadow: none;
        border: none;
        background: rgba(0, 0, 0, 0.3);
    }
}

/* ---- Blur/glow loader effect (Rust loading) ---- */
.loading-spinner {
    border: 2px solid var(--rust-metal);
    border-top-color: var(--rust-warning);
}

/* ---- Selection ---- */
::selection {
    background: rgba(245, 158, 11, 0.3);
    color: #fff;
}

/* ---- Block title with danger icon accent ---- */
.block-title-icon {
    color: var(--rust-blood);
    margin-right: 0.5rem;
}

/* ---- Navbar dropdown container fix ---- */
#navbar {
    position: relative;
}

/* ---- Page-specific: home blocks ---- */
.home-blocks .card {
    height: 100%;
}

.home-blocks .card .card-body {
    display: flex;
    flex-direction: column;
}

.home-blocks .card .card-body .btn {
    margin-top: auto;
}

/* ---- Badge in home server card ---- */
.server-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
}

/* ---- Rust server card title ---- */
.server-card-title {
    font-size: 1.1rem;
    padding-right: 2rem;
}

/* ---- Corner Images (fixed to bottom corners) ---- */
.corner-image {
    position: fixed;
    bottom: 10px;
    z-index: 9999;
    line-height: 0;
    transition: transform 0.2s ease;
}

.corner-image:hover {
    transform: scale(1.05);
}

.corner-image img {
    max-width: 180px;
    max-height: 120px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.corner-left {
    left: 10px;
}

.corner-right {
    right: 10px;
}

/* ---- Sticky Header ---- */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ---- Vote content (BBCode) ---- */
.vote-content {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    color: var(--rust-text);
    line-height: 1.6;
}

.vote-content a {
    color: var(--rust-warning);
    border-bottom: 1px dotted var(--rust-rust);
}

.vote-content a:hover {
    color: #fbbf24;
    border-bottom-color: var(--rust-warning);
}

.vote-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.vote-content blockquote {
    border-left: 3px solid var(--rust-blood);
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    background: rgba(220, 38, 38, 0.05);
    border-radius: 0 4px 4px 0;
}

.vote-content code {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    border: 1px solid var(--rust-border);
}

.vote-content pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--rust-border);
    border-radius: 4px;
    padding: 1rem;
    overflow-x: auto;
}

.vote-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.vote-content table th,
.vote-content table td {
    border: 1px solid var(--rust-border);
    padding: 0.5rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.vote-content table th {
    background: rgba(180, 83, 9, 0.12);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--rust-warning);
}

.vote-content table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

.vote-content table tr:hover td {
    background: rgba(220, 38, 38, 0.05);
}

/* ---- Navbar dropdown on hover (desktop only) ---- */
@media (min-width: 992px) {
    .navbar .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}