/* ═══════════════════════════════════════════════════════════════
   site.css — Global stylesheet for www.thehubba.se
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
    --bg-color: #131313;
    --surface-color: rgba(28, 28, 27, 0.6);
    --surface-container: rgba(32, 32, 31, 0.6);
    --surface-container-bg: rgba(32, 32, 31, 0.6);
    --group-news: rgba(32, 32, 32, 0.8);
    --group-security: rgba(55, 32, 32, 0.8);
    --group-tech: rgba(32, 80, 32, 0.8);
    --group-science: rgba(80, 80, 32, 0.8);
    --group-showbiz: rgba(80, 32, 80, 0.8);
    --group-ai: rgba(80, 80, 80, 0.8);
    --group-space: rgba(32, 32, 60, 0.8);
    --text-primary: #e5e2e1;
    --text-secondary: #c4c7c7;
    --accent-gold: #d4af37;
    --accent-gold-soft: rgba(212, 175, 55, 0.2);
    --font-serif: 'Mulish', 'Bodoni Moda', serif;
    --font-sans: 'Onest', 'Hanken Grotesk', sans-serif;
    --container-max: 1280px;
    --margin-edge: 64px;
    --section-gap: 128px;
    --gutter: 32px;
    --unit: 8px;
    --btn-border: #888;
    --btn-bg: #735C00;
    --btn-primary-bg: #574500;
    --btn-primary-color: #fff;
    --btn-danger-bg: #ff4500;
    --btn-danger-color: #fff;
    --input-border: #ccc;
    --dialog-bg: #fff;
    --table-border: #ddd;
    --table-header-bg: #1C1B1B;
    --role-badge-bg: #1C1B1B;
    --error-color: #dc3545;
}

/* ── Reset ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Base ── */
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
}

/* ── Typography ── */
h1, h2, h3, .headline {
    font-family: var(--font-sans);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

h1 { font-size: 4.5rem; }
h2 { font-size: 3rem; font-weight: 600; line-height: 1.2; }
h3 { font-size: 2rem; font-weight: 500; }

.label-caps {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.body-lg {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* ── Layout ── */
.page {
    position: relative;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

.container {
    margin: 0 auto;
    padding: 0 var(--margin-edge);
    width: 100%;
}

section {
    padding: var(--section-gap) 0;
}
/* ── input ── */
input,
textarea {
    caret-shape: block;
    caret-color: var(--accent-gold);
}

/* ── Main Content & Backgrounds ── */
.main-content {
    padding-top: 112px;
    min-height: 100vh;
    background-image: url('images/background_web.jpg');
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
}

.main-content:has(.page-weather) {
    background-image: url('images/background2_web.jpg');
}

.main-content:has(.admin-container) {
    background-image: url('images/background3_web.jpg');
}

.main-content:has(.servarr-container) {
    background-image: url('images/background4_web.jpg');
}

/* ── Navigation ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
    background: rgba(19, 19, 19, 0.8);
    backdrop-filter: blur(2px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: var(--gutter);
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--text-primary); }

/* Desktop Dropdown Menus */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font: inherit;
    padding: 0;
}

.nav-dropdown-toggle:hover {
    color: var(--text-primary);
}

.nav-chevron {
    font-size: 0.6em;
    transition: transform 0.2s ease;
}

.nav-chevron.rotated {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: var(--card-bg, #1e1e1e);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 1100;
}

.nav-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-dropdown-menu a::after {
    display: none;
}

/* Mobile Dropdown Menus */
.mobile-dropdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.mobile-dropdown-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font: inherit;
    font-size: 1.25rem;
    padding: 0;
}

.mobile-dropdown-menu {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.mobile-dropdown-menu.active {
    display: flex;
}

.mobile-dropdown-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
}

/* Nav Item (legacy sidebar styles) */
.nav-item {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

.nav-item:first-of-type { padding-top: 1rem; }
.nav-item:last-of-type { padding-bottom: 1rem; }

.nav-item .nav-link {
    color: #d7d7d7;
    background: none;
    border: none;
    border-radius: 4px;
    height: 3rem;
    display: flex;
    align-items: center;
    line-height: 3rem;
    width: 100%;
}

.nav-item a.active {
    background-color: rgba(255, 255, 255, 0.37);
    color: white;
}

.nav-item .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.25rem;
}

/* Navbar toggler (legacy) */
.navbar-toggler {
    appearance: none;
    cursor: pointer;
    width: 3.5rem;
    height: 2.5rem;
    color: white;
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
}

.navbar-toggler:checked { background-color: rgba(255, 255, 255, 0.5); }

.top-row {
    min-height: 3.5rem;
    background-color: rgba(0, 0, 0, 0.4);
}

.navbar-brand { font-size: 1.1rem; }

.nav-scrollable { display: none; }
.navbar-toggler:checked ~ .nav-scrollable { display: block; }

/* Bootstrap-icon placeholders */
.bi {
    display: inline-block;
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    top: -1px;
    background-size: cover;
}

.bi-house-door-fill-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
}

.bi-plus-square-fill-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");
}

.bi-list-nested-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
}

/* ── Buttons ── */
.btn {
    padding: 0.4rem 1rem;
    border: 1px solid var(--btn-border);
    border-radius: 4px;
    background: var(--btn-bg);
    color: var(--btn-color, inherit);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-color);
    border-color: var(--btn-primary-bg);
}

.btn-primary:hover { background: var(--accent-gold); }

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.btn-outline:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.btn-pill {
    background: var(--text-primary);
    color: var(--bg-color);
    padding: 0.5rem 1.5rem;
}

.btn-pill:hover { background: var(--accent-gold); }

.btn-danger {
    background: var(--btn-danger-bg);
    color: var(--btn-danger-color);
    border-color: var(--btn-danger-bg);
}

.btn-sm {
    padding: 0.2rem 0.6rem;
    font-size: 0.85rem;
}

.btn-reset {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    padding: 0.4rem 1rem;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.btn-reset:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.25rem; }

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    box-sizing: border-box;
}

.form-actions { margin-top: 1.5rem; }
.form-actions .btn { margin-right: 0.5rem; }

/* ── Cards & Grid ── */
.card { cursor: pointer; }
.card:hover { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); }

.img-wrap { overflow: hidden; margin-bottom: 1.5rem; }
.img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .img-wrap img { transform: scale(1.05); }

.aspect-16-9 { aspect-ratio: 16/9; }
.aspect-square { aspect-ratio: 1/1; }

.card-info {
    padding-left: 1.5rem;
    border-left: 1px solid rgba(212, 175, 55, 0.3);
    transition: border-color 0.3s ease;
}

.card:hover .card-info { border-left-color: var(--accent-gold); }
.card-info .label-caps { color: var(--accent-gold); }
.card-info h3 { margin-top: 0.5rem; }

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gutter);
}

.bento-main { grid-column: span 8; }

.bento-side {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: var(--gutter);
}

/* Curator Section */
.curator-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.curator-header div { max-width: 600px; }
.curator-header h2 { margin-bottom: 1.5rem; }

.view-archive {
    color: var(--accent-gold);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-gold);
    padding-bottom: 2px;
}

/* Narrative Section */
.narrative { background-color: var(--surface-color); }

.narrative-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--section-gap);
    align-items: center;
}

.narrative-img {
    height: 600px;
    width: 100%;
    object-fit: cover;
    filter: grayscale(1);
}

.narrative-content h2 { margin: 1.5rem 0 2rem; font-style: italic; }

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gutter);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 2rem;
}

.stats-grid .label-caps { color: var(--accent-gold); margin-bottom: 0.5rem; }
.stats-grid .stat-val { font-family: var(--font-serif); font-size: 1.5rem; }

/* Motion Reel */
.motion-reel {
    position: relative;
    height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.play-btn {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 1px solid var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 3rem;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-btn span { color: var(--accent-gold); font-size: 3rem; transition: transform 0.3s ease; }
.play-btn:hover { background: var(--accent-gold-soft); }
.play-btn:hover span { transform: scale(1.15); }

/* ── News Feeds (grid) ── */
.news-feeds {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gutter);
    align-items: start;
}

.news-feed-group {
    width:100%;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-direction:column;
}

.news-feed-group * {
    width: 80%;
}

.news-feed-title {
    font-size:unset;
}

.rss-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-items: center;
}

.feed-group {
    box-shadow: 0px 15px 20px -5px rgba(0,0,0,0.4);
}

.feed-group-title {
    background: var(--surface-color);
    border-radius: 8px;
    padding:10px;
}

.rss-feed-container {
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    padding: 2rem;
    max-width: 500px;
    flex-direction: column;
    margin: 10px;
}

.rss-feed-container-expanded {
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    padding: 2rem;
    flex-direction: column;
    margin: 10px;
}

.feed-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--accent-gold);
    font-family: var(--font-serif);
}

.feed-status {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.feed-error {
    color: #e57373;
    font-size: 0.875rem;
}

.feed-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feed-item {
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feed-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9rem;
    line-height: 1.4;
}

.feed-link:hover { color: var(--accent-gold); }

.feed-more {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--accent-gold);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-gold);
    padding-bottom: 2px;
    transition: opacity 0.2s ease;
}

.feed-more:hover { opacity: 0.7; }

.feed-group-security {
    background-color: var(--group-security);
    border-radius: 8px;
}

.feed-group-news {
    background-color: var(--group-news);
    border-radius: 8px;
}

.feed-group-tech {
    background-color: var(--group-tech);
    border-radius: 8px;
}

.feed-group-science {
    background-color: var(--group-science);
    border-radius: 8px;
}

.feed-group-showbiz {
    background-color: var(--group-showbiz);
    border-radius: 8px;
}


.feed-group-ai {
    background-color: var(--group-ai);
    border-radius: 8px;
}

.feed-group-space {
    background-color: var(--group-space);
    border-radius: 8px;
}


/* ── Weather ── */
.weather-container {
    background: var(--surface-container);
    backdrop-filter: blur(2px);
    padding: 10px;
    border-radius:25px;
    box-shadow: 0px 15px 20px -5px rgba(0,0,0,0.4);
    padding:25px !important;
}

.weather-search {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.weather-input {
    flex: 1;
    padding: 0.5rem 1rem;
    background: var(--surface-container);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.weather-input:focus { border-color: var(--accent-gold); }
.weather-input::placeholder { color: var(--text-secondary); opacity: 0.6; }

.weather-status {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.weather-error {
    color: #e57373;
    font-size: 0.875rem;
}

.location-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.location-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 1rem;
    background: var(--surface-container);
    cursor: pointer;
    transition: background 0.2s ease;
}

.location-item:hover { background: var(--accent-gold-soft); }

.location-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.location-detail {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.weather-location-title {
    font-size: 1.25rem;
    color: var(--accent-gold);
    font-family: var(--font-serif);
    margin-bottom: 1.25rem;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.forecast-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 1rem 0.5rem;
    background: var(--surface-container);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.2s ease;
    backdrop-filter: blur(5px);
}

.forecast-card:hover { border-color: var(--accent-gold); }

.forecast-day {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
}

.forecast-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.forecast-icon {
    font-size: 2rem;
    line-height: 1;
    margin: 0.25rem 0;
}

.forecast-desc {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-align: center;
    min-height: 2em;
}

.forecast-temps {
    display: flex;
    gap: 0.5rem;
    font-family: var(--font-serif);
    font-size: 1rem;
}

.temp-max { color: var(--text-primary); font-weight: 700; }
.temp-min { color: var(--text-secondary); }

/* ── Login ── */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-card {
    background: var(--surface-container);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    border-radius:25px;
    box-shadow: 0px 15px 20px -5px rgba(0,0,0,0.4);
}

.login-title {
    color: var(--accent-gold);
    font-family: var(--font-serif);
    margin-bottom: 2rem;
    text-align: center;
}

.login-error {
    color: #e57373;
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 1rem;
}

.login-field { margin-bottom: 1.5rem; }
.login-field label { display: block; margin-bottom: 0.5rem; color: var(--text-secondary); }

.login-input {
    width: 100%;
    padding: 0.625rem 1rem;
    background: var(--bg-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.login-input:focus { border-color: var(--accent-gold); }

.login-btn { width: 100%; margin-top: 0.5rem; }

/* ── Admin ── */
.admin-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 1rem;
    background-color: var(--surface-container);
}

.admin-toolbar { margin-bottom: 1rem; }

.admin-table { width: 100%; border-collapse: collapse; }

.admin-table th,
.admin-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--table-border);
    text-align: left;
}

.admin-table th { background: var(--table-header-bg); font-weight: 600; }
.admin-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.23); }
.admin-table tbody tr:hover { background: rgba(255, 255, 255, 0.07); }

.edit-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 1rem;
}

.roles-section { margin-top: 0.5rem; }

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--role-badge-bg);
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    margin: 0.2rem;
    font-size: 0.9rem;
}

.role-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--btn-danger-bg);
    line-height: 1;
    padding: 0;
}

.role-add {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.role-add select {
    padding: 0.3rem;
    border: 1px solid var(--input-border);
    border-radius: 4px;
}

.error { color: var(--error-color); font-weight: 600; }

/* ── Dialogs ── */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.confirm-dialog {
    background: var(--dialog-bg);
    color: var(--dialog-color, inherit);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.confirm-dialog .btn { margin: 0.5rem; }

/* ── Reconnect Modal ── */
.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible,
.components-rejoining-animation {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible {
    display: block;
}

#components-reconnect-modal {
    background-color: white;
    width: 20rem;
    margin: 20vh auto;
    padding: 2rem;
    border: 0;
    border-radius: 0.5rem;
    box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity 0.5s both;
}

#components-reconnect-modal[open] {
    animation: components-reconnect-modal-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s,
               components-reconnect-modal-fadeInOpacity 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
}

#components-reconnect-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
    animation: components-reconnect-modal-fadeInOpacity 0.5s ease-in-out;
    opacity: 1;
}

@keyframes components-reconnect-modal-slideUp {
    0% { transform: translateY(30px) scale(0.95); }
    100% { transform: translateY(0); }
}

@keyframes components-reconnect-modal-fadeInOpacity {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes components-reconnect-modal-fadeOutOpacity {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.components-reconnect-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal p { margin: 0; text-align: center; }

#components-reconnect-modal button {
    border: 0;
    background-color: #6b9ed2;
    color: white;
    padding: 4px 24px;
    border-radius: 4px;
}

#components-reconnect-modal button:hover { background-color: #3b6ea2; }
#components-reconnect-modal button:active { background-color: #6b9ed2; }

.components-rejoining-animation {
    position: relative;
    width: 80px;
    height: 80px;
}

.components-rejoining-animation div {
    position: absolute;
    border: 3px solid #0087ff;
    opacity: 1;
    border-radius: 50%;
    animation: components-rejoining-animation 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.components-rejoining-animation div:nth-child(2) { animation-delay: -0.5s; }

@keyframes components-rejoining-animation {
    0% { top: 40px; left: 40px; width: 0; height: 0; opacity: 0; }
    4.9% { top: 40px; left: 40px; width: 0; height: 0; opacity: 0; }
    5% { top: 40px; left: 40px; width: 0; height: 0; opacity: 1; }
    100% { top: 0; left: 0; width: 80px; height: 80px; opacity: 0; }
}

/* ── Blazor Error UI ── */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Footer */
footer {
    padding: var(--section-gap) 0;
    background: var(--bg-color);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--gutter);
}

.footer-logo h4 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-links { display: flex; gap: var(--gutter); }
.footer-links a { color: var(--text-secondary); text-decoration: none; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--accent-gold); }

.copyright { font-size: 10px; color: var(--text-secondary); opacity: 0.5; }
/* ── Servarr ── */
.servarr-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 1rem;
    background: var(--surface-container);
}

    .servarr-container h1 {
        margin-top: 2rem;
        margin-bottom: 1rem;
    }

        .servarr-container h1:first-child {
            margin-top: 0;
        }

    .servarr-container table {
        border: none;
        width: 100%;
    }

    .servarr-container thead {
        background-color: var(--table-header-bg);
        margin: 0;
        padding: 10px;
    }

.pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}
.movieContainer {
    display: flex;
    flex-direction: column;
}

.movieCard {
    display: flex;
    flex-direction: row;
    border: 1px solid rgba(255,255,255,0.5);
    justify-content: space-between;
    background: var(--surface-container);
    padding: 20px;
    margin: 20px;
    border-radius:25px;
    box-shadow: 0px 15px 20px -5px rgba(0,0,0,0.4);
}

    .movieCard:hover {
        border: 1px solid rgba(255,255,255,0.9);
    }

    .movieCard h3 {
        all: unset;
    }

/* ── Jellyfin ── */
.jellyfin-container {
    max-width: var(--container-max);
    margin: 2rem auto;
    padding: 0 var(--margin-edge);
}

.jellyfin-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--gutter);
    margin-top: 1.5rem;
}

.jellyfin-card {
    background: var(--surface-container);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0px 15px 20px -5px rgba(0,0,0,0.4);
}

.jellyfin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.jellyfin-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}

.jellyfin-card-info {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.jellyfin-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.jellyfin-year {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.jellyfin-episode {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* ── Useradmin ── */

.useradmin-container {
    width:100%;
    margin: 2rem auto;
    padding: 1rem;
    background-color: var(--surface-container);

}


.userContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: var(--gutter);
    align-items: start;
}

.userCard {
    display: flex;
    flex-direction: row;
    border: 1px solid rgba(255,255,255,0.5);
    padding: 25px;
    margin: 25px;
    background: var(--surface-container);
    border-radius: 8px;
    box-shadow: 0px 15px 20px -5px rgba(0,0,0,0.4);
    width:500px;
}

.userImage img {
    padding:15px;
    width:140px;
    height:auto;
}

.userInfoContainer {
    display: flex;
    flex-direction: column;
}

/* ── Newsadmin ── */
.newsadmin-container {
    width: 100%;
    margin: 2rem auto;
    padding: 1rem;
    background-color: var(--surface-container);
}
.newsFeeds {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: var(--gutter);
    align-items: start;
}

.newsFeedCard {
    display: flex;
    flex-direction: row;
    border: 1px solid rgba(255,255,255,0.5);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0px 15px 20px -5px rgba(0,0,0,0.4);
    width: 500px;
    height:250px;
}

.newsFeedInfo {

}

.newsFeedActions {

}
/* ═══════════════════════════════════════════════════════════════
   Responsive — consolidated media queries
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1066px) {
    .hamburger {
        display: flex;
    }

    .nav-links, nav .btn-pill, .nav-logout-form {
        display: none !important;
    }

    body.menu-open {
        overflow: hidden;
    }

    .news-feeds {
        grid-template-columns: repeat(2, 1fr);
    }

    .jellyfin-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    :root {
        --margin-edge: 32px;
        --section-gap: 80px;
    }
    h1 { font-size: 3rem; }
    h2 { font-size: 2.25rem; }
    .forecast-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .bento-grid, .narrative-grid { grid-template-columns: 1fr; }
    .bento-main, .bento-side { grid-column: span 12; }
    .footer-content { flex-direction: column; text-align: center; }
    .news-feeds { grid-template-columns: 1fr; }
    .forecast-grid { grid-template-columns: repeat(2, 1fr); }
    .weather-search { flex-direction: column; }
    .jellyfin-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 641px) {
    .navbar-toggler { display: none; }
    .nav-scrollable {
        display: block;
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }
    .newsFeeds {
        grid-template-columns: repeat(1,1fr);
    }

    .newsFeedCard {
        flex-direction: column;
        width: auto;
        height: auto;
    }

    .userContainer {
        grid-template-columns: repeat(1, 1fr);
    }

    .userCard {
        flex-direction: column;
        padding: 5px;
        margin: 5px;
        width: auto;
        height: auto;
    }
}
