/* =======================
   ОСНОВА
   ======================= */
body {
    font-family: "Segoe UI", "Roboto", sans-serif;
    margin: 0;
    padding-bottom: 100px;
    background-color: #f8f8f8;
}

/* Ограничение ширины на десктопах */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0px;
}

/* =======================
   НАВИГАЦИЯ
   ======================= */
nav {
    background: #6E2CA0;
    padding: 10px 20px;
    z-index: 1000;
    position: sticky;
    top: 0; 

}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    
}

.logo {
    height: 40px;
    border-radius: 4px;
    object-fit: contain;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Горизонтальное меню (десктоп) */
.nav-links-main {
    display: flex;
    gap: 10px;
}

/* =======================
   ССЫЛКИ
   ======================= */
nav a {
    text-decoration: none;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 5px;
    background: transparent;
    transition: background 0.3s ease;
    white-space: nowrap;
    font-size: 17px;
}

nav a.active {
    background-color: #8E44AD;
    font-weight: bold;
}

/* =======================
   БУРГЕР
   ======================= */
.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 26px;
    height: 26px;
    justify-content: center;
    position: relative;
    z-index: 1001;
}

.burger div {
    width: 100%;
    height: 3px;
    background-color: white;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.burger.open div:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.burger.open div:nth-child(2) {
    opacity: 0;
}
.burger.open div:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* =======================
   ШЕСТЕРЕНКА (админ-бургер)
   ======================= */
.burger.gear {
    width: auto;
    height: auto;
    padding: 5px 10px;
    font-size: 22px;
    background: none;
    border: none;
    color: #FFD700;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.burger.gear div { display: none; }
.burger.gear::before { content: "⚙️"; font-size: 24px; }

/* Анимация вращения */
@keyframes slow-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.burger.gear.open::before {
    animation: slow-spin 2s linear infinite;
}

/* =======================
   ВЫПАДАЮЩЕЕ МЕНЮ
   ======================= */
.nav-links {
    display: none;
    position: absolute;
    top: 65px;
    right: 10%;
    background-color: #6E2CA0;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}
.nav-links.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* =======================
   MAIN
   ======================= */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* =======================
   FOOTER
   ======================= */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #6E2CA0;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    color: #ffffff;
    border-top: 1px solid #8E44AD;
    z-index: 1000; /* 📌 футер всегда сверху */
}


/* =======================
   АДАПТИВ
   ======================= */
@media (max-width: 1024px) {
    body { font-size: 16px; }

    nav a {
        font-size: 18px;
        padding: 12px 16px;
    }

    .burger { display: flex; }
    .nav-links-main { display: none; }
    .nav-links {
        width: calc(50% - 40px);
        right: 10px;
            text-align: right;        /* ссылки прижаты вправо */
    align-items: flex-end;    /* flex-элементы (ссылки) выравниваются по правому краю */
    }

    table {
        width: 100%;
        font-size: 14px;
        overflow-x: auto;
        display: block;
    }

    th, td { padding: 8px 10px; }
    main { padding: 0 10px; }
}

/* =======================
   МИНИ-ТОСТ XP
   ======================= */
.xp-flyout {
  font: 600 14px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: rgba(0,0,0,.75);
  color: #fff;
  padding: 4px 8px;
  border-radius: 10px;
  transform: translateY(0);
  opacity: 1;
  transition: transform .45s ease, opacity .45s ease;
  z-index: 5;
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
}
