:root {
    color-scheme: dark;
    --bg: #07101a;
    --panel: #101b27;
    --panel-2: #142131;
    --line: #263545;
    --text: #eef5ff;
    --muted: #91a1b4;
    --orange: #ff7417;
    --orange-2: #ff9a3d;
    --blue: #3aa0ff;
    --green: #65d46e;
    --panel-glow: inset 0 1px 0 rgba(255,255,255,.04), 0 16px 40px rgba(0,0,0,.24);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background:
        linear-gradient(180deg, #07101a 0%, #08121d 52%, #060d16 100%),
        var(--bg);
    color: var(--text);
    font-family: Inter, Segoe UI, Arial, sans-serif;
    font-size: 14px;
}
a { color: inherit; text-decoration: none; }
.wrap { width: min(1320px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
    position: sticky; top: 0; z-index: 10;
    border-bottom: 1px solid rgba(255,255,255,.06);
    background: rgba(7,16,26,.96); backdrop-filter: blur(18px);
}
.topbar .wrap { width: min(1520px, calc(100% - 32px)); }
.nav { height: 66px; display: flex; align-items: center; justify-content: flex-start; gap: 24px; }
.brand { font-weight: 950; font-size: 28px; letter-spacing: .2px; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.brand span { color: var(--orange); }
.menu { display: flex; align-items: center; gap: 28px; margin-left: auto; font-size: 13px; font-weight: 800; text-transform: uppercase; color: #dbe8f6; }
.actions { display: flex; align-items: center; gap: 8px; }
.lang, .btn {
    border: 1px solid var(--line); background: #0b1420; color: var(--text);
    border-radius: 6px; height: 36px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800;
}
.lang.active { border-color: var(--orange); color: var(--orange-2); }
.btn { background: linear-gradient(180deg, var(--orange-2), var(--orange)); border-color: #ff7a1b; box-shadow: 0 8px 22px rgba(255,116,23,.25); }
.btn.secondary { background: #111c29; box-shadow: none; border-color: var(--line); }

.hero {
    display: block;
    height: clamp(340px, 28vw, 460px);
    min-height: 340px;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    background:
        linear-gradient(90deg, rgba(7,16,26,.98) 0%, rgba(7,16,26,.66) 27%, rgba(7,16,26,.1) 58%, rgba(7,16,26,.9) 100%),
        linear-gradient(180deg, rgba(7,16,26,0) 0%, rgba(7,16,26,.08) 46%, rgba(7,16,26,.72) 82%, #07101a 100%),
        url('/images/hero-fantasy-1600x600.jpg') center 35% / cover no-repeat;
    border-bottom: 0;
}
.hero-link { cursor: pointer; }
.hero-link:hover { filter: brightness(1.04); }
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 17% 55%, rgba(3,9,16,.72), transparent 30%),
        radial-gradient(ellipse at 68% 22%, rgba(255,116,23,.16), transparent 20%);
    opacity: 1;
    pointer-events: none;
}
.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 150px;
    background: linear-gradient(180deg, rgba(7,16,26,0), #07101a 78%, #07101a);
    pointer-events: none;
}
.hero-inner { position: relative; padding: 28px 0 20px; }
.eyebrow { color: var(--orange-2); text-transform: uppercase; letter-spacing: 7px; font-weight: 800; }
h1 { margin: 14px 0 8px; font-size: clamp(40px, 6vw, 70px); line-height: .95; text-transform: uppercase; }
h1 b { display: block; color: var(--orange); text-shadow: 0 6px 18px rgba(255,116,23,.35); }
.lead { color: #d8e2ef; font-size: 17px; margin: 0 0 18px; }
.hero-points { display: flex; gap: 40px; flex-wrap: wrap; color: #f4f7fb; }
.hero-points strong { display: grid; grid-template-columns: 28px auto; column-gap: 10px; align-items: center; }
.hero-points img { width: 28px; height: 28px; grid-row: span 2; filter: drop-shadow(0 0 8px rgba(255,116,23,.38)); }
.hero-points span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

.filters, .panel {
    background:
        linear-gradient(180deg, rgba(23,36,50,.96), rgba(13,24,35,.96));
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--panel-glow);
}
.filters { margin: -150px auto 10px; padding: 12px; display: grid; grid-template-columns: 1.25fr .85fr .85fr .85fr auto; gap: 10px; position: relative; z-index: 2; }
.filters-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 16px; }
.filters-title { margin: 0; font-size: 20px; line-height: 1.2; text-transform: none; letter-spacing: 0; }
input, select, textarea {
    width: 100%; border: 1px solid #2b3b4d; border-radius: 6px; background: linear-gradient(180deg, #101b28, #0b1520); color: var(--text);
    min-height: 40px; padding: 0 12px;
}
textarea { min-height: 110px; padding-top: 10px; }
.chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip { background: linear-gradient(180deg, #1a2838, #111c28); border: 1px solid #2b3b4d; border-radius: 6px; padding: 9px 14px; font-size: 12px; font-weight: 800; color: #d7e4f3; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; margin-top: 0; align-items: start; }
.main-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.panel { overflow: hidden; }
.panel-head { height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(255,116,23,.16), rgba(255,116,23,.04) 36%, transparent); }
.panel-head.blue { background: linear-gradient(90deg, rgba(58,160,255,.18), rgba(58,160,255,.04) 36%, transparent); }
.panel-title { display: inline-flex; align-items: center; gap: 9px; min-width: 0; color: var(--text); font-weight: 950; text-transform: uppercase; font-size: 16px; white-space: nowrap; }
.panel-title img { width: 22px; height: 22px; flex: 0 0 auto; filter: drop-shadow(0 0 8px rgba(255,116,23,.28)); }
.mini-link { color: var(--muted); font-size: 12px; border: 1px solid var(--line); border-radius: 5px; padding: 5px 9px; }
.server-head-row {
    display: grid;
    grid-template-columns: 76px minmax(118px, 1fr) 58px 48px 76px 12px;
    gap: 8px;
    padding: 8px 12px 6px;
    color: #8ea0b4;
    font-size: 11px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.server-head-row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-row {
    display: grid;
    grid-template-columns: 76px minmax(118px, 1fr) 58px 48px 76px 12px;
    gap: 8px;
    align-items: center;
    min-height: 47px;
    padding: 7px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.server-row > * { min-width: 0; }
.server-row.small { grid-template-columns: 32px minmax(0, 1fr) 48px; }
.server-row:hover { background: rgba(255,255,255,.025); }
.badge { display: inline-flex; align-items: center; justify-content: center; width: 100%; max-width: 76px; min-width: 0; height: 26px; border-radius: 6px; background: linear-gradient(180deg, #ff9f35, #f26310); color: white; font-weight: 950; font-size: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 6px 14px rgba(255,116,23,.18); }
.badge.blue { background: linear-gradient(180deg, #4eb6ff, #238bea); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 6px 14px rgba(58,160,255,.18); }
.name { display: block; font-weight: 900; color: white; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rate { color: var(--orange-2); font-weight: 900; white-space: nowrap; text-align: left; }
.date { display: block; color: #dce8f7; font-weight: 700; white-space: nowrap; }
.row-arrow img { width: 16px; height: 16px; opacity: .9; }
.muted { color: var(--muted); }
.side { display: grid; gap: 8px; align-content: start; }
.side-card { padding: 14px; }
.compact-calendar {
    padding: 14px;
    color: #fff;
    background: #0a1019;
}
.compact-calendar-head {
    height: 40px;
    min-height: 40px;
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    align-items: center;
    background: #302b41;
    border-radius: 5px;
    margin-bottom: 18px;
}
.compact-calendar-head a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    color: #9a93b3;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
}
.compact-calendar-head a:hover { color: #fff; }
.compact-calendar-head strong {
    text-align: center;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    line-height: 40px;
}
.compact-calendar-weekdays,
.compact-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.compact-calendar-weekdays {
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 950;
    text-transform: lowercase;
}
.compact-calendar-weekdays span,
.compact-calendar-days a {
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.compact-calendar-days a {
    border: 1px solid transparent;
    border-radius: 4px;
    color: #fff;
    font-size: 15px;
    font-weight: 850;
}
.compact-calendar-days a.outside { color: #716b88; }
.compact-calendar-days a.selected {
    color: #716b88;
    border-color: #7a4634;
    background: rgba(255,116,23,.08);
}
.compact-calendar-days a:hover {
    border-color: var(--orange);
    color: #fff;
}
.category-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.06); color: #dbe7f5; }
.category-row span:last-child { color: #dce8f7; font-weight: 800; }
.promo-banner {
    aspect-ratio: 9 / 16;
    min-height: 480px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: center top / cover no-repeat;
    position: relative;
}
.promo-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7,16,26,.04) 0%, rgba(7,16,26,.18) 42%, rgba(7,16,26,.88) 100%),
        radial-gradient(ellipse at 50% 18%, rgba(255,116,23,.24), transparent 32%);
}
.promo-banner-content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    width: 100%;
    padding: 18px;
    color: var(--text);
}
.promo-banner-content > span:not(.panel-title):not(.btn) { color: #dbe7f5; line-height: 1.35; }
.promo-banner .btn { width: max-content; }
.lower { display: grid; grid-template-columns: 1fr 1fr 1.05fr; gap: 12px; margin-top: 12px; }
.lower .server-row { grid-template-columns: 76px minmax(0, 1fr) 48px; }
.lower .server-row > :nth-child(4),
.lower .server-row > :nth-child(5),
.lower .server-row > :nth-child(6) { display: none; }
.footer { margin-top: 28px; padding: 28px 0; border-top: 1px solid rgba(255,255,255,.06); color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }

.page { padding: 24px 0; }
.calendar-panel { padding: 16px; }
.calendar-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.calendar-head h2 { margin: 0 0 6px; }
.calendar-nav { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.calendar-nav strong { min-width: 140px; text-align: center; text-transform: capitalize; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.calendar-weekdays { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.calendar-weekdays span { padding: 0 4px; }
.calendar-day {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #263545;
    border-radius: 8px;
    background: linear-gradient(180deg, #122033, #0c1622);
}
.calendar-day:hover { border-color: var(--orange); box-shadow: 0 10px 24px rgba(255,116,23,.12); }
.calendar-day.today { border-color: var(--orange); background: linear-gradient(180deg, rgba(255,116,23,.28), rgba(16,27,39,.96)); }
.calendar-day.muted-day { opacity: .46; }
.day-number { font-size: 24px; font-weight: 950; line-height: 1; }
.day-count { color: var(--orange-2); font-size: 12px; font-weight: 850; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.alert { padding: 12px 14px; border-radius: 8px; background: rgba(101,212,110,.14); border: 1px solid rgba(101,212,110,.35); margin-bottom: 12px; }
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: #07101a; border-right: 1px solid var(--line); padding: 18px; }
.admin-side a { display: block; padding: 10px; border-radius: 6px; color: #dbe8f6; }
.admin-side a:hover { background: #101b27; }
.admin-main { padding: 24px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { padding: 16px; }
.stat b { font-size: 28px; display: block; }

@media (max-width: 980px) {
    .menu { display: none; }
    .hero { height: 320px; min-height: 320px; }
    .filters { margin-top: -88px; }
    .filters, .grid, .main-grid, .lower, .footer-grid, .form-grid, .admin-layout, .stats { grid-template-columns: 1fr; }
    .calendar-head { display: grid; }
    .calendar-nav { justify-content: space-between; }
    .calendar-weekdays, .calendar-grid { gap: 5px; }
    .calendar-day { min-height: 76px; padding: 8px; }
    .day-number { font-size: 18px; }
    .day-count { font-size: 10px; }
    .server-row { grid-template-columns: 54px minmax(0, 1fr) 58px; }
    .server-head-row { grid-template-columns: 54px minmax(0, 1fr) 58px; }
    .server-head-row > :nth-child(4), .server-head-row > :nth-child(5), .server-head-row > :nth-child(6) { display: none; }
    .server-row > :nth-child(4), .server-row > :nth-child(5), .server-row > :nth-child(6) { display: none; }
}
