:root {
    --bg: #030915;
    --panel: rgba(5, 12, 26, 0.92);
    --panel-2: rgba(6, 14, 30, 0.88);
    --border: rgba(53, 138, 255, 0.42);
    --border-soft: rgba(53, 138, 255, 0.18);
    --text: #eef6ff;
    --muted: #a2b4ce;
    --blue: #1692ff;
    --blue-2: #3cb0ff;
    --green: #51d86e;
    --shadow: 0 0 0 1px rgba(18, 93, 198, 0.12), 0 22px 40px rgba(0,0,0,0.35), 0 0 35px rgba(0, 102, 255, 0.12);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(0,113,255,0.08), transparent 28%),
        linear-gradient(180deg, rgba(1,5,12,0.90), rgba(1,6,15,0.98)),
        url('../images/background.jpeg') center/cover fixed no-repeat;
}
.page-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.35));
}
.landing-header, .landing-shell { position: relative; z-index: 1; }
.landing-header { padding: 10px 8px 4px; }
.banner-wrap { display: flex; justify-content: center; }
.banner-image {
    width: min(100%, 1620px);
    display: block;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(53, 138, 255, 0.38);
}
.landing-shell {
    width: min(1680px, calc(100% - 16px));
    margin: 8px auto 18px;
    display: grid;
    gap: 12px;
}
.panel-shell {
    position: relative;
    background: linear-gradient(180deg, rgba(4, 10, 23, 0.96), rgba(2, 8, 18, 0.96));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}
.panel-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(17, 133, 255, 0.06), transparent 18%, transparent 82%, rgba(17, 133, 255, 0.04));
}
.resource-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    min-height: 72px;
}
.resource-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
}
.resource-item + .resource-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18px;
    bottom: 18px;
    width: 1px;
    background: rgba(87, 150, 255, 0.22);
}
.resource-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(255,255,255,0.02);
}
.resource-content { display: grid; gap: 3px; }
.resource-label { font-size: 14px; color: #dfeaff; }
.resource-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.resource-value { font-size: 17px; font-weight: 700; }
.resource-rate { font-size: 13px; color: var(--green); font-weight: 700; }
.hero-login-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(380px, 0.75fr);
    gap: 12px;
}
.hero-panel {
    min-height: 350px;
    position: relative;
}
.hero-background,
.hero-scene-image,
.hero-overlay {
    position: absolute;
    inset: 0;
}
.hero-scene-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.98;
}
.hero-overlay {
    background:
        linear-gradient(90deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.48) 34%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0.10) 100%),
        linear-gradient(180deg, rgba(0, 74, 179, 0.06), transparent);
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    padding: 28px 30px;
}
.eyebrow {
    margin: 0 0 10px;
    color: var(--blue-2);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 14px;
    font-weight: 700;
}
.hero-content h1 {
    margin: 0;
    font-size: clamp(40px, 4vw, 62px);
    line-height: 1.03;
    letter-spacing: -0.03em;
}
.hero-content h1 span { color: var(--blue-2); }
.hero-description {
    margin: 18px 0 0;
    max-width: 620px;
    color: #d7e4f7;
    font-size: 18px;
    line-height: 1.45;
}

.opening-highlight {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0 4px;
    padding: 13px 16px;
    border: 1px solid rgba(98, 198, 255, 0.32);
    background: linear-gradient(90deg, rgba(14, 64, 128, 0.72), rgba(24, 104, 215, 0.28));
    box-shadow: 0 0 26px rgba(50, 152, 255, 0.18), inset 0 0 18px rgba(117, 211, 255, 0.06);
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.opening-highlight-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(129, 211, 255, 0.24);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.opening-highlight span {
    display: block;
    color: var(--cyan);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.opening-highlight strong {
    display: block;
    margin-top: 3px;
    color: #fff;
    font-size: 15px;
}
.opening-highlight small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-weight: 800;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 24px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 28px;
    border-radius: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
}
.btn-primary {
    color: white;
    background: linear-gradient(180deg, #1f83ff, #1352db);
    border: 1px solid rgba(114, 180, 255, 0.5);
    box-shadow: 0 0 22px rgba(22, 146, 255, 0.24);
}
.btn-outline {
    color: #f2f7ff;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(79, 183, 255, 0.52);
}
.login-panel { padding: 22px 24px; }
.login-head h2 { margin: 0; font-size: 20px; }
.login-form { display: grid; gap: 10px; margin-top: 18px; }
.login-form label { color: var(--muted); font-size: 14px; }
.login-form input {
    height: 46px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(87, 150, 255, 0.22);
    background: rgba(0, 0, 0, 0.24);
    color: white;
    outline: none;
}
.login-form input:focus { border-color: rgba(87,150,255,0.55); }
.register-link { text-align: center; color: #8dc7ff; text-decoration: none; margin-top: 6px; }
.error-message { padding: 10px; border-radius: 10px; background: rgba(255, 90, 90, 0.12); border: 1px solid rgba(255,90,90,0.24); }
.home-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(420px, 0.95fr);
    gap: 12px;
    align-items: start;
}
.home-left-column,
.home-right-column {
    display: grid;
    gap: 12px;
    min-width: 0;
}
.style-panel,
.world-panel,
.updates-panel,
.events-panel { padding: 16px 18px; }
.section-head { margin-bottom: 12px; }
.section-head.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-head h2 { margin: 4px 0 0; font-size: 20px; }
.style-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}
.style-card {
    padding: 14px 16px;
    min-height: 114px;
    border-right: 1px solid rgba(87, 150, 255, 0.16);
}
.style-card:last-child { border-right: 0; }
.style-card h3 { margin: 0 0 8px; font-size: 18px; }
.style-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.world-entry {
    position: relative;
    padding: 16px 18px;
    border: 1px solid rgba(87, 150, 255, 0.20);
    background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(28, 87, 196, 0.08));
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.world-entry:hover {
    transform: translateY(-2px);
    border-color: rgba(118, 203, 255, 0.48);
    background: linear-gradient(90deg, rgba(41, 123, 255, 0.16), rgba(34, 187, 255, 0.08));
    box-shadow: 0 0 24px rgba(34, 150, 255, 0.18), inset 0 0 18px rgba(104, 208, 255, 0.05);
}
.world-entry-featured {
    border-color: rgba(104, 209, 255, 0.36);
    background: linear-gradient(135deg, rgba(19, 91, 176, 0.30), rgba(8, 16, 34, 0.92));
}
.world-entry-top { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.world-entry h3 { margin: 8px 0 6px; font-size: 20px; }
.world-entry p { margin: 0; color: var(--muted); line-height: 1.42; }
.world-entry-foot { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 12px; }
.world-entry-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.world-entry-stats span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(119, 171, 255, 0.18);
    background: rgba(255,255,255,0.045);
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.world-opening-line {
    display: grid;
    gap: 2px;
    margin-top: 14px;
    padding: 12px 14px;
    border-left: 3px solid rgba(108, 217, 255, 0.75);
    background: rgba(74, 147, 255, 0.10);
}
.world-opening-line span {
    color: var(--cyan);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.world-opening-line strong { color: #fff; font-size: 16px; }
.world-opening-line small { color: var(--muted); font-weight: 800; }
.status-badge, .tiny-action, .tag-pill {
    display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 800;
}
.status-badge { min-height: 24px; padding: 0 12px; font-size: 12px; background: rgba(81, 216, 110, 0.12); color: #8ff0a8; border: 1px solid rgba(81,216,110,0.22); }
.status-badge.closed { background: rgba(255,188,89,0.10); color: #ffd69b; border-color: rgba(255,188,89,0.18); }
.status-badge.reservation { background: rgba(69, 150, 255, 0.16); color: #9fd8ff; border-color: rgba(109, 204, 255, 0.34); }
.status-badge.scheduled { background: rgba(176, 126, 255, 0.14); color: #d8c3ff; border-color: rgba(176, 126, 255, 0.28); }
.tiny-action { min-height: 34px; padding: 0 16px; font-size: 12px; background: linear-gradient(180deg, #2388ff, #1757dc); color: white; border: 1px solid rgba(114,180,255,0.44); }
.updates-list,
.events-list,
.world-list { display: grid; gap: 12px; }
.update-row,
.event-row {
    display: grid;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(87, 150, 255, 0.18);
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.update-row { grid-template-columns: 146px minmax(0, 1fr) auto; align-items: center; }
.event-row { grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; }
.update-row:hover,
.event-row:hover {
    transform: translateY(-1px);
    border-color: rgba(87, 150, 255, 0.36);
    box-shadow: 0 0 18px rgba(0, 102, 255, 0.08);
}
.update-thumb {
    width: 146px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(87, 150, 255, 0.18);
}
.row-main h3 { margin: 0 0 6px; font-size: 18px; }
.row-main p { margin: 0; color: var(--muted); line-height: 1.4; }
.row-side { text-align: right; display: grid; gap: 10px; justify-items: end; }
.tag-pill {
    min-height: 30px;
    padding: 0 12px;
    font-size: 12px;
    background: rgba(13, 126, 255, 0.14);
    color: #81c4ff;
    border: 1px solid rgba(13,126,255,0.28);
}
.event-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 28px;
    background: rgba(7, 115, 255, 0.10);
    border: 1px solid rgba(87,150,255,0.18);
}
.date-block { font-size: 16px; font-weight: 700; color: #dcecff; }
.time-block { font-size: 18px; font-weight: 800; color: var(--blue-2); }
.more-link {
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #34adff;
    font-size: 20px;
    cursor: pointer;
    font-weight: 700;
}
.landing-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 14px 18px;
    color: var(--muted);
    font-size: 14px;
}
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; justify-content: flex-end; }
.site-modal {
    position: fixed; inset: 0; z-index: 30;
}
.site-modal[hidden] { display: none; }
.site-modal-backdrop {
    position: absolute; inset: 0; background: rgba(1,4,10,0.78); backdrop-filter: blur(8px);
}
.site-modal-card {
    position: relative; z-index: 1; width: min(980px, calc(100% - 20px)); max-height: calc(100vh - 20px); overflow: auto;
    margin: 10px auto; padding: 22px; background: linear-gradient(180deg, rgba(5, 11, 24, 0.98), rgba(2, 8, 18, 0.98));
    border: 1px solid var(--border); box-shadow: var(--shadow);
    clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}
.site-modal-close {
    position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: rgba(255,255,255,0.06); color: white; font-size: 22px; cursor: pointer;
}
.modal-cover { width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; border: 1px solid rgba(87,150,255,0.18); margin-bottom: 16px; }
.modal-meta { color: var(--muted); margin-bottom: 8px; }
.modal-content { color: #dce9fb; line-height: 1.65; font-size: 17px; }
.empty-state { padding: 16px; color: var(--muted); border: 1px dashed rgba(87,150,255,0.16); }
@media (max-width: 1200px) {
    .hero-login-grid, .home-content-grid { grid-template-columns: 1fr; }
    .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .style-card:nth-child(2) { border-right: 0; }
    .style-card:nth-child(-n+2) { border-bottom: 1px solid rgba(87,150,255,0.16); }
}
@media (max-width: 900px) {
    .resource-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .update-row { grid-template-columns: 1fr; }
    .update-thumb { width: 100%; height: 160px; }
    .row-side { justify-items: start; text-align: left; }
}
@media (max-width: 640px) {
    .landing-shell { width: calc(100% - 10px); }
    .resource-strip, .style-grid { grid-template-columns: 1fr; }
    .style-card { border-right: 0; border-bottom: 1px solid rgba(87,150,255,0.16); }
    .event-row { grid-template-columns: 1fr; }
    .landing-footer { flex-direction: column; align-items: flex-start; }
}


/* ===== Harmonisation HUD V2 visible ===== */
:root {
  --hudv2-bg: #040a14;
  --hudv2-panel: linear-gradient(180deg, rgba(6,14,28,.94), rgba(4,10,20,.96));
  --hudv2-panel-soft: rgba(255,255,255,.035);
  --hudv2-border: rgba(86,156,255,.24);
  --hudv2-border-strong: rgba(120,185,255,.40);
  --hudv2-shadow: 0 20px 48px rgba(0,0,0,.34), 0 0 0 1px rgba(66,133,244,.08);
  --hudv2-text: #eef6ff;
  --hudv2-muted: #9fb0c8;
  --hudv2-accent: #2494ff;
  --hudv2-accent-2: #6bc3ff;
}
html { color-scheme: dark; }
body {
  background-color: var(--hudv2-bg) !important;
  color: var(--hudv2-text) !important;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(37,122,255,.12), transparent 24%), radial-gradient(circle at top left, rgba(43,198,255,.07), transparent 18%);
  z-index: 0;
}
.page-overlay { background: linear-gradient(180deg, rgba(3,8,16,.18), rgba(1,5,10,.42)) !important; }
.banner-image {
  border-radius: 24px !important;
  border: 1px solid rgba(106,176,255,.34) !important;
  box-shadow: 0 22px 50px rgba(0,0,0,.30), 0 0 0 1px rgba(106,176,255,.08) !important;
}
.main-header, .top-bar, .panel-shell, .panel, .info-panel, .world-card, .admin-entry-card,
.compact-line-card, .message-item, .reader-body, .table-wrap, .map-side-card, .map-sidebar-card,
.map-legend-card, .map-toolbar, .ranking-minimap-card, .hero-panel, .login-panel, .style-card,
.updates-panel, .events-panel, .style-panel, .world-panel, .landing-footer,
.village-nav-panel, .village-right-column, .caserne-panel, .caserne-side-panel,
.overview-section-card, .overview-priority-card, .military-card, .forge-card-soft,
.modal-card, .modal-card-large, .site-modal-card {
  background: var(--hudv2-panel) !important;
  border: 1px solid var(--hudv2-border) !important;
  box-shadow: var(--hudv2-shadow) !important;
  border-radius: 22px !important;
  backdrop-filter: blur(10px);
}
.panel-header, .section-head, .login-head, .modal-header {
  border-bottom: 1px solid rgba(120,185,255,.12) !important;
}
input, select, textarea, button,
.forge-input, .map-search-input, .territory-filter-select {
  border-radius: 14px !important;
}
input, select, textarea, .forge-input, .map-search-input, .territory-filter-select {
  background: rgba(7,14,27,.94) !important;
  border: 1px solid rgba(120,185,255,.18) !important;
  color: var(--hudv2-text) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
input:focus, select:focus, textarea:focus, .forge-input:focus, .map-search-input:focus, .territory-filter-select:focus {
  outline: none !important;
  border-color: rgba(100,180,255,.55) !important;
  box-shadow: 0 0 0 3px rgba(36,148,255,.16) !important;
}
.btn, .btn-primary, .btn-secondary, .btn-danger, .btn-ghost, .btn-small, .mini-btn, .nav-pill, .tab-btn, .quick-link, .side-links a, .side-links button, .more-link {
  border-radius: 14px !important;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease !important;
}
.btn-primary, .nav-pill.active, .tab-btn.active, .quick-link.active {
  background: linear-gradient(180deg, rgba(39,138,255,.98), rgba(16,102,214,.98)) !important;
  border-color: rgba(132,195,255,.36) !important;
  box-shadow: 0 10px 22px rgba(23,117,235,.25) !important;
}
.btn-secondary, .btn-ghost, .more-link, .nav-pill, .tab-btn, .quick-link, .side-links a, .side-links button {
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(120,185,255,.16) !important;
  color: var(--hudv2-text) !important;
}
.btn:hover, .btn-primary:hover, .btn-secondary:hover, .btn-danger:hover, .btn-ghost:hover, .btn-small:hover, .mini-btn:hover, .nav-pill:hover, .tab-btn:hover, .quick-link:hover, .side-links a:hover, .side-links button:hover, .more-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(0,0,0,.20);
}
.table-wrap, table {
  overflow: hidden;
  border-radius: 18px !important;
}
table thead th {
  background: rgba(255,255,255,.04) !important;
  color: #dceaff !important;
}
table tbody tr:nth-child(even) { background: rgba(255,255,255,.02) !important; }
table tbody tr:hover { background: rgba(69,119,255,.09) !important; }
.eyebrow, .panel-kicker, .context-note, .panel-note, .overview-section-note { color: var(--hudv2-accent-2) !important; letter-spacing: .08em; }
.hero-description, .admin-subline, .reader-status, .context-stat-label, .stat-label, .top-meta-label, .resource-label { color: var(--hudv2-muted) !important; }
.badge, .pill, .account-pill, .forge-cost-pill {
  background: rgba(36,148,255,.12) !important;
  border: 1px solid rgba(120,185,255,.18) !important;
  color: #dcebff !important;
  border-radius: 999px !important;
}
@media (max-width: 980px) {
  .main-header, .top-bar, .panel-shell, .panel, .info-panel, .world-card, .message-item, .reader-body, .table-wrap, .hero-panel, .login-panel, .style-card, .updates-panel, .events-panel, .style-panel, .world-panel, .landing-footer, .village-nav-panel, .village-right-column, .caserne-panel, .caserne-side-panel, .overview-section-card, .overview-priority-card, .military-card, .forge-card-soft, .modal-card, .modal-card-large, .site-modal-card { border-radius: 18px !important; }
}


.discord-action,
.discord-card-link,
.footer-discord-link {
    text-decoration: none;
}

.discord-action {
    gap: 10px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(88, 101, 242, 0.95), rgba(64, 78, 210, 0.95));
    border: 1px solid rgba(185, 196, 255, 0.45);
    box-shadow: 0 0 22px rgba(88, 101, 242, 0.26);
}

.discord-action svg,
.discord-card-link svg {
    width: 24px;
    height: 24px;
    display: block;
    fill: currentColor;
    flex: 0 0 auto;
}

.discord-card-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    padding: 0 16px;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(180deg, rgba(88, 101, 242, 0.92), rgba(64, 78, 210, 0.92));
    border: 1px solid rgba(185, 196, 255, 0.40);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.20), 0 0 20px rgba(88, 101, 242, 0.22);
    position: relative;
    z-index: 2;
}

.discord-action:hover,
.discord-card-link:hover,
.footer-discord-link:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.footer-discord-link {
    color: #dfe7ff;
    font-weight: 800;
}

.site-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(2, 6, 23, .78);
    backdrop-filter: blur(10px);
}

.site-popup-card {
    width: min(680px, 96vw);
    max-height: 88vh;
    overflow: auto;
    position: relative;
    padding: 26px;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(15, 23, 42, .98), rgba(30, 41, 59, .96));
    border: 1px solid rgba(125, 211, 252, .28);
    box-shadow: 0 30px 90px rgba(0,0,0,.55), 0 0 35px rgba(56,189,248,.14);
    color: #f8fafc;
}

.site-popup-image {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 18px;
}

.site-popup-card h2 {
    margin: 0 0 12px;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.site-popup-content {
    line-height: 1.65;
    color: rgba(226,232,240,.92);
    margin-bottom: 20px;
}

.site-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(15,23,42,.88);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.site-popup-ok {
    border: none;
    border-radius: 14px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}


/* =========================================================
   Patch V9 — Index : actualités remontées au-dessus du style
   pour éviter le grand vide sous les cartes de présentation.
   ========================================================= */
.featured-updates-panel {
    min-height: 0;
}

.featured-updates-panel .updates-list {
    gap: 10px;
}

.featured-updates-panel .update-row {
    grid-template-columns: 112px minmax(0, 1fr) auto;
    min-height: 92px;
    background: linear-gradient(90deg, rgba(23, 84, 165, .14), rgba(255,255,255,.025));
}

.featured-updates-panel .update-thumb {
    width: 112px;
    height: 72px;
    clip-path: var(--omega-cut);
    border-radius: 0 !important;
}

.compact-style-panel .style-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-style-panel .style-card {
    min-height: 108px;
    background: linear-gradient(180deg, rgba(10, 28, 58, .48), rgba(3, 12, 28, .72));
}

.home-right-column .world-panel,
.home-right-column .events-panel,
.home-left-column .updates-panel,
.home-left-column .style-panel {
    width: 100%;
}

@media (max-width: 900px) {
    .featured-updates-panel .update-row {
        grid-template-columns: 1fr;
    }
    .featured-updates-panel .update-thumb {
        width: 100%;
        height: 160px;
    }
}

/* =========================================================
   Patch V6 — Index harmonisé avec le thème Village
   Boutons angulaires, surbrillance HUD et boutons inscription.
   ========================================================= */
:root {
    --omega-cut: polygon(12px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 8px 100%, 0 calc(100% - 8px), 0 12px);
    --omega-panel-cut: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}

.btn,
.tiny-action,
.more-link,
button,
.register-link {
    position: relative;
    overflow: hidden;
    border-radius: 0 !important;
    clip-path: var(--omega-cut);
    border: 1px solid rgba(72, 158, 255, 0.46) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        inset 0 -12px 22px rgba(0, 31, 74, .22),
        0 10px 22px rgba(0,0,0,.25);
    transition:
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease,
        filter .16s ease,
        background .16s ease;
}

.btn::before,
.tiny-action::before,
.more-link::before,
button::before,
.register-link::before {
    content: '';
    position: absolute;
    inset: 1px;
    pointer-events: none;
    opacity: 0;
    background:
        linear-gradient(90deg, transparent, rgba(107, 210, 255, .24), transparent),
        radial-gradient(circle at 50% 0%, rgba(112, 199, 255, .26), transparent 54%);
    transform: translateX(-35%);
    transition: opacity .16s ease, transform .22s ease;
}

.btn:hover,
.tiny-action:hover,
.more-link:hover,
button:hover,
.register-link:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    border-color: rgba(106, 211, 255, .9) !important;
    box-shadow:
        inset 0 0 18px rgba(73, 167, 255, .24),
        0 0 0 1px rgba(73, 167, 255, .18),
        0 0 24px rgba(38, 145, 255, .24),
        0 12px 24px rgba(0,0,0,.28);
}

.btn:hover::before,
.tiny-action:hover::before,
.more-link:hover::before,
button:hover::before,
.register-link:hover::before {
    opacity: 1;
    transform: translateX(35%);
}

.btn-primary,
.hero-actions .btn-primary,
.login-form .btn-primary {
    background: linear-gradient(180deg, rgba(47, 141, 255, .98), rgba(17, 78, 204, .98)) !important;
    color: #fff !important;
}

.btn-outline,
.hero-actions .btn-outline,
.more-link,
.register-link {
    background: linear-gradient(180deg, rgba(12, 31, 62, .92), rgba(4, 16, 36, .94)) !important;
    color: var(--text) !important;
    text-decoration: none;
}

.discord-action {
    background: linear-gradient(180deg, rgba(42, 82, 180, .95), rgba(22, 45, 118, .96)) !important;
}

.panel-shell,
.login-panel,
.hero-panel,
.style-panel,
.world-panel,
.updates-panel,
.events-panel,
.landing-footer,
.world-entry,
.update-row,
.event-row,
.style-card,
.site-modal-card {
    border-radius: 0 !important;
    clip-path: var(--omega-panel-cut);
}

.login-form input {
    border-radius: 0 !important;
    clip-path: var(--omega-cut);
    border-color: rgba(72, 158, 255, .30) !important;
    background: rgba(5, 16, 36, .82) !important;
}

.login-form input:focus {
    border-color: rgba(106, 211, 255, .82) !important;
    box-shadow: 0 0 0 3px rgba(50, 139, 255, .16), 0 0 24px rgba(50, 139, 255, .18) !important;
}

.hero-actions .btn:first-child,
.login-form .btn-primary {
    letter-spacing: .03em;
    text-transform: uppercase;
}

@media (max-width: 720px) {
    .btn,
    .tiny-action,
    .more-link,
    button,
    .register-link {
        clip-path: polygon(10px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 8px 100%, 0 calc(100% - 8px), 0 10px);
    }
}
