:root {
    --tw-bg-1: #0d0819;
    --tw-bg-2: #150d2b;
    --tw-card: rgba(30, 20, 55, 0.65);
    --tw-accent: #8b5cf6;
    --tw-accent-2: #a855f7;
    --tw-accent-3: #c084fc;
    --tw-grad: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    --tw-text: #e8e4f3;
    --tw-dim: #a99fc4;
    --tw-border: rgba(139, 92, 246, 0.22);
}

body, .app {
    background: radial-gradient(ellipse at top, #1e1440 0%, #0d0819 55%) fixed !important;
    color: var(--tw-text) !important;
    min-height: 100vh;
    font-family: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.navbar, .navbar-custom, header.navbar, nav {
    background: rgba(13, 8, 25, 0.85) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--tw-border) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.navbar a, .navbar .nav-link, .navbar-brand, nav a {
    color: var(--tw-text) !important;
    font-weight: 500;
    transition: color 0.2s;
}
.navbar a:hover, .navbar .nav-link:hover, nav a:hover {
    color: var(--tw-accent-3) !important;
}

.jumbotron, .hero, .welcome, .banner, .home-header {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.25) 0%, rgba(168, 85, 247, 0.1) 100%) !important;
    border: 1px solid var(--tw-border) !important;
    border-radius: 20px !important;
    color: var(--tw-text) !important;
    padding: 60px 30px !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(124, 58, 237, 0.15);
    margin: 20px 0;
}

.jumbotron h1, .hero h1, .welcome h1 {
    font-size: 2.6rem !important;
    font-weight: 800;
    background: var(--tw-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.card, .panel, .box, .widget {
    background: var(--tw-card) !important;
    border: 1px solid var(--tw-border) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    color: var(--tw-text) !important;
    overflow: hidden;
}

.card-header, .panel-heading, .widget-header {
    background: rgba(124, 58, 237, 0.12) !important;
    border-bottom: 1px solid var(--tw-border) !important;
    color: var(--tw-text) !important;
    font-weight: 600;
    padding: 14px 20px;
}

.btn, button.btn, .btn-primary {
    background: var(--tw-grad) !important;
    border: none !important;
    border-radius: 12px !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 10px 22px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35) !important;
}
.btn:hover, button.btn:hover, .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.55) !important;
    filter: brightness(1.1);
}

.btn-secondary, .btn-outline, .btn-default {
    background: rgba(139, 92, 246, 0.08) !important;
    border: 1px solid var(--tw-accent) !important;
    color: var(--tw-accent-3) !important;
    box-shadow: none !important;
}

a { color: var(--tw-accent-3) !important; transition: color 0.15s; }
a:hover { color: #d8b4fe !important; text-decoration: none !important; }

input, textarea, select, .form-control {
    background: rgba(13, 8, 25, 0.7) !important;
    border: 1px solid var(--tw-border) !important;
    border-radius: 10px !important;
    color: var(--tw-text) !important;
    padding: 11px 15px !important;
}
input:focus, textarea:focus, select:focus, .form-control:focus {
    border-color: var(--tw-accent) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25) !important;
    outline: none !important;
    background: rgba(20, 13, 43, 0.9) !important;
}
input::placeholder, textarea::placeholder { color: var(--tw-dim) !important; }

footer, .footer {
    background: rgba(13, 8, 25, 0.85) !important;
    border-top: 1px solid var(--tw-border) !important;
    color: var(--tw-dim) !important;
    padding: 24px 0 !important;
    backdrop-filter: blur(10px);
}
footer a, .footer a { color: var(--tw-accent-3) !important; }

h1, h2, h3, h4, h5, h6 {
    color: var(--tw-text) !important;
    font-weight: 700;
    letter-spacing: -0.01em;
}

table, .table { color: var(--tw-text) !important; background: transparent !important; }
.table thead th {
    background: rgba(124, 58, 237, 0.1) !important;
    border-bottom: 1px solid var(--tw-border) !important;
    color: var(--tw-dim) !important;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
}
.table td, .table th { border-color: var(--tw-border) !important; }

.alert {
    background: var(--tw-card) !important;
    border: 1px solid var(--tw-border) !important;
    border-radius: 12px !important;
    color: var(--tw-text) !important;
    backdrop-filter: blur(10px);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--tw-bg-1); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7c3aed, #a855f7);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #8b5cf6, #c084fc); }

.dropdown-menu {
    background: rgba(20, 13, 43, 0.98) !important;
    border: 1px solid var(--tw-border) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    padding: 8px;
}
.dropdown-item {
    color: var(--tw-text) !important;
    border-radius: 8px;
    padding: 8px 12px;
}
.dropdown-item:hover {
    background: rgba(139, 92, 246, 0.15) !important;
    color: var(--tw-accent-3) !important;
}

.badge, .label {
    /* без background и color — берём из inline style роли */
    border-radius: 8px;
    padding: 4px 10px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* ============================================
   TerraWorld — дополнения под Carbon
   ============================================ */

/* --- Герой-блок на главной --- */
.home-background {
    position: relative;
    border-radius: 20px !important;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.3);
    min-height: 380px;
    margin-bottom: 40px !important;
}

.home-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(124, 58, 237, 0.55) 0%,
        rgba(13, 8, 25, 0.8) 100%);
    pointer-events: none;
    z-index: 1;
}

.home-background > * {
    position: relative;
    z-index: 2;
}

/* Заголовок hero */
h1.title-no-bg {
    font-size: 3.5rem !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #ffffff 0%, #c084fc 50%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    text-shadow: none !important;
    filter: drop-shadow(0 4px 20px rgba(168, 85, 247, 0.6));
    margin-bottom: 16px;
}

.home-background h2 {
    color: var(--tw-text) !important;
    font-weight: 400 !important;
    opacity: 0.95;
    font-size: 1.3rem !important;
}

/* --- Прогресс-бары серверов --- */
.progress {
    background: rgba(13, 8, 25, 0.6) !important;
    border-radius: 10px !important;
    height: 8px !important;
    overflow: hidden;
}
.progress-bar {
    background: linear-gradient(90deg, #7c3aed, #a855f7, #c084fc) !important;
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* --- Заголовки секций ("Серверы", "Новости") --- */
h2.text-center {
    font-size: 1.8rem !important;
    margin-bottom: 28px !important;
    background: var(--tw-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    text-align: center;
    font-weight: 700;
}

/* --- Карточки постов и серверов --- */
.card-title {
    color: var(--tw-text) !important;
    font-weight: 700;
    font-size: 1.2rem;
}
.card-subtitle {
    color: var(--tw-dim) !important;
    font-weight: 400 !important;
    font-size: 0.85rem !important;
    margin-bottom: 10px;
}
.card-text {
    color: var(--tw-text) !important;
    opacity: 0.85;
}

/* --- Картинки в карточках --- */
.card-img-top {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    transition: transform 0.3s ease;
}
.card a:hover .card-img-top {
    transform: scale(1.03);
}

/* --- Обёртка-ссылка вокруг карточек постов --- */
.card > a {
    text-decoration: none !important;
    display: block;
    color: inherit;
}
.card > a .card-body {
    color: var(--tw-text) !important;
}

/* --- Discord / Twitter виджеты --- */
iframe[src*="discordapp.com"],
iframe[src*="discord.com"] {
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.twitter-widget {
    border-radius: 16px !important;
    overflow: hidden;
    background: var(--tw-card) !important;
    border: 1px solid var(--tw-border) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* --- Бейдж "оффлайн" --- */
.badge.bg-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    font-weight: 600;
}

/* --- Разделители --- */
hr {
    border-color: var(--tw-border) !important;
    opacity: 0.5;
}

/* ============================================
   TerraWorld — фиксы дропдауна и z-index
   ============================================ */

/* Навбар должен быть выше всего контента */
header.navbar, .navbar, nav.navbar {
    position: relative;
    z-index: 1050 !important;
}

/* Дропдаун — плотный, без прозрачности */
.dropdown-menu {
    background: #150d2b !important;
    background-color: #150d2b !important;
    border: 1px solid rgba(139, 92, 246, 0.45) !important;
    border-radius: 12px !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.85) !important;
    padding: 8px !important;
    z-index: 1060 !important;
    opacity: 1 !important;
    margin-top: 8px !important;
    min-width: 220px;
}

/* Элементы дропдауна — яркие и кликабельные */
.dropdown-menu .dropdown-item,
.dropdown-menu > a,
.dropdown-menu > button,
.dropdown-menu > form > button {
    color: #e8e4f3 !important;
    opacity: 1 !important;
    font-weight: 500 !important;
    background: transparent !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.15s ease;
    font-size: 0.95rem;
    text-decoration: none !important;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu > a:hover,
.dropdown-menu > button:hover,
.dropdown-menu > form > button:hover {
    background: rgba(139, 92, 246, 0.3) !important;
    color: #c084fc !important;
    transform: translateX(2px);
}

/* Иконки в дропдауне (колокольчик уведомлений) */
.dropdown-menu .dropdown-item i,
.dropdown-menu .dropdown-item svg {
    color: #c084fc !important;
    opacity: 1 !important;
    margin-right: 8px;
}

/* Уведомления в дропдауне */
.dropdown-menu .dropdown-header {
    color: #a99fc4 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 14px !important;
    font-weight: 600;
    opacity: 1 !important;
}

/* Разделитель */
.dropdown-divider {
    border-color: rgba(139, 92, 246, 0.25) !important;
    margin: 6px 8px !important;
}

/* Стрелка-каретка рядом с ADMIN */
.navbar .dropdown-toggle::after {
    color: #a855f7 !important;
    opacity: 1 !important;
}

/* Пустое уведомление */
.dropdown-menu .text-muted,
.dropdown-menu .text-center {
    color: #a99fc4 !important;
    opacity: 1 !important;
    padding: 20px 14px !important;
}

/* Гарантия кликабельности всего в дропдауне */
.dropdown-menu * {
    pointer-events: auto !important;
}

/* ============================================
   TerraWorld — логотип в навбаре
   ============================================ */

/* Логотип сайта в навбаре — подсветка */
.navbar-brand img,
.navbar .navbar-brand img,
header.navbar img {
    filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.55))
            drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))
            brightness(1.15) contrast(1.05);
    transition: filter 0.3s ease;
    max-height: 55px;
    width: auto;
}

.navbar-brand:hover img,
.navbar .navbar-brand:hover img {
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.85))
            drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))
            brightness(1.25) contrast(1.08);
}
/* ============================================
   Починка чекбоксов
   ============================================ */

input[type="checkbox"] {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    cursor: pointer !important;
    accent-color: #a855f7 !important;
    margin-right: 8px !important;
    vertical-align: middle !important;
    position: relative !important;
    border: none !important;
    background: transparent !important;
}

input[type="checkbox"]:checked {
    accent-color: #a855f7 !important;
}

input[type="checkbox"]:focus {
    outline: 2px solid rgba(168, 85, 247, 0.4) !important;
    outline-offset: 2px;
}

label:has(input[type="checkbox"]),
.form-check-label {
    color: #e8e4f3 !important;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    user-select: none;
}

.form-check {
    display: flex;
    align-items: center;
    margin: 10px 0;
}
/* ============================================
   Убираем принудительный uppercase
   ============================================ */

/* Навбар */
.navbar,
.navbar *,
.navbar-brand,
.navbar .nav-link,
nav a,
.nav a,
.dropdown-item,
.dropdown-toggle {
    text-transform: none !important;
    font-variant: normal !important;
}

/* Заголовки элементов меню */
.sidebar,
.sidebar *,
.sidebar-link,
.nav-item {
    text-transform: none !important;
}

/* Профиль в навбаре и все пользовательские имена */
.user-name,
.user-nickname,
.profile-name,
.card-title,
h1, h2, h3, h4, h5 {
    text-transform: none !important;
}

/* Кнопки — оставляем возможность капса, но не принудительно */
.btn {
    text-transform: none !important;
}
/* ============================================
   TerraWorld — Карточка игровой статистики
   ============================================ */

.tw-stats-card {
    background: linear-gradient(135deg,
        rgba(124, 58, 237, 0.15) 0%,
        rgba(30, 20, 55, 0.85) 100%) !important;
    border: 1px solid rgba(139, 92, 246, 0.35) !important;
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.15) !important;
}

.tw-stats-card .card-title {
    color: #e8e4f3 !important;
    font-size: 1.3rem !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tw-stats-card .card-title i {
    color: #a855f7 !important;
    font-size: 1.5rem;
}

.tw-stat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(13, 8, 25, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 14px;
    transition: all 0.2s ease;
    height: 100%;
}

.tw-stat-item:hover {
    background: rgba(13, 8, 25, 0.7);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
}

.tw-stat-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.4rem;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.tw-stat-icon-1 {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.tw-stat-icon-2 {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.tw-stat-icon-3 {
    background: linear-gradient(135deg, #ec4899, #a855f7);
}

.tw-stat-content {
    flex: 1;
    min-width: 0;
}

.tw-stat-label {
    color: #a99fc4;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 4px;
}

.tw-stat-value {
    color: #e8e4f3;
    font-size: 1.1rem;
    font-weight: 700;
    word-break: break-word;
}

.tw-stat-value .text-muted {
    color: #a99fc4 !important;
    font-weight: 400;
    font-style: italic;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .tw-stat-item {
        padding: 12px 14px;
    }

    .tw-stat-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 1.2rem;
    }

    .tw-stat-value {
        font-size: 1rem;
    }
}
/* ============================================
   TerraWorld — HERO SECTION
   ============================================ */

.tw-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 100px;
    overflow: hidden;
    background: url('/themes/terraworld/img/hero.png') center/cover no-repeat;
    margin-bottom: 0;
}

.tw-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            transparent 0%,
            transparent 40%,
            rgba(232, 165, 92, 0.05) 60%,
            rgba(11, 7, 16, 0.7) 100%);
    pointer-events: none;
    z-index: 1;
}

.tw-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    width: 100%;
}

.tw-hero__logo {
    width: min(680px, 82vw);
    height: auto;
    margin-bottom: 28px;
    filter:
        drop-shadow(0 12px 45px rgba(0, 0, 0, 0.85))
        drop-shadow(0 0 35px rgba(168, 85, 247, 0.55));
    animation: tw-hero-down .9s ease both;
}

.tw-hero__slogan {
    font-size: clamp(17px, 2vw, 24px);
    color: #e8e4f3;
    font-weight: 400;
    letter-spacing: 1px;
    margin: 0 0 44px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9);
    animation: tw-hero-up 1s ease .15s both;
}

.tw-hero__slogan span {
    color: #e8a55c;
    font-weight: 600;
}

.tw-hero__btns {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
    animation: tw-hero-up 1s ease .3s both;
}

/* Кнопки hero */
.tw-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none !important;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all .3s ease;
    white-space: nowrap;
}

.tw-btn i { font-size: 18px; }

.tw-btn--primary {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff !important;
    box-shadow: 0 12px 38px rgba(139, 92, 246, 0.55);
}
.tw-btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 48px rgba(139, 92, 246, 0.75);
    color: #fff !important;
    filter: brightness(1.08);
}

.tw-btn--ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.tw-btn--ghost:hover {
    border-color: #a855f7;
    background: rgba(139, 92, 246, 0.18);
    transform: translateY(-3px);
    color: #fff !important;
}

/* Стрелка вниз */
.tw-hero__arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(232, 228, 243, 0.7);
    font-size: 26px;
    z-index: 2;
    animation: tw-bounce 2.2s ease-in-out infinite;
    text-decoration: none !important;
}
.tw-hero__arrow:hover { color: #c084fc; }

@keyframes tw-hero-down {
    from { opacity: 0; transform: translateY(-35px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes tw-hero-up {
    from { opacity: 0; transform: translateY(35px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes tw-bounce {
    0%, 100% { transform: translate(-50%, 0); opacity: .55; }
    50%      { transform: translate(-50%, 12px); opacity: 1; }
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .tw-hero { min-height: 88vh; padding: 100px 18px 80px; }
    .tw-hero__logo { width: 88vw; margin-bottom: 20px; }
    .tw-hero__slogan { margin-bottom: 32px; letter-spacing: .5px; }
    .tw-btn {
        padding: 14px 26px;
        font-size: 13px;
        letter-spacing: .8px;
    }
    .tw-hero__btns { gap: 12px; }
}

/* ============================================
   TerraWorld — One-Page Scroll
   ============================================ */


/* --- Фон-слой (fixed, за всем контентом) --- */
.tw-bg-stack {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.tw-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.6s cubic-bezier(.4, 0, .2, 1);
    will-change: opacity, transform;
}
.tw-bg--visible { opacity: 1; }

/* Затенение поверх фонов — для читаемости текста */
.tw-bg-stack::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(13, 8, 25, 0.55) 0%,
        rgba(13, 8, 25, 0.65) 50%,
        rgba(13, 8, 25, 0.85) 100%);
    pointer-events: none;
}

/* --- Секции --- */
.tw-section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px;
    text-align: center;
}
.tw-hero {
    background: transparent !important;
    min-height: 100vh;
}

/* --- Контейнер --- */
.tw-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- Заголовки секций --- */
.tw-section-title {
    font-size: clamp(28px, 3.5vw, 44px) !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
    background: linear-gradient(135deg, #ffffff 0%, #c084fc 60%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 18px rgba(168, 85, 247, 0.4));
}
.tw-section-sub {
    font-size: clamp(15px, 1.4vw, 18px);
    color: #a99fc4 !important;
    margin: 0 0 40px;
    letter-spacing: .3px;
}

/* --- Карточки --- */
.tw-card {
    background: rgba(20, 13, 43, 0.72) !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    border-radius: 18px !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
    color: #e8e4f3 !important;
    text-decoration: none !important;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    overflow: hidden;
}
.tw-card--pad { padding: 32px; }
.tw-card:hover {
    transform: translateY(-4px);
    border-color: rgba(168, 85, 247, 0.6) !important;
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.35);
}
.tw-card-title {
    font-size: 1.4rem !important;
    font-weight: 700;
    color: #e8e4f3 !important;
    margin: 0 0 12px;
}
.tw-muted { color: #a99fc4 !important; font-size: .95rem; line-height: 1.55; }

/* --- Кнопка-компакт --- */
.tw-btn--sm { padding: 12px 24px !important; font-size: 13px !important; }

/* --- Бейдж --- */
.tw-badge {
    display: inline-block;
    padding: 5px 12px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.tw-badge--danger { background: linear-gradient(135deg, #dc2626, #ef4444); }

/* --- Прогресс-бар --- */
.tw-progress {
    background: rgba(13, 8, 25, 0.6);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin: 14px 0 8px;
}
.tw-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #a855f7, #c084fc);
    border-radius: 10px;
    transition: width .5s ease;
}

/* --- Сетка серверов --- */
.tw-servers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}
.tw-server-card { padding: 28px; }
.tw-server-info { color: #e8e4f3; font-weight: 500; margin: 0 0 14px; }
.tw-server-ip {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: .95rem;
    color: #c084fc;
    background: rgba(13, 8, 25, 0.5);
    padding: 10px 14px;
    border-radius: 10px;
    margin: 10px 0 18px;
    word-break: break-all;
}

/* --- Событие / Сообщество --- */
.tw-event-card,
.tw-community-card {
    max-width: 600px;
    margin: 0 auto;
}
.tw-community-icon {
    font-size: 3.5rem;
    color: #a855f7;
    display: block;
    margin-bottom: 14px;
    filter: drop-shadow(0 0 22px rgba(168, 85, 247, 0.65));
}

/* --- Новости --- */
.tw-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}
.tw-news-card { display: flex; flex-direction: column; text-align: left; }
.tw-news-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    transition: transform .4s ease;
}
.tw-news-card:hover .tw-news-image { transform: scale(1.04); }
.tw-news-body { padding: 20px; }
.tw-news-body .tw-card-title { font-size: 1.1rem !important; }
.tw-news-body time { display: block; font-size: .82rem; margin-top: 6px; }

/* --- Скачать --- */
.tw-download-card {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.tw-download-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 1rem;
    color: #e8e4f3;
    text-align: left;
}
.tw-download-info span.tw-muted { display: inline-block; min-width: 90px; }
.tw-download-note { font-size: .85rem; margin: 0; opacity: .8; }

/* --- Мобильная адаптация --- */
@media (max-width: 768px) {
    .tw-section { padding: 80px 16px; }
    .tw-card--pad { padding: 22px; }
    .tw-download-info { font-size: .92rem; }
    .tw-news-image { height: 140px; }
}

/* Компенсация навбара */
:target,
.tw-section {
    scroll-margin-top: 70px;
}
/* ============================================
   TerraWorld — Фикс навбара поверх fullpage-scroll
   ============================================ */

/* Навбар — фиксированный всегда сверху */
.navbar,
header .navbar,
header.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1040 !important;
}

/* Компенсация высоты навбара в секциях */
.tw-section {
    padding-top: 100px !important;
    padding-bottom: 80px !important;
}
.tw-hero {
    padding-top: 120px !important;
}

/* Фон-слой должен быть ПОД навбаром */
.tw-bg-stack {
    z-index: 0 !important;
}
.tw-section {
    z-index: 1;
}
/* ============================================
   TerraWorld — Секция "Наш сервер"
   ============================================ */

/* Тег над заголовком */
.tw-tag {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(124,58,237,.25), rgba(168,85,247,.15));
    border: 1px solid rgba(168, 85, 247, 0.5);
    border-radius: 999px;
    color: #c084fc;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

/* Заголовок слева */
.tw-section-title--left,
.tw-section-sub--left {
    text-align: left !important;
}
.tw-section-sub--left { margin-bottom: 32px; }

/* Двухколоночная сетка */
.tw-server-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: center;
    text-align: left;
}

/* Левая колонка: список фич */
.tw-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.tw-features li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 18px;
    background: rgba(20, 13, 43, 0.55);
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all .25s ease;
}
.tw-features li:hover {
    border-color: rgba(168, 85, 247, 0.6);
    background: rgba(20, 13, 43, 0.75);
    transform: translateX(4px);
}
.tw-features li i {
    font-size: 22px;
    color: #a855f7;
    margin-top: 2px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
}
.tw-features li strong {
    display: block;
    color: #e8e4f3;
    font-size: 1rem;
    margin-bottom: 3px;
}
.tw-features li span {
    color: #a99fc4;
    font-size: .88rem;
    line-height: 1.45;
}

/* Правая колонка: карточка сервера */
.tw-server-panel {
    display: flex;
    justify-content: center;
}

.tw-server-card {
    width: 100%;
    max-width: 420px;
    padding: 28px;
    background: rgba(20, 13, 43, 0.75);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(168, 85, 247, 0.1) inset;
    text-align: left;
}

.tw-server-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.tw-server-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tw-server-dot.is-online {
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.85);
    animation: tw-pulse 2s ease-in-out infinite;
}
.tw-server-dot.is-offline {
    background: #ef4444;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.65);
}
@keyframes tw-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .65; transform: scale(0.88); }
}
.tw-server-status {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #a99fc4;
}

.tw-server-name {
    font-size: 1.6rem !important;
    font-weight: 800;
    color: #e8e4f3 !important;
    margin: 0 0 18px;
    letter-spacing: -.01em;
}

.tw-server-ip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(13, 8, 25, 0.7);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 18px;
}
.tw-server-ip {
    flex: 1;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: .92rem;
    color: #c084fc;
    background: transparent;
    padding: 0;
    word-break: break-all;
}
.tw-copy-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.18);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 8px;
    color: #c084fc;
    cursor: pointer;
    transition: all .2s ease;
    font-size: 16px;
    padding: 0;
    flex-shrink: 0;
}
.tw-copy-btn:hover {
    background: rgba(139, 92, 246, 0.35);
    color: #fff;
    transform: scale(1.05);
}

.tw-server-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}
.tw-server-stat {
    text-align: center;
    padding: 12px 8px;
    background: rgba(13, 8, 25, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: 12px;
}
.tw-server-stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: #e8e4f3;
    line-height: 1.1;
    margin-bottom: 4px;
}
.tw-server-stat-label {
    display: block;
    font-size: 10px;
    color: #a99fc4;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
}

.tw-btn--full {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
}

/* Мобильная адаптация */
@media (max-width: 900px) {
    .tw-server-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .tw-section-title--left,
    .tw-section-sub--left {
        text-align: center !important;
    }
    .tw-server-panel { justify-content: center; }
}
/* Крупные цифры онлайн */
.tw-server-players {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 4px 0 14px;
}
.tw-server-players-current {
    font-size: 2.6rem;
    font-weight: 800;
    color: #e8e4f3;
    line-height: 1;
    letter-spacing: -.02em;
}
.tw-server-players-sep {
    font-size: 1.6rem;
    color: #6b6280;
    font-weight: 300;
    margin: 0 2px;
}
.tw-server-players-max {
    font-size: 1.6rem;
    font-weight: 600;
    color: #a99fc4;
}
.tw-server-players-label {
    font-size: .78rem;
    color: #a99fc4;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 8px;
    font-weight: 600;
}

/* Мета-строка: TPS + Сезон */
.tw-server-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0 18px;
    padding: 12px 0;
    border-top: 1px solid rgba(139, 92, 246, 0.18);
    border-bottom: 1px solid rgba(139, 92, 246, 0.18);
}
.tw-server-meta-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .82rem;
    color: #a99fc4;
}
.tw-server-meta-item i {
    color: #a855f7;
    font-size: 14px;
}
.tw-server-meta-item strong { color: #e8e4f3; }

/* Строка Discord под кнопкой */
.tw-server-discord {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    font-size: .85rem;
}
.tw-server-discord i {
    color: #a855f7;
    font-size: 16px;
}
.tw-server-discord a {
    color: #a99fc4 !important;
    text-decoration: none !important;
    transition: color .2s;
}
.tw-server-discord a:hover { color: #c084fc !important; }
/* ============================================
   TerraWorld — Секция "Событие"
   ============================================ */

/* Золотой тег для "скоро" */
.tw-tag--gold {
    background: linear-gradient(135deg, rgba(232,165,92,.25), rgba(232,165,92,.1)) !important;
    border-color: rgba(232, 165, 92, 0.55) !important;
    color: #e8a55c !important;
}

/* Сетка события */
.tw-event-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: center;
    text-align: left;
}

/* === Таймер обратного отсчёта === */
.tw-countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 28px 0 32px;
    max-width: 440px;
}
.tw-countdown-cell {
    text-align: center;
    padding: 16px 10px;
    background: rgba(20, 13, 43, 0.7);
    border: 1px solid rgba(139, 92, 246, 0.32);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: all .25s ease;
}
.tw-countdown-cell:hover {
    border-color: rgba(168, 85, 247, 0.7);
    transform: translateY(-2px);
}
.tw-countdown-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #e8e4f3;
    line-height: 1;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.35);
}
.tw-countdown-label {
    display: block;
    font-size: 10px;
    color: #a99fc4;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    font-weight: 600;
}

/* === Правая колонка: карточки "что будет" === */
.tw-event-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tw-event-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
    background: rgba(20, 13, 43, 0.72);
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all .25s ease;
}
.tw-event-card:hover {
    border-color: rgba(168, 85, 247, 0.65);
    background: rgba(20, 13, 43, 0.85);
    transform: translateX(4px);
    box-shadow: 0 12px 36px rgba(124, 58, 237, 0.3);
}
.tw-event-card-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(124,58,237,.4), rgba(168,85,247,.25));
    border: 1px solid rgba(168, 85, 247, 0.45);
    border-radius: 12px;
    color: #c084fc;
    font-size: 20px;
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.25);
}
.tw-event-card strong {
    display: block;
    color: #e8e4f3;
    font-size: 1rem;
    margin-bottom: 5px;
}
.tw-event-card span {
    color: #a99fc4;
    font-size: .88rem;
    line-height: 1.5;
}

/* Мобильная адаптация */
@media (max-width: 900px) {
    .tw-event-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .tw-countdown {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    .tw-countdown-value { font-size: 1.5rem; }
}
@media (max-width: 500px) {
    .tw-countdown {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* ============================================
   TerraWorld — Секция "Сообщество"
   ============================================ */

.tw-community-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: center;
    text-align: left;
}

/* === Кнопки соцсетей === */
.tw-social-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 28px 0 32px;
}
.tw-social-btns .tw-btn {
    padding: 13px 26px;
    font-size: 13px;
    letter-spacing: .8px;
}

/* === Статистика под кнопками === */
.tw-community-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 420px;
}
.tw-community-stat {
    text-align: center;
    padding: 16px 8px;
    background: rgba(20, 13, 43, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all .25s ease;
}
.tw-community-stat:hover {
    border-color: rgba(168, 85, 247, 0.6);
    transform: translateY(-2px);
}
.tw-community-stat strong {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: #e8e4f3;
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
}
.tw-community-stat span {
    display: block;
    font-size: 10px;
    color: #a99fc4;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
}

/* === Правая колонка: карточки платформ === */
.tw-community-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tw-platform-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: rgba(20, 13, 43, 0.72);
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #e8e4f3 !important;
    text-decoration: none !important;
    transition: all .25s ease;
    position: relative;
    overflow: hidden;
}
.tw-platform-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(168, 85, 247, 0.08) 100%);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.tw-platform-card:hover {
    border-color: rgba(168, 85, 247, 0.65);
    background: rgba(20, 13, 43, 0.9);
    transform: translateX(4px);
    box-shadow: 0 12px 36px rgba(124, 58, 237, 0.3);
}
.tw-platform-card:hover::before { opacity: 1; }

.tw-platform-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: transform .3s ease;
}
.tw-platform-card:hover .tw-platform-icon {
    transform: scale(1.06) rotate(-4deg);
}
.tw-platform-card--discord  .tw-platform-icon { background: linear-gradient(135deg, #5865F2, #7983f5); }
.tw-platform-card--telegram .tw-platform-icon { background: linear-gradient(135deg, #229ED9, #4bb3e8); }
.tw-platform-card--youtube  .tw-platform-icon { background: linear-gradient(135deg, #FF0000, #ff4b4b); }

.tw-platform-body {
    flex: 1;
    min-width: 0;
}
.tw-platform-body strong {
    display: block;
    font-size: 1rem;
    color: #e8e4f3;
    margin-bottom: 4px;
    font-weight: 700;
}
.tw-platform-body span {
    color: #a99fc4;
    font-size: .85rem;
    line-height: 1.4;
}
.tw-platform-arrow {
    color: #a99fc4;
    font-size: 16px;
    transition: all .25s ease;
    flex-shrink: 0;
}
.tw-platform-card:hover .tw-platform-arrow {
    color: #c084fc;
    transform: translate(3px, -3px);
}

/* Мобильная адаптация */
@media (max-width: 900px) {
    .tw-community-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .tw-community-stats { max-width: 100%; }
    .tw-social-btns { justify-content: center; }
}
@media (max-width: 500px) {
    .tw-community-stats { grid-template-columns: 1fr; }
    .tw-social-btns .tw-btn { padding: 11px 18px; font-size: 12px; }
}
/* ============================================
   TerraWorld — Секция "Скачать"
   ============================================ */

.tw-download-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: center;
    text-align: left;
}

/* === Фичи-строки слева === */
.tw-download-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}
.tw-download-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(20, 13, 43, 0.55);
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all .25s ease;
}
.tw-download-feature:hover {
    border-color: rgba(168, 85, 247, 0.6);
    background: rgba(20, 13, 43, 0.78);
    transform: translateX(4px);
}
.tw-download-feature i {
    font-size: 22px;
    color: #a855f7;
    margin-top: 2px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
}
.tw-download-feature strong {
    display: block;
    color: #e8e4f3;
    font-size: 1rem;
    margin-bottom: 3px;
}
.tw-download-feature span {
    color: #a99fc4;
    font-size: .88rem;
    line-height: 1.45;
}

/* === Карточка скачивания справа === */
.tw-download-panel {
    display: flex;
    justify-content: center;
}
.tw-download-card {
    width: 100%;
    max-width: 440px;
    padding: 28px;
    background: rgba(20, 13, 43, 0.78);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(168, 85, 247, 0.1) inset;
    text-align: left;
}

.tw-download-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}
.tw-download-os {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e8e4f3;
    font-weight: 600;
    font-size: .98rem;
}
.tw-download-os i {
    font-size: 20px;
    color: #c084fc;
}
.tw-download-version {
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(124,58,237,.35), rgba(168,85,247,.2));
    border: 1px solid rgba(168, 85, 247, 0.5);
    border-radius: 8px;
    color: #c084fc;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
}

.tw-download-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.tw-download-meta-item {
    text-align: center;
    padding: 12px 8px;
    background: rgba(13, 8, 25, 0.55);
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: 12px;
}
.tw-download-meta-item .tw-muted {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 600;
}
.tw-download-meta-item strong {
    font-size: .95rem;
    color: #e8e4f3;
    font-weight: 700;
}

.tw-btn--lg {
    padding: 18px 34px !important;
    font-size: 14px !important;
    letter-spacing: 1.2px !important;
}

.tw-download-note {
    margin: 16px 0 20px;
    color: #a99fc4;
    font-size: .84rem;
    line-height: 1.55;
    text-align: center;
}
.tw-download-note code {
    background: rgba(139, 92, 246, 0.18);
    padding: 2px 7px;
    border-radius: 5px;
    color: #c084fc;
    font-size: .82rem;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
}

.tw-download-links {
    display: flex;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    justify-content: center;
}
.tw-download-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: #a99fc4 !important;
    font-size: .85rem;
    text-decoration: none !important;
    border-radius: 8px;
    transition: all .2s ease;
}
.tw-download-link:hover {
    color: #c084fc !important;
    background: rgba(139, 92, 246, 0.12);
}
.tw-download-link i { font-size: 14px; }

/* Мобильная адаптация */
@media (max-width: 900px) {
    .tw-download-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .tw-download-panel { justify-content: center; }
}
@media (max-width: 500px) {
    .tw-download-meta { grid-template-columns: 1fr; }
}
/* Секция "Скачать" — компактная, с футером внутри */
#tw-download {
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 90px 24px 0 !important;
    min-height: 100vh;
    height: auto;
}
#tw-download > .tw-container {
    width: 100%;
    flex-shrink: 0;
    margin-bottom: 30px;
}
/* Компактный вид скачивания */
#tw-download .tw-download-grid {
    gap: 40px !important;
}
#tw-download .tw-download-card {
    padding: 22px !important;
    max-width: 400px !important;
}
#tw-download .tw-download-features {
    gap: 10px !important;
}
#tw-download .tw-download-feature {
    padding: 12px 14px !important;
}
#tw-download .tw-download-feature strong { font-size: .92rem !important; }
#tw-download .tw-download-feature span { font-size: .82rem !important; }
#tw-download .tw-download-meta-item { padding: 10px 6px !important; }
#tw-download .tw-btn--lg {
    padding: 14px 26px !important;
    font-size: 13px !important;
}
#tw-download .tw-download-note {
    margin: 12px 0 14px !important;
    font-size: .8rem !important;
}
#tw-download .tw-download-links { padding-top: 14px !important; }

/* Компактный футер */
#tw-download .tw-footer {
    padding: 32px 40px 16px !important;
    margin-top: 20px !important;
}
#tw-download .tw-footer__logo { height: 38px !important; }
#tw-download .tw-footer__slogan { font-size: .82rem !important; }
#tw-download .tw-footer__col h4 { margin-bottom: 10px !important; font-size: .76rem !important; }
#tw-download .tw-footer__col ul { gap: 7px !important; }
#tw-download .tw-footer__col a { font-size: .84rem !important; }
#tw-download .tw-footer__bottom {
    margin-top: 28px !important;
    padding-top: 16px !important;
    font-size: .78rem !important;
}

/* ============================================
   TerraWorld — Заглушка "Нет новостей"
   ============================================ */

.tw-news-empty {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.tw-news-empty-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(124,58,237,.35), rgba(168,85,247,.15));
    border: 1px solid rgba(168, 85, 247, 0.5);
    border-radius: 24px;
    color: #c084fc;
    font-size: 38px;
    box-shadow:
        0 0 40px rgba(168, 85, 247, 0.35),
        0 0 0 1px rgba(168, 85, 247, 0.15) inset;
    animation: tw-empty-pulse 3.5s ease-in-out infinite;
}
@keyframes tw-empty-pulse {
    0%, 100% {
        box-shadow: 0 0 40px rgba(168, 85, 247, 0.35), 0 0 0 1px rgba(168, 85, 247, 0.15) inset;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 60px rgba(168, 85, 247, 0.55), 0 0 0 1px rgba(168, 85, 247, 0.25) inset;
        transform: scale(1.03);
    }
}

.tw-news-empty .tw-section-title {
    margin-bottom: 12px;
}

.tw-news-empty .tw-section-sub {
    max-width: 520px;
    margin: 0 auto 40px;
}

/* Карточки-обещания */
.tw-news-empty-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
    text-align: left;
}

.tw-news-empty-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: rgba(20, 13, 43, 0.65);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all .25s ease;
}
.tw-news-empty-card:hover {
    border-color: rgba(168, 85, 247, 0.65);
    background: rgba(20, 13, 43, 0.85);
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(124, 58, 237, 0.3);
}
.tw-news-empty-card i {
    font-size: 22px;
    color: #a855f7;
    margin-top: 2px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
}
.tw-news-empty-card strong {
    display: block;
    color: #e8e4f3;
    font-size: .95rem;
    margin-bottom: 4px;
    font-weight: 700;
}
.tw-news-empty-card span {
    color: #a99fc4;
    font-size: .84rem;
    line-height: 1.45;
}

/* Мобильная адаптация */
@media (max-width: 900px) {
    .tw-news-empty-cards {
        grid-template-columns: 1fr;
    }
    .tw-news-empty-icon { width: 72px; height: 72px; font-size: 30px; }
}
/* ============================================
   TerraWorld — Navbar v2
   ============================================ */

.tw-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: rgba(11, 7, 16, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.18);
    transition: background .3s ease, border-color .3s ease;
}
.tw-nav.scrolled {
    background: rgba(11, 7, 16, 0.95);
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.tw-nav__inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 68px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* === Лого === */
.tw-nav__brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none !important;
}
.tw-nav__logo {
    height: 40px;
    width: auto;
    display: block;
    filter:
        drop-shadow(0 0 14px rgba(168, 85, 247, 0.65))
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
    transition: filter .3s ease, transform .3s ease;
}
.tw-nav__brand:hover .tw-nav__logo {
    filter:
        drop-shadow(0 0 24px rgba(168, 85, 247, 0.95))
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
    transform: scale(1.03);
}

/* === Меню — пиллы === */
.tw-nav__menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}
.tw-nav__menu > li { position: relative; }

.tw-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    color: #a99fc4 !important;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .2px;
    text-decoration: none !important;
    transition: all .22s ease;
    position: relative;
    white-space: nowrap;
}
.tw-nav__link svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity .2s, transform .2s;
}
.tw-nav__link:hover {
    color: #fff !important;
    background: rgba(139, 92, 246, 0.12);
}
.tw-nav__link:hover svg {
    opacity: 1;
    transform: scale(1.08);
}
.tw-nav__link.is-active {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(124,58,237,.35), rgba(168,85,247,.2));
    box-shadow:
        0 0 0 1px rgba(168, 85, 247, 0.5) inset,
        0 6px 20px rgba(124, 58, 237, 0.35);
}
.tw-nav__link.is-active svg {
    opacity: 1;
    color: #c084fc;
}
.tw-nav__link.is-active::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #a855f7, transparent);
    border-radius: 2px;
}

/* === Правый блок === */
.tw-nav__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Кнопка «Войти» */
.tw-nav__login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    color: #a99fc4 !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all .22s ease;
}
.tw-nav__login svg {
    width: 16px; height: 16px;
}
.tw-nav__login:hover {
    color: #fff !important;
    background: rgba(139, 92, 246, 0.12);
}

/* CTA-кнопка «Регистрация» */
.tw-nav__cta {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    text-decoration: none !important;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.45);
    transition: all .25s ease;
}
.tw-nav__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.65);
    color: #fff !important;
}

/* Пользователь */
.tw-nav__user { position: relative; }

.tw-nav__user-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #e8e4f3 !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all .22s ease;
}
.tw-nav__user-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(168, 85, 247, 0.6);
    color: #fff !important;
}
.tw-nav__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.5);
}
.tw-nav__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tw-nav__username {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tw-nav__caret {
    width: 14px;
    height: 14px;
    opacity: 0.7;
    transition: transform .25s ease;
}
.tw-nav__user-btn[aria-expanded="true"] .tw-nav__caret {
    transform: rotate(180deg);
}

/* Уведомления — подгон под стиль */
.tw-nav__right .nav-item {
    list-style: none;
    position: relative;
}
.tw-nav__right .nav-link {
    color: #a99fc4 !important;
    padding: 9px 12px !important;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    transition: all .2s ease;
    text-decoration: none !important;
}
.tw-nav__right .nav-link:hover {
    color: #fff !important;
    background: rgba(139, 92, 246, 0.12);
}
.tw-nav__right .nav-link i { font-size: 18px; }

/* Бейдж непрочитанных уведомлений */
.tw-nav__right .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

/* Dropdown-меню под навбаром */
.tw-nav__inner .dropdown-menu {
    margin-top: 12px !important;
    background: #150d2b !important;
    border: 1px solid rgba(139, 92, 246, 0.45) !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85) !important;
    padding: 6px !important;
    min-width: 220px;
    z-index: 1050;
}
.tw-nav__inner .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e8e4f3 !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    font-size: .92rem;
    font-weight: 500;
    transition: all .15s ease;
    text-decoration: none !important;
}
.tw-nav__inner .dropdown-item:hover {
    background: rgba(139, 92, 246, 0.25) !important;
    color: #c084fc !important;
}
.tw-nav__inner .dropdown-item i {
    color: #a855f7 !important;
    font-size: 15px;
    width: 18px;
    text-align: center;
}
.tw-nav__inner .dropdown-divider {
    border-color: rgba(139, 92, 246, 0.2) !important;
    margin: 6px 8px !important;
}

/* === Мобильная адаптация === */
@media (max-width: 1100px) {
    .tw-nav__link span { display: none; }
    .tw-nav__link { padding: 10px; }
    .tw-nav__link svg { width: 20px; height: 20px; }
}
@media (max-width: 768px) {
    .tw-nav__inner { padding: 0 16px; height: 60px; }
    .tw-nav__logo { height: 34px; }
    .tw-nav__username { display: none; }
    .tw-nav__user-btn { padding: 4px; }
    .tw-nav__cta span { display: none; }
    .tw-nav__cta { padding: 10px 14px; }
    .tw-nav__cta::before {
        content: '+';
        font-size: 18px;
        line-height: 1;
    }
}
/* ============================================
   TerraWorld — Footer
   ============================================ */

.tw-footer {
    width: 100%;
    margin-top: 40px;
    padding: 56px 40px 24px;
    background: rgba(11, 7, 16, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    text-align: left;
    position: relative;
}
.tw-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.7), transparent);
}

.tw-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 2fr;
    gap: 60px;
    align-items: start;
}

/* === Левая колонка: бренд === */
.tw-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.tw-footer__logo {
    height: 46px;
    width: auto;
    align-self: flex-start;
    filter:
        drop-shadow(0 0 14px rgba(168, 85, 247, 0.5))
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
}
.tw-footer__slogan {
    color: #a99fc4 !important;
    font-size: .88rem;
    line-height: 1.55;
    margin: 0;
    max-width: 300px;
}
.tw-footer__social {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.tw-footer__social a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #a99fc4 !important;
    font-size: 18px;
    text-decoration: none !important;
    transition: all .25s ease;
}
.tw-footer__social a:hover {
    background: rgba(139, 92, 246, 0.28);
    border-color: rgba(168, 85, 247, 0.7);
    color: #c084fc !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}

/* === 4 колонки ссылок === */
.tw-footer__cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}
.tw-footer__col h4 {
    color: #e8e4f3 !important;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 16px;
}
.tw-footer__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tw-footer__col a {
    color: #a99fc4 !important;
    text-decoration: none !important;
    font-size: .9rem;
    transition: all .2s ease;
    display: inline-block;
    position: relative;
    padding-left: 0;
}
.tw-footer__col a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 1px;
    background: #a855f7;
    transform: translateY(-50%);
    transition: width .25s ease;
}
.tw-footer__col a:hover {
    color: #c084fc !important;
    padding-left: 14px;
}
.tw-footer__col a:hover::before {
    width: 10px;
}

/* === Нижняя строка === */
.tw-footer__bottom {
    max-width: 1280px;
    margin: 48px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(139, 92, 246, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #6b6280;
    font-size: .82rem;
    flex-wrap: wrap;
}
.tw-footer__made {
    color: #6b6280;
}

/* === Мобильная адаптация === */
@media (max-width: 900px) {
    .tw-footer { padding: 40px 24px 20px; }
    .tw-footer__inner { grid-template-columns: 1fr; gap: 36px; }
    .tw-footer__cols { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}
@media (max-width: 500px) {
    .tw-footer__cols { grid-template-columns: 1fr; }
    .tw-footer__bottom { flex-direction: column; text-align: center; }
}
/* Скрываем системный футер везде — у нас свой */
footer.text-bg-dark,
footer.py-5.mt-auto,
body > #app + footer,
body .copyright {
    display: none !important;
}
/* ============================================
   TerraWorld — Стилизация страницы профиля
   ============================================ */

/* Заголовок страницы */
body .container > h1,
body .container > h2 {
    font-size: 2rem !important;
    font-weight: 800 !important;
    margin-bottom: 28px !important;
    background: linear-gradient(135deg, #ffffff 0%, #c084fc 60%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Карточка профиля */
/* Карточки — максимально прозрачные */
.card,
body .card,
#app .card {
    background: rgba(20, 13, 43, 0.15) !important;
    background-color: rgba(20, 13, 43, 0.15) !important;
    border: 1px solid rgba(139, 92, 246, 0.35) !important;
    border-radius: 18px !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.3);
}
.card:hover {
    background: rgba(20, 13, 43, 0.3) !important;
    border-color: rgba(168, 85, 247, 0.65) !important;
}

/* Аватар игрока */
.card img[src*="mc-heads"],
.card img[src*="crafatar"],
.card img[src*="minotar"] {
    border-radius: 14px !important;
    border: 2px solid rgba(139, 92, 246, 0.45) !important;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
    image-rendering: pixelated;
}

/* Ник игрока */
.card h2, .card h3 {
    font-weight: 800;
    letter-spacing: -.01em;
}

/* Список данных (зарегистрирован, деньги, 2FA) */
.card ul {
    list-style: none;
    padding-left: 0;
    margin: 16px 0;
}
.card ul li {
    color: #a99fc4;
    font-size: .95rem;
    padding: 6px 0 6px 22px;
    position: relative;
}
.card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
}

/* Бейджи БЕЗ inline-стиля — фиолетовые */
.badge:not([style*="background"]),
.role-badge:not([style*="background"]) {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff !important;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.45);
    display: inline-block;
    margin-top: 12px;
}

/* Бейджи С inline-стилем (роли из админки) — сохраняем их цвет */
.badge[style*="background"],
.role-badge[style*="background"] {
    padding: 6px 14px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    margin-top: 12px;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Заголовки секций карточек */
/* Заголовки в card-body — просто текст, без рамок */
.card .card-title,
.card h4,
.card h5 {
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* Заголовки card-header (если реально используются) — с фоном */
.card > .card-header {
    color: #e8e4f3 !important;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    padding: 18px 22px !important;
    border-bottom: 1px solid rgba(139, 92, 246, 0.18) !important;
    background: rgba(139, 92, 246, 0.08) !important;
    margin: 0 !important;
    border-radius: 18px 18px 0 0;
}

/* Поля формы */
.form-control, input[type="text"], input[type="email"], input[type="password"] {
    background: rgba(13, 8, 25, 0.7) !important;
    border: 1px solid rgba(139, 92, 246, 0.25) !important;
    border-radius: 10px !important;
    color: #e8e4f3 !important;
    padding: 12px 16px !important;
    font-size: .95rem;
    transition: all .2s ease;
}
.form-control:focus, input:focus {
    border-color: #a855f7 !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22) !important;
    background: rgba(20, 13, 43, 0.9) !important;
    outline: none !important;
}
.form-control::placeholder { color: #6b6280 !important; }

label, .form-label {
    color: #a99fc4 !important;
    font-size: .86rem;
    font-weight: 600;
    letter-spacing: .3px;
    margin-bottom: 6px;
}

/* Кнопки */
.btn-primary, .btn {
    background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
    border: none !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    letter-spacing: .8px;
    padding: 12px 26px !important;
    box-shadow: 0 6px 22px rgba(139, 92, 246, 0.4) !important;
    transition: all .25s ease !important;
    text-transform: uppercase;
}
.btn-primary:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.6) !important;
    filter: brightness(1.08);
}
.btn-outline-primary, .btn-secondary {
    background: rgba(139, 92, 246, 0.1) !important;
    border: 1px solid rgba(139, 92, 246, 0.5) !important;
    color: #c084fc !important;
    box-shadow: none !important;
}
.btn-outline-primary:hover {
    background: rgba(139, 92, 246, 0.25) !important;
    border-color: #a855f7 !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35) !important;
}

/* Алерты */
.alert {
    background: rgba(20, 13, 43, 0.85) !important;
    border: 1px solid rgba(139, 92, 246, 0.35) !important;
    border-radius: 12px !important;
    color: #e8e4f3 !important;
    backdrop-filter: blur(10px);
}
.alert-success {
    border-color: rgba(34, 197, 94, 0.5) !important;
    background: rgba(34, 197, 94, 0.08) !important;
}
.alert-danger {
    border-color: rgba(239, 68, 68, 0.5) !important;
    background: rgba(239, 68, 68, 0.08) !important;
}

/* ============================================
   TerraWorld — Фон страницы профиля
   ============================================ */

/* ============================================
   TerraWorld — ПРОФИЛЬ v2
   ============================================ */

.tw-profile-page {
    position: relative;
    min-height: 100vh;
    padding: 100px 0 40px;
}
.tw-profile-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: url('/themes/terraworld/img/profile-camp.jpg') center/cover no-repeat;
    pointer-events: none;
}
.tw-profile-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 45%, rgba(139, 92, 246, 0.15) 0%, transparent 70%),
        linear-gradient(180deg, rgba(11,7,16,0.35) 0%, rgba(11,7,16,0.5) 50%, rgba(11,7,16,0.7) 100%);
}
.tw-profile-content {
    position: relative;
    z-index: 1;
    max-width: 1240px;
}

/* --- Хедер + табы --- */
.tw-profile-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
}
.tw-profile-head h1 {
    margin: 0 !important;
    font-size: 2rem !important;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #c084fc 60%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.tw-profile-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(20, 13, 43, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}
.tw-profile-tabs .tw-tab {
    padding: 8px 16px;
    border-radius: 8px;
    color: #a99fc4 !important;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all .2s ease;
}
.tw-profile-tabs .tw-tab:hover {
    color: #fff !important;
    background: rgba(139, 92, 246, 0.15);
}
.tw-profile-tabs .tw-tab.is-active {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

/* --- Общая карточка секции --- */
.tw-profile-page .tw-card-section {
    background: rgba(20, 13, 43, 0.55) !important;
    border: 1px solid rgba(139, 92, 246, 0.35) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    overflow: hidden;
    scroll-margin-top: 100px;
}
.tw-profile-page .tw-card-section .card-body {
    background: transparent !important;
    padding: 28px !important;
}

/* Заголовки секций */
.tw-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #e8e4f3 !important;
    margin: 0 0 22px !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}
.tw-section-head i {
    color: #a855f7;
    font-size: 1.25rem;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
}

/* ============================================
   TerraWorld — ПРОФИЛЬ v4 (2 колонки)
   ============================================ */

.tw-profile-page {
    position: relative;
    min-height: 100vh;
    padding: 100px 0 40px;
}
.tw-profile-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: url('/themes/terraworld/img/profile-camp.jpg') center/cover no-repeat;
    pointer-events: none;
}
.tw-profile-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 45%, rgba(139, 92, 246, 0.15) 0%, transparent 70%),
        linear-gradient(180deg, rgba(11,7,16,0.35) 0%, rgba(11,7,16,0.5) 50%, rgba(11,7,16,0.7) 100%);
}
.tw-profile-content {
    position: relative;
    z-index: 1;
    max-width: 1100px !important;
    margin: 0 auto;
    padding: 0 20px;
}

/* Заголовок */
.tw-profile-content > h1 {
    margin: 0 0 22px !important;
    padding: 0 !important;
    font-size: 1.6rem !important;
    font-weight: 800;
    background: none !important;
}

/* ==== СЕТКА: 2 колонки ==== */
.tw-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 16px;
    align-items: start;
}
.tw-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==== Карточки ==== */
.tw-card {
    background: rgba(20, 13, 43, 0.7) !important;
    border: 1px solid rgba(139, 92, 246, 0.28) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    padding: 22px;
}

/* Заголовки внутри карточек — без заливки */
.tw-card h2,
.tw-card h3 {
    margin: 0 0 16px !important;
    padding: 0 !important;
    font-size: .95rem !important;
    font-weight: 700 !important;
    background: none !important;
    border: none !important;
    letter-spacing: .3px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tw-card h2 i,
.tw-card h3 i {
    color: #a855f7;
    font-size: 1rem;
}

/* ==== ПРОФИЛЬ-КАРТОЧКА ==== */
.tw-card-profile .tw-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.tw-card-profile .tw-avatar img {
    width: 110px;
    height: 110px;
    border-radius: 16px !important;
    border: 2px solid rgba(139, 92, 246, 0.4);
    box-shadow: 0 8px 28px rgba(124, 58, 237, 0.35);
    image-rendering: pixelated;
}
.tw-card-profile .tw-name {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
    text-align: center;
    letter-spacing: -.01em;
}

/* Бейдж роли — родной цвет из админки, без нашей фиолетовой заливки */
.tw-card-profile .badge,
.tw-card-profile .role-badge {
    padding: 6px 14px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Список фактов */
.tw-facts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tw-facts li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(13, 8, 25, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: 10px;
    color: #a99fc4;
    font-size: .84rem;
}
.tw-facts li i {
    color: #a855f7;
    font-size: 1rem;
    min-width: 18px;
}
.tw-facts li strong { color: #e8e4f3; font-weight: 600; }

/* Кнопки профиля */
.tw-card-profile .tw-profile-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}
.tw-card-profile .tw-profile-btns .btn {
    width: 100%;
    justify-content: center;
}

/* ==== СТАТИСТИКА: тайлы ==== */
.tw-stat-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(13, 8, 25, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    transition: all .2s ease;
    margin-bottom: 8px;
}
.tw-stat-mini:last-child { margin-bottom: 0; }
.tw-stat-mini:hover {
    border-color: rgba(168, 85, 247, 0.55);
    transform: translateX(3px);
}
.tw-stat-mini__icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
}
.tw-stat-mini__label {
    color: #6b6280;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 2px;
}
.tw-stat-mini__value {
    color: #e8e4f3;
    font-weight: 700;
    font-size: .92rem;
}

/* ==== БЫСТРЫЕ ДЕЙСТВИЯ ==== */
.tw-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.tw-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: rgba(13, 8, 25, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    color: #a99fc4 !important;
    text-decoration: none !important;
    font-size: .78rem;
    font-weight: 600;
    text-align: center;
    transition: all .2s ease;
}
.tw-action:hover {
    border-color: rgba(168, 85, 247, 0.6);
    background: rgba(139, 92, 246, 0.12);
    color: #fff !important;
    transform: translateY(-2px);
}
.tw-action i {
    font-size: 1.4rem;
    color: #a855f7;
}

/* ==== Настройки аккаунта (details) ==== */
.tw-settings-details {
    background: rgba(20, 13, 43, 0.7) !important;
    border: 1px solid rgba(139, 92, 246, 0.28) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
}
.tw-settings-details > summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #e8e4f3;
    font-size: .95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    user-select: none;
    transition: background .2s ease;
}
.tw-settings-details > summary::-webkit-details-marker { display: none; }
.tw-settings-details > summary:hover { background: rgba(139, 92, 246, 0.08); }
.tw-settings-details > summary span i {
    color: #a855f7;
    margin-right: 8px;
}
.tw-settings-details > summary .tw-arrow {
    color: #a855f7;
    transition: transform .3s ease;
}
.tw-settings-details[open] > summary .tw-arrow {
    transform: rotate(180deg);
}
.tw-settings-details > .tw-details-body {
    padding: 0 22px 22px;
    border-top: 1px solid rgba(139, 92, 246, 0.18);
    padding-top: 20px;
}

.tw-subsection-title {
    font-size: .82rem !important;
    color: #a855f7 !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px !important;
}

/* ==== Формы ==== */
.tw-profile-content .form-control,
.tw-profile-content input[type="text"],
.tw-profile-content input[type="email"],
.tw-profile-content input[type="password"] {
    background: rgba(11, 7, 16, 0.7) !important;
    border: 1px solid rgba(139, 92, 246, 0.28) !important;
    border-radius: 10px !important;
    color: #e8e4f3 !important;
    padding: 10px 14px !important;
    font-size: .88rem;
    transition: all .2s ease;
}
.tw-profile-content .form-control:focus,
.tw-profile-content input:focus {
    border-color: #a855f7 !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22) !important;
    outline: none !important;
}
.tw-profile-content .form-label {
    color: #a99fc4;
    font-size: .78rem;
    font-weight: 600;
    margin-bottom: 6px;
}

/* ==== Кнопки ==== */
.tw-profile-content .btn {
    font-size: .82rem !important;
    padding: 10px 20px !important;
    border-radius: 10px !important;
    letter-spacing: .5px !important;
    text-transform: none !important;
    font-weight: 700 !important;
}
.tw-profile-content .btn-primary {
    background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4) !important;
}
.tw-profile-content .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(139, 92, 246, 0.6) !important;
}
.tw-profile-content .btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35) !important;
}
.tw-profile-content .btn-outline-primary {
    background: rgba(139, 92, 246, 0.1) !important;
    border: 1px solid rgba(139, 92, 246, 0.5) !important;
    color: #c084fc !important;
    box-shadow: none !important;
}
.tw-profile-content .btn-outline-primary:hover {
    background: rgba(139, 92, 246, 0.25) !important;
    color: #fff !important;
}

/* Алерты */
.tw-profile-content .alert {
    background: rgba(20, 13, 43, 0.7) !important;
    border: 1px solid rgba(139, 92, 246, 0.35) !important;
    border-radius: 12px !important;
    color: #e8e4f3 !important;
    font-size: .86rem;
    padding: 14px 18px;
}
.tw-profile-content .alert-warning {
    border-color: rgba(232, 165, 92, 0.5) !important;
    background: rgba(232, 165, 92, 0.08) !important;
}

/* ============================================
   TerraWorld — Скин + Титулы + Цвета
   ============================================ */

/* --- Скин --- */
.tw-skin-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}
.tw-skin-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 6px;
    background: rgba(13, 8, 25, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    transition: all .25s ease;
}
.tw-skin-panel:hover {
    border-color: rgba(168, 85, 247, 0.55);
    transform: translateY(-2px);
}
.tw-skin-panel img {
    image-rendering: pixelated;
    height: 120px;
    width: auto;
    max-width: 100%;
}
.tw-skin-panel:nth-child(2) img,
.tw-skin-panel:nth-child(3) img { height: 72px; }
.tw-skin-panel span {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b6280;
    font-weight: 700;
}

/* --- Титул под ником --- */
.tw-user-title {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 999px;
    color: #c084fc;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 6px;
}

.tw-title-emoji {
    font-size: 1.2em;
    margin-right: 6px;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.5));
}

/* --- Кастомизация: строки формы --- */
.tw-form-row {
    margin-bottom: 20px;
}
.tw-form-label {
    display: block;
    color: #a99fc4;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* --- Палитра цветов (расширенная) --- */
.tw-color-picker-full {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tw-color {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    padding: 0;
    transition: all .2s ease;
    position: relative;
    overflow: hidden;
}
.tw-color:hover {
    transform: scale(1.12);
    border-color: rgba(255, 255, 255, 0.7);
}
.tw-color.is-selected {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.5), 0 0 18px currentColor;
    transform: scale(1.08);
}
.tw-color.is-selected::after {
    content: '\F26E';
    font-family: 'bootstrap-icons';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.tw-color-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.15) !important;
    border: 2px dashed rgba(168, 85, 247, 0.6) !important;
    color: #c084fc;
    font-size: 16px;
}
.tw-color-custom input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    padding: 0;
    border: none;
}

/* --- Титулы: список --- */
.tw-titles-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
}
.tw-titles-list::-webkit-scrollbar { width: 6px; }
.tw-titles-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7c3aed, #a855f7);
    border-radius: 3px;
}

.tw-title-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(13, 8, 25, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s ease;
    position: relative;
}
.tw-title-option:hover {
    border-color: rgba(168, 85, 247, 0.5);
    background: rgba(139, 92, 246, 0.08);
    transform: translateX(3px);
}
.tw-title-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.tw-title-option .tw-title-emoji {
    font-size: 1.6rem;
    margin: 0;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.12);
    border-radius: 10px;
}
.tw-title-info { flex: 1; min-width: 0; }
.tw-title-info strong {
    display: block;
    color: #e8e4f3;
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.tw-title-info span {
    color: #6b6280;
    font-size: .76rem;
    line-height: 1.35;
}
.tw-title-lock {
    color: #6b6280;
    font-size: 14px;
}
.tw-title-option.is-locked {
    opacity: 0.55;
    cursor: not-allowed;
}
.tw-title-option.is-locked:hover {
    transform: none;
    border-color: rgba(139, 92, 246, 0.2);
    background: rgba(13, 8, 25, 0.5);
}
.tw-title-option.is-selected {
    border-color: #a855f7;
    background: rgba(139, 92, 246, 0.15);
    box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.5), 0 8px 24px rgba(124, 58, 237, 0.2);
}
.tw-title-option.is-selected .tw-title-emoji {
    background: linear-gradient(135deg, rgba(124,58,237,.4), rgba(168,85,247,.25));
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.3);
}


/* ==== Мобильная версия ==== */
@media (max-width: 850px) {
    .tw-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Мобильная адаптация --- */
@media (max-width: 900px) {
    .tw-profile-grid,
    .tw-skin-grid { grid-template-columns: 1fr; text-align: center; }
    .tw-profile-left { align-items: center; }
    .tw-profile-facts { text-align: left; }
    .tw-profile-actions { justify-content: center; }
    .tw-skin-showcase { justify-content: center; flex-wrap: wrap; }
    .tw-profile-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 500px) {
    .tw-profile-tabs { overflow-x: auto; max-width: 100%; }
    .tw-profile-tabs .tw-tab { white-space: nowrap; }
    .tw-skin-showcase { gap: 10px; }
    .tw-skin-panel { padding: 10px; }
    .tw-skin-panel:first-child img { height: 140px; }
}

/* --- Плавный скролл к секциям при клике --- */
html { scroll-behavior: smooth; }

/* ============================================
   TerraWorld — Отступ контента под навбар
   ============================================ */

/* Все страницы кроме главной — отступ под фиксированный навбар */
body:not(:has(.tw-hero)) .container,
body:not(:has(.tw-hero)) main,
body:not(:has(.tw-hero)) .content {
    padding-top: 100px !important;
}
body > #app > .container,
body > main {
    padding-top: 100px !important;
}
body:not(:has(.tw-hero)) h1:first-child,
body:not(:has(.tw-hero)) h2:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ============================================
   TerraWorld — Скроллбар в стиле сайта
   ============================================ */

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
::-webkit-scrollbar-track {
    background: rgba(13, 8, 25, 0.6);
    border-left: 1px solid rgba(139, 92, 246, 0.1);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);
    border-radius: 8px;
    border: 2px solid rgba(13, 8, 25, 0.6);
    background-clip: padding-box;
    transition: all .3s ease;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8b5cf6 0%, #c084fc 50%, #d8b4fe 100%);
    background-clip: padding-box;
    border-color: rgba(13, 8, 25, 0.4);
}
::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #a855f7 0%, #c084fc 100%);
    background-clip: padding-box;
}
::-webkit-scrollbar-corner {
    background: rgba(13, 8, 25, 0.6);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #a855f7 rgba(13, 8, 25, 0.6);
}

/* Убираем горизонтальный скролл */
body {
    overflow-x: hidden;
}

/* ============================================
   Скрываем футер Azuriom на главной
   ============================================ */

body:has(.tw-hero) footer,
body:has(.tw-hero) .footer {
    display: none !important;
}
/* ============================================
   Footer на внутренних страницах
   ============================================ */

.tw-footer {
    width: 100%;
    margin-top: 60px;
    padding: 56px 40px 24px;
    background: rgba(11, 7, 16, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    text-align: left;
    position: relative;
}
.tw-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.7), transparent);
}

.tw-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 2fr;
    gap: 60px;
    align-items: start;
}

.tw-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.tw-footer__logo {
    height: 46px;
    width: auto;
    align-self: flex-start;
    filter:
        drop-shadow(0 0 14px rgba(168, 85, 247, 0.5))
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
}
.tw-footer__slogan {
    color: #a99fc4 !important;
    font-size: .88rem;
    line-height: 1.55;
    margin: 0;
    max-width: 300px;
}
.tw-footer__social {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.tw-footer__social a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #a99fc4 !important;
    font-size: 18px;
    text-decoration: none !important;
    transition: all .25s ease;
}
.tw-footer__social a:hover {
    background: rgba(139, 92, 246, 0.28);
    border-color: rgba(168, 85, 247, 0.7);
    color: #c084fc !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}

.tw-footer__cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}
.tw-footer__col h4 {
    color: #e8e4f3 !important;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 16px;
}
.tw-footer__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tw-footer__col a {
    color: #a99fc4 !important;
    text-decoration: none !important;
    font-size: .9rem;
    transition: all .2s ease;
    display: inline-block;
    position: relative;
    padding-left: 0;
}
.tw-footer__col a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 1px;
    background: #a855f7;
    transform: translateY(-50%);
    transition: width .25s ease;
}
.tw-footer__col a:hover {
    color: #c084fc !important;
    padding-left: 14px;
}
.tw-footer__col a:hover::before {
    width: 10px;
}

.tw-footer__bottom {
    max-width: 1280px;
    margin: 48px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(139, 92, 246, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #6b6280;
    font-size: .82rem;
    flex-wrap: wrap;
}
.tw-footer__made {
    color: #6b6280;
}

@media (max-width: 900px) {
    .tw-footer { padding: 40px 24px 20px; }
    .tw-footer__inner { grid-template-columns: 1fr; gap: 36px; }
    .tw-footer__cols { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}
@media (max-width: 500px) {
    .tw-footer__cols { grid-template-columns: 1fr; }
    .tw-footer__bottom { flex-direction: column; text-align: center; }
}
/* ============================================
   TerraWorld — Максимальная прозрачность карточек
   ============================================ */

#app .card,
body #app .card,
body .container .card,
main .card,
.card:not(.tw-card) {
    background: rgba(20, 13, 43, 0.15) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(139, 92, 246, 0.35) !important;
}

/* Внутренние элементы карточек тоже прозрачные */
#app .card .card-body,
#app .card .card-header {
    background: transparent !important;
}
/* ============================================
   TerraWorld — Финал прозрачности карточек
   Перебиваем Bootstrap-переменные
   ============================================ */

:root,
body,
#app,
html {
    --bs-card-bg: rgba(20, 13, 43, 0.12) !important;
    --bs-card-color: #e8e4f3 !important;
    --bs-card-border-color: rgba(139, 92, 246, 0.4) !important;
    --bs-card-border-radius: 18px !important;
    --bs-card-cap-bg: rgba(139, 92, 246, 0.06) !important;
    --bs-card-cap-color: #e8e4f3 !important;
    --bs-body-bg: transparent !important;
    --bs-border-color: rgba(139, 92, 246, 0.3) !important;
}

/* Усиление — плюс к переменной */
#app .card,
body .card {
    background-color: rgba(20, 13, 43, 0.12) !important;
    backdrop-filter: blur(16px) saturate(130%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(130%) !important;
}

#app .card-body,
#app .card-header,
.card .card-body {
    background-color: transparent !important;
}

/* ============================================
   ФИНАЛ: цвет ника и роли — из inline, не перебиваем
   ============================================ */

.tw-profile-content .tw-name {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto !important;
    width: fit-content;
}
.tw-profile-content .tw-name .tw-title-emoji {
    margin: 0 !important;
    flex-shrink: 0;
}

/* Бейдж роли — только форма, БЕЗ цвета */
.tw-profile-content .tw-role-badge {
    padding: 6px 14px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
/* ============================================
   Кастомизация v2: режим / градиент / Pickr
   ============================================ */

/* Переключатель режима */
.tw-mode-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: rgba(13, 8, 25, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 10px;
    margin-bottom: 14px;
}
.tw-mode-btn {
    padding: 7px 14px;
    border: none;
    background: none;
    border-radius: 7px;
    color: #a99fc4;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}
.tw-mode-btn:hover { color: #fff; }
.tw-mode-btn.is-active {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Свой цвет через Pickr */
.tw-color-custom {
    position: relative !important;
    overflow: hidden !important;
}
.tw-color-custom-inner {
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    pointer-events: none;
}
.tw-color-custom .pcr-button {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    opacity: 0;
}

/* Скрываем swatch превью Pickr внутри — иначе дублируется */
.tw-color-custom .pcr-button::before,
.tw-color-custom .pcr-button::after { display: none; }

/* Превью ника */
.tw-nick-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-top: 16px;
    background: rgba(13, 8, 25, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 12px;
}
.tw-nick-preview-label {
    font-size: .78rem;
    color: #6b6280;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ============================================
   Градиент ника и превью — работает ВЕЗДЕ
   ============================================ */

/* Ник в шапке */
.tw-profile-content .tw-name {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto !important;
    width: fit-content;
}
.tw-profile-content .tw-name .tw-title-emoji {
    margin: 0 !important;
    flex-shrink: 0;
}

/* Превью внизу */
.tw-nick-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-top: 16px;
    background: rgba(13, 8, 25, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 12px;
}
.tw-nick-preview-label {
    font-size: .78rem;
    color: #6b6280;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}


/* ПРОЗРАЧНО-АКТИВНЫЙ КРУЖОК — галочка видна */
.tw-color {
    position: relative;
}
.tw-color.is-selected {
    border-color: #fff !important;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.5), 0 0 18px currentColor !important;
    transform: scale(1.08);
}
.tw-color.is-selected::after {
    content: '\F26E' !important;
    font-family: 'bootstrap-icons' !important;
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-size: 14px !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
    pointer-events: none;
    z-index: 2;
}
/* ============================================
   Ник — градиент ТОЛЬКО на тексте, без эмодзи
   ============================================ */

.tw-profile-content .tw-name,
.tw-nick-preview {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto !important;
    width: fit-content;
}

.tw-title-emoji {
    -webkit-text-fill-color: initial !important;
    background: none !important;
    background-clip: initial !important;
    -webkit-background-clip: initial !important;
    color: inherit;
}

.tw-name-text.is-gradient,
.tw-nick-preview-value.is-gradient {
    background: linear-gradient(135deg, var(--nc1, #e8e4f3), var(--nc2, #a855f7)) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    display: inline-block;
}

.tw-name-text:not(.is-gradient),
.tw-nick-preview-value:not(.is-gradient) {
    color: var(--nc1, #e8e4f3) !important;
    -webkit-text-fill-color: var(--nc1, #e8e4f3) !important;
}

.tw-nick-preview-value {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -.01em;
}
/* ============================================
   Pickr — фиолетовая тема
   ============================================ */

.pcr-app[data-theme="nano"],
.pcr-app {
    background: #150d2b !important;
    border: 1px solid rgba(139, 92, 246, 0.5) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85) !important;
    border-radius: 14px !important;
    z-index: 9999 !important;
    padding: 16px !important;
    width: 300px !important;
}

.pcr-app .pcr-selection .pcr-color-palette,
.pcr-app .pcr-selection .pcr-color-chooser,
.pcr-app .pcr-selection .pcr-color-opacity {
    border-radius: 8px !important;
}

/* Кнопка "Save" */
.pcr-app button.pcr-save,
.pcr-app .pcr-interaction button.pcr-save,
.pcr-app .pcr-interaction .pcr-save {
    background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
    background-color: #a855f7 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    padding: 8px 16px !important;
    cursor: pointer !important;
    transition: all .2s ease;
    text-transform: none !important;
}
.pcr-app button.pcr-save:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

/* Кнопка "Clear" */
.pcr-app button.pcr-clear,
.pcr-app .pcr-interaction .pcr-clear {
    background: rgba(139, 92, 246, 0.15) !important;
    color: #c084fc !important;
    border: 1px solid rgba(139, 92, 246, 0.4) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 8px 14px !important;
    cursor: pointer !important;
}
.pcr-app button.pcr-clear:hover {
    background: rgba(139, 92, 246, 0.3) !important;
    color: #fff !important;
}

/* Поле HEX */
.pcr-app .pcr-interaction input.pcr-result {
    background: rgba(13, 8, 25, 0.7) !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    color: #e8e4f3 !important;
    border-radius: 8px !important;
    font-family: 'JetBrains Mono', 'Consolas', monospace !important;
}
.pcr-app .pcr-interaction input.pcr-result:focus {
    border-color: #a855f7 !important;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25) !important;
    outline: none !important;
}
/* ============================================
   Глобальные тосты: success-алерты снизу
   ============================================ */

.alert-success {
    position: fixed !important;
    bottom: 0 !important;
    left: 50% !important;
    top: auto !important;
    right: auto !important;
    transform: translate(-50%, 200%) !important;
    z-index: 9999 !important;

    max-width: 480px !important;
    min-width: 280px !important;
    width: auto !important;
    margin: 0 0 24px 0 !important;

    background: rgba(22, 101, 52, 0.92) !important;
    border: 1px solid rgba(34, 197, 94, 0.55) !important;
    color: #d1fae5 !important;
    padding: 13px 22px !important;
    border-radius: 12px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;

    font-size: 0.88rem !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;

    display: flex;
    align-items: center;
    gap: 10px;

    opacity: 0;
    pointer-events: none;

    transition:
        transform 0.55s cubic-bezier(.34, 1.56, .64, 1),
        opacity 0.35s ease;
    cursor: pointer;
}

/* Появление */
.alert-success.is-visible {
    transform: translate(-50%, 0) !important;
    opacity: 1 !important;
    pointer-events: auto;
}

/* Уход */
.alert-success.dismissing {
    transform: translate(-50%, 200%) !important;
    opacity: 0 !important;
}

.alert-success i,
.alert-success svg {
    color: #4ade80 !important;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Прячем крестик закрытия */
.alert-success .btn-close,
.alert-success .close,
.alert-success button[aria-label="Close"],
.alert-success button[data-bs-dismiss="alert"] {
    display: none !important;
}

/* ============================================
   Настройки аккаунта — компактнее
   ============================================ */

.tw-settings-details {
    margin-top: 16px !important;
}

.tw-settings-details > summary {
    padding: 14px 18px !important;
    font-size: .82rem !important;
}

.tw-settings-details > .tw-details-body {
    padding: 0 18px 18px !important;
    padding-top: 16px !important;
}

.tw-settings-details .tw-subsection-title {
    font-size: .72rem !important;
    margin: 0 0 10px !important;
}

.tw-settings-details .form-control,
.tw-settings-details input {
    padding: 8px 12px !important;
    font-size: .84rem !important;
}

.tw-settings-details .btn {
    padding: 8px 16px !important;
    font-size: .78rem !important;
}

.tw-settings-details .row.gy-4 {
    --bs-gutter-y: 16px;
}