@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #18182a;
    --bg-card-hover: #22223a;
    --border-color: #2a2a4a;

    --text-primary: #f0ecff;
    --text-secondary: #b0aad0;
    --text-muted: #6a6490;

    --accent: #9b59b6;
    --accent-hover: #c084d8;
    --accent-glow: rgba(155, 89, 182, 0.5);
    --accent-dim: rgba(155, 89, 182, 0.12);
    --accent-secondary: #8e44ad;
    --accent-pink: #e84393;

    --discord-blue: #5865F2;
    --success-green: #00ff88;
    --danger-red: #ff4466;

    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    --glow-purple: 0 0 30px rgba(155, 89, 182, 0.3);

    --nav-height: 64px;
    --sidebar-width: 260px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

a { color: var(--text-primary); text-decoration: none; }

.page { display: none; min-height: 100vh; background-color: var(--bg-primary); width: 100%; }
.page.active { display: block; }

/* =========================
   NAVIGATION
   ========================= */

nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    min-height: var(--nav-height);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-brand { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; color: var(--text-primary); cursor: pointer; flex-shrink: 0; }
.nav-brand .crown { color: var(--accent); font-size: 18px; text-shadow: 0 0 20px var(--accent-glow); }

.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-primary); font-size: 24px; cursor: pointer; padding: 4px 8px; border-radius: 6px; margin-left: auto; }
.mobile-menu-btn:hover { background: var(--accent-dim); }

.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }

.nav-link { padding: 6px 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.03em; color: var(--text-secondary); cursor: pointer; border: none; background: none; text-transform: uppercase; transition: color 0.2s, background 0.2s; border-radius: 6px; white-space: nowrap; font-family: inherit; }
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); }
.nav-link.active { color: var(--accent); background: var(--accent-dim); text-shadow: 0 0 20px var(--accent-glow); }

.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }

.btn-outline { padding: 6px 12px; border: 1.5px solid var(--border-color); background: transparent; color: var(--text-secondary); font-size: 11px; font-weight: 700; letter-spacing: 0.05em; cursor: pointer; border-radius: 6px; transition: all 0.2s; text-transform: uppercase; white-space: nowrap; font-family: inherit; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }

.btn-invite { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: linear-gradient(135deg, #5865F2, #4752c4); color: #fff; border: none; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; cursor: pointer; transition: all 0.25s; text-transform: uppercase; text-decoration: none; box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4); white-space: nowrap; }
.btn-invite:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(88, 101, 242, 0.5); opacity: 0.9; }
.btn-invite svg { width: 16px; height: 16px; }

.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; background: linear-gradient(135deg, var(--accent), var(--accent-secondary)); color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; cursor: pointer; transition: all 0.25s; text-transform: uppercase; box-shadow: 0 4px 20px var(--accent-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 40px var(--accent-glow); }

.btn-gold { padding: 8px 16px; background: linear-gradient(135deg, var(--accent), var(--accent-secondary)); color: #fff; border: none; border-radius: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; cursor: pointer; transition: all 0.2s; text-transform: uppercase; box-shadow: 0 4px 15px var(--accent-glow); font-family: inherit; }
.btn-gold:hover { transform: scale(1.02); box-shadow: 0 6px 30px var(--accent-glow); }

.btn-danger { padding: 6px 14px; background: transparent; border: 1px solid var(--danger-red); color: var(--danger-red); border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.2s; text-transform: uppercase; font-family: inherit; }
.btn-danger:hover { background: rgba(255, 68, 102, 0.15); }

.btn-cancel { padding: 8px 18px; border: 1px solid var(--border-color); border-radius: 8px; background: transparent; color: var(--text-secondary); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.3s; font-family: inherit; }
.btn-cancel:hover { background: var(--border-color); color: #fff; }

.user-chip { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 13px; font-weight: 500; }
.user-chip img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--accent) !important; box-shadow: 0 0 15px var(--accent-glow); object-fit: cover; }

.logout-btn { padding: 4px 10px; border: 1px solid var(--border-color); background: transparent; color: var(--text-secondary); font-size: 11px; cursor: pointer; border-radius: 4px; transition: all 0.2s; text-transform: uppercase; letter-spacing: 0.05em; font-family: inherit; }
.logout-btn:hover { border-color: var(--accent); color: var(--accent); }

/* =========================
   HERO
   ========================= */

.hero { position: relative; min-height: calc(100vh - var(--nav-height)); display: flex; align-items: center; overflow: hidden; background: var(--bg-primary); }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 50%, rgba(155,89,182,0.15) 0%, transparent 60%), radial-gradient(ellipse at 80% 50%, rgba(108,92,231,0.08) 0%, transparent 50%), var(--bg-primary); z-index: 0; }
.hero-content { position: relative; z-index: 2; padding: 40px 24px; max-width: 700px; width: 100%; }
.hero-sub { font-size: 14px; font-weight: 600; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; text-shadow: 0 0 30px var(--accent-glow); }
.hero-title { font-size: clamp(36px, 10vw, 72px); font-weight: 900; line-height: 0.95; color: var(--text-primary); letter-spacing: -0.02em; margin-bottom: 16px; }
.hero-title .highlight { background: linear-gradient(135deg, var(--accent), var(--accent-pink)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-shadow: 0 0 40px var(--accent-glow); }
.hero-divider { width: 40px; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-pink)); margin: 16px 0; border-radius: 2px; box-shadow: 0 0 20px var(--accent-glow); }
.hero-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.7; max-width: 520px; margin-bottom: 28px; }

/* =========================
   SECTIONS
   ========================= */

.section { padding: 60px 20px; background: var(--bg-primary); }
.section-bg2 { background: var(--bg-secondary); }
.section-title { font-size: 28px; font-weight: 800; text-align: center; letter-spacing: -0.01em; color: var(--text-primary); margin-bottom: 8px; }
.section-title .highlight { background: linear-gradient(135deg, var(--accent), var(--accent-pink)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-crown { text-align: center; color: var(--accent); font-size: 16px; margin-bottom: 20px; text-shadow: 0 0 30px var(--accent-glow); }
.section-text { text-align: center; color: var(--text-secondary); max-width: 650px; margin: 0 auto 28px; font-size: 16px; line-height: 1.8; }

/* =========================
   ГАЛЕРЕЯ - КАРУСЕЛЬ
   ========================= */

.gallery-carousel {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-stage {
    flex: 1;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    aspect-ratio: 16 / 9;
    min-height: 300px;
}

.gallery-stage:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 50px var(--accent-glow);
}

.gallery-stage img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg-primary);
    cursor: zoom-in;
    transition: transform 0.4s, opacity 0.3s;
    display: block;
}

.gallery-stage img:hover {
    transform: scale(1.02);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    pointer-events: none;
}

.gallery-nav-btn {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(155, 89, 182, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding-bottom: 4px;
    font-family: inherit;
    user-select: none;
}

.gallery-nav-btn:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 30px var(--accent-glow);
    transform: scale(1.1);
}

.gallery-nav-btn:active {
    transform: scale(0.95);
}

.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.25s;
    border: 1px solid transparent;
}

.gallery-dot:hover {
    background: var(--accent-hover);
    transform: scale(1.2);
}

.gallery-dot.active {
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: scale(1.3);
    border-color: var(--accent-hover);
}

.gallery-counter {
    text-align: center;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* =========================
   ЛАЙТБОКС ГАЛЕРЕИ
   ========================= */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-lightbox.open {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 80px rgba(155, 89, 182, 0.4);
    transition: opacity 0.3s;
    background: var(--bg-card);
}

.lightbox-info {
    text-align: center;
    color: var(--text-primary);
    max-width: 700px;
}

.lightbox-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 0 20px var(--accent-glow);
}

.lightbox-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.lightbox-counter {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    font-weight: 600;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(155, 89, 182, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 30px var(--accent-glow);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(155, 89, 182, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 32px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding-bottom: 4px;
    font-family: inherit;
    z-index: 10;
    user-select: none;
}

.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }

.lightbox-nav:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 40px var(--accent-glow);
    transform: translateY(-50%) scale(1.1);
}

/* =========================
   CONTACTS
   ========================= */

.contacts-grid { display: grid; grid-template-columns: 1fr; gap: 16px; max-width: 900px; margin: 0 auto; }
.contact-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 24px 20px; text-align: center; transition: all 0.3s; }
.contact-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--glow-purple); }
.contact-card .icon { font-size: 28px; margin-bottom: 12px; }
.contact-card h4 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.contact-card p { font-size: 13px; color: var(--text-secondary); }
.contact-card a { color: var(--accent); font-weight: 600; transition: color 0.2s; }
.contact-card a:hover { color: var(--accent-hover); }

/* =========================
   КАЛЕНДАРЬ
   ========================= */

.calendar-wrap { padding: 0; max-width: 1000px; margin: 0 auto; }
.page-title { font-size: 32px; font-weight: 800; text-align: center; letter-spacing: -0.01em; color: var(--text-primary); margin-bottom: 6px; }
.page-title .highlight { background: linear-gradient(135deg, var(--accent), var(--accent-pink)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.cal-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 16px; margin-top: 20px; overflow-x: auto; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 8px; }
.cal-nav-btn { padding: 6px 14px; border: 1px solid var(--border-color); background: transparent; color: var(--text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; border-radius: 6px; transition: all 0.2s; font-family: inherit; }
.cal-nav-btn:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }
.cal-month { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; min-width: 280px; }
.cal-dow { padding: 6px 2px; text-align: center; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-muted); text-transform: uppercase; }
.cal-cell { min-height: 60px; padding: 4px; background: var(--bg-secondary); border-radius: 6px; font-size: 12px; color: var(--text-secondary); transition: background 0.2s; }
.cal-cell.other-month { opacity: 0.25; }
.cal-cell.has-bday { border: 1px solid var(--accent); background: var(--accent-dim); box-shadow: inset 0 0 20px var(--accent-glow); }
.cal-cell .day-num { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 2px; }
.bday-entry { display: flex; align-items: center; gap: 4px; font-size: 9px; color: var(--text-secondary); margin-top: 2px; }
.bday-entry img { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; object-fit: cover; border: 1px solid var(--accent); }
.bday-name { font-weight: 600; color: var(--text-primary); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40px; }

.upcoming-section { margin-top: 24px; }
.upcoming-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--text-primary); }
.upcoming-list { display: flex; flex-direction: column; gap: 4px; }
.upcoming-item { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; transition: all 0.2s; }
.upcoming-item:hover { border-color: var(--accent); box-shadow: var(--glow-purple); }
.upcoming-name { font-weight: 600; flex: 1; font-size: 14px; }
.upcoming-date { color: var(--text-secondary); font-size: 13px; }
.upcoming-days { color: var(--accent); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 4px; text-shadow: 0 0 20px var(--accent-glow); }

/* =========================
   ADMIN LAYOUT
   ========================= */

.admin-layout { display: flex; min-height: calc(100vh - var(--nav-height)); }
.admin-sidebar { width: var(--sidebar-width); flex-shrink: 0; background: var(--bg-secondary); border-right: 1px solid var(--border-color); padding: 20px 0; position: sticky; top: var(--nav-height); max-height: calc(100vh - var(--nav-height)); overflow-y: auto; transition: transform 0.3s; }
.sidebar-close { display: none; background: none; border: none; color: var(--text-secondary); font-size: 24px; cursor: pointer; padding: 8px 16px; text-align: right; width: 100%; }
.sidebar-label { padding: 0 20px 12px; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: var(--text-muted); text-transform: uppercase; }
.sidebar-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; font-size: 13px; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; border-left: 3px solid transparent; }
.sidebar-item:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); }
.sidebar-item.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-dim); text-shadow: 0 0 20px var(--accent-glow); }

.admin-content { flex: 1; padding: 24px 16px; overflow-y: auto; min-width: 0; }
.admin-section-title { font-size: 22px; font-weight: 800; color: var(--text-primary); display: flex; align-items: center; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-section-title .highlight { color: var(--accent); text-shadow: 0 0 30px var(--accent-glow); }

.form-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 20px; max-width: 600px; margin-bottom: 24px; transition: border-color 0.2s; }
.form-card:hover { border-color: var(--accent-dim); }
.form-card h3 { font-size: 14px; font-weight: 700; color: var(--text-secondary); margin-bottom: 18px; letter-spacing: 0.04em; text-transform: uppercase; }

.form-group { margin-bottom: 14px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; display: block; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 8px 12px; background: var(--bg-secondary); border: 1px solid var(--border-color); color: var(--text-primary); border-radius: 8px; font-size: 14px; font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s; outline: none; -webkit-appearance: none; appearance: none; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-select { cursor: pointer; }
.form-textarea { resize: vertical; min-height: 60px; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-color); gap: 12px; }
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: 13px; color: var(--text-secondary); }
.toggle { width: 40px; height: 24px; border-radius: 12px; background: var(--border-color); position: relative; cursor: pointer; transition: background 0.3s; flex-shrink: 0; }
.toggle.on { background: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }
.toggle::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: left 0.3s; }
.toggle.on::after { left: 19px; }

.bday-list { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.bday-list-item { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; transition: border-color 0.2s; }
.bday-list-item:hover { border-color: var(--accent); }
.bday-list-item .info { flex: 1; min-width: 100px; }
.bday-list-item .name { font-weight: 600; font-size: 14px; }
.bday-list-item .meta { font-size: 12px; color: var(--text-secondary); }

.admin-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; }
.admin-row { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-row .av { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-card); display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; overflow: hidden; }
.admin-row .av img { width: 100%; height: 100%; object-fit: cover; }
.admin-row .user-info { flex: 1; min-width: 80px; }
.admin-row .username { font-weight: 600; font-size: 14px; }
.admin-row .tag { font-size: 11px; color: var(--text-muted); }

.badge { padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-you { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent); }
.badge-admin { background: rgba(108, 92, 231, 0.2); color: #8c7cf0; border: 1px solid rgba(108, 92, 231, 0.4); }
.badge-owner { background: linear-gradient(135deg, rgba(155,89,182,0.25), rgba(232,67,147,0.25)); color: #d4a5e8; border: 1px solid #9b59b6; box-shadow: 0 0 15px rgba(155, 89, 182, 0.4); }
.badge-deputy { background: rgba(255, 200, 0, 0.15); color: #ffd700; border: 1px solid rgba(255, 215, 0, 0.5); box-shadow: 0 0 12px rgba(255, 215, 0, 0.3); }
.badge-special { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent); font-size: 9px; padding: 2px 8px; border-radius: 12px; }

.log-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; overflow-x: auto; }
.log-card table { width: 100%; border-collapse: collapse; min-width: 320px; }
.log-card th { text-align: left; padding: 10px 12px; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); }
.log-card td { padding: 8px 12px; font-size: 13px; color: var(--text-secondary); border-bottom: 1px solid rgba(255,255,255,0.03); }

.two-col { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 100%; }

#bot-stats-display > div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border-color); }
#bot-stats-display > div:last-child { border-bottom: none; }

.sidebar-group { margin-bottom: 12px; }
.sidebar-group-label { padding: 10px 20px 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: var(--text-muted); text-transform: uppercase; opacity: 0.7; }
.sidebar-item.no-access { opacity: 0.4; cursor: not-allowed; position: relative; }
.sidebar-item.no-access:hover { background: transparent; color: var(--text-secondary); }
.sidebar-item.no-access::after { content: '🔒'; position: absolute; right: 16px; font-size: 12px; opacity: 0.7; }

/* =========================
   GALLERY ADMIN
   ========================= */

.gallery-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 10px; }
.gallery-admin-item { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; transition: all 0.3s; cursor: grab; position: relative; }
.gallery-admin-item:hover { border-color: var(--accent); box-shadow: 0 0 30px var(--accent-glow); }
.gallery-admin-item.dragging { opacity: 0.5; border-color: var(--accent); }
.gallery-admin-item .preview { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-card); }
.gallery-admin-item .preview img { width: 100%; height: 100%; object-fit: cover; }
.gallery-admin-item .info { padding: 8px 10px; }
.gallery-admin-item .info .title { font-weight: 600; font-size: 12px; color: var(--text-primary); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-admin-item .info .desc { font-size: 10px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-admin-item .actions { display: flex; gap: 4px; padding: 6px 10px 10px; border-top: 1px solid var(--border-color); }
.gallery-admin-item .actions .btn-outline { font-size: 9px; padding: 3px 8px; flex: 1; }
.gallery-admin-item .order-badge { position: absolute; top: 6px; right: 6px; background: var(--accent); color: #fff; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 10px; box-shadow: 0 0 15px var(--accent-glow); }
.gallery-admin-item .drag-handle { position: absolute; top: 6px; left: 6px; color: var(--text-muted); font-size: 14px; cursor: grab; opacity: 0.5; transition: opacity 0.2s; }
.gallery-admin-item:hover .drag-handle { opacity: 1; }

#edit-gallery-modal .modal { max-width: 500px; }
#edit-gallery-modal .preview-img { width: 100%; max-height: 150px; object-fit: contain; border-radius: 8px; background: var(--bg-primary); margin-bottom: 10px; }

/* =========================
   MUSIC CONTROLS
   ========================= */

.music-controls-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 6px; }
.music-ctrl-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 10px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 12px; color: var(--text-primary); font-size: 22px; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.music-ctrl-btn span { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.music-ctrl-btn:hover { border-color: var(--accent); background: var(--accent-dim); transform: translateY(-2px); box-shadow: 0 8px 24px var(--accent-glow); }
.music-ctrl-btn:hover span { color: var(--accent); }
.music-ctrl-btn.danger:hover { border-color: var(--danger-red); background: rgba(255, 68, 102, 0.1); box-shadow: 0 8px 24px rgba(255, 68, 102, 0.3); }
.music-ctrl-btn.danger:hover span { color: var(--danger-red); }
.music-ctrl-btn:active { transform: translateY(0); }

.volume-control { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 10px 0; }
.volume-display { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 100px; padding: 14px 20px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 12px; transition: all 0.2s; }
.volume-display:hover { border-color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }
.volume-icon { font-size: 24px; line-height: 1; }
.volume-value { font-size: 18px; font-weight: 700; color: var(--accent); text-shadow: 0 0 20px var(--accent-glow); letter-spacing: 0.02em; }
.music-ctrl-btn.vol-btn { min-width: 80px; max-width: 100px; padding: 14px 12px; }

/* =========================
   MODALS
   ========================= */

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); z-index: 99999; display: none; align-items: center; justify-content: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 16px; }
.modal-overlay.open { display: flex !important; }
.modal { background: var(--bg-card); padding: 24px 20px; border-radius: 16px; border: 1px solid var(--border-color); max-width: 480px; width: 100%; box-shadow: var(--box-shadow); max-height: 90vh; overflow-y: auto; }
.modal h3 { color: var(--text-primary); text-align: center; margin-bottom: 6px; font-size: 20px; font-weight: 700; }
.modal h3 .highlight { color: var(--accent); }
.modal p { color: var(--text-secondary); text-align: center; margin-bottom: 18px; font-size: 14px; line-height: 1.6; }
.modal .form-group { margin-bottom: 12px; }
.modal .form-label { color: var(--text-secondary); display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; }
.modal .form-input, .modal .form-select { width: 100%; padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-secondary); color: var(--text-primary); box-sizing: border-box; font-size: 14px; transition: border-color 0.2s; -webkit-appearance: none; appearance: none; font-family: inherit; }
.modal .form-input:focus, .modal .form-select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-glow); }
.modal input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* =========================
   TOAST
   ========================= */

.toast { position: fixed; bottom: 20px; left: 20px; right: 20px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 14px 20px; font-size: 14px; font-weight: 500; color: var(--text-primary); z-index: 999999; opacity: 0; transition: opacity 0.4s; pointer-events: none; max-width: 420px; margin: 0 auto; box-shadow: var(--box-shadow); text-align: center; }
.toast.show { opacity: 1; }

#login-error { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 999; background: rgba(155, 89, 182, 0.1); border: 1px solid var(--accent); color: var(--accent); padding: 14px 20px; text-align: center; border-radius: 10px; max-width: 520px; width: 92%; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 14px; }

/* =========================
   SCROLLBAR
   ========================= */

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* =========================
   ЕДИНЫЙ КРАСНЫЙ БАННЕР: ТАЙМЕР + ПРЕДУПРЕЖДЕНИЕ
   ========================= */

.maintenance-banner {
    background: linear-gradient(135deg, #2a0a15 0%, #4a1025 50%, #2a0a15 100%);
    border-bottom: 1px solid #ff4466;
    padding: 14px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(255, 68, 102, 0.4);
}

.maintenance-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 68, 102, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

.maintenance-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ff4466, #ff8866, #ff4466, transparent);
    animation: maintenance-shine 3s linear infinite;
}

@keyframes maintenance-shine {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.maintenance-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.maintenance-top-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.maintenance-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #ffb8c6;
    letter-spacing: 0.02em;
}

.maintenance-text strong {
    color: #ff4466;
    text-shadow: 0 0 20px rgba(255, 68, 102, 0.8);
    font-weight: 800;
}

.maintenance-icon {
    font-size: 18px;
    animation: maintenance-pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 68, 102, 0.8));
}

@keyframes maintenance-pulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(255, 68, 102, 0.6)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 15px rgba(255, 68, 102, 0.9)); }
}

.maintenance-timer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 68, 102, 0.12);
    border: 1px solid #ff4466;
    border-radius: 10px;
    padding: 6px 12px;
    min-width: 62px;
    box-shadow: 0 0 20px rgba(255, 68, 102, 0.3), inset 0 0 15px rgba(255, 68, 102, 0.08);
    transition: all 0.3s;
}

.timer-block:hover {
    border-color: #ff6680;
    box-shadow: 0 0 30px rgba(255, 68, 102, 0.6), inset 0 0 20px rgba(255, 68, 102, 0.15);
    transform: translateY(-2px);
}

.timer-num {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    line-height: 1.1;
    text-shadow: 0 0 20px rgba(255, 68, 102, 0.9);
}

.timer-label {
    font-size: 9px;
    font-weight: 600;
    color: #ff8899;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 2px;
}

.timer-sep {
    font-size: 20px;
    font-weight: 800;
    color: #ff4466;
    text-shadow: 0 0 15px rgba(255, 68, 102, 0.9);
    animation: timer-blink 2s ease-in-out infinite;
}

@keyframes timer-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.maintenance-date {
    font-size: 12px;
    font-weight: 600;
    color: #ffb8c6;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    background: rgba(255, 68, 102, 0.12);
    border-radius: 20px;
    border: 1px solid rgba(255, 68, 102, 0.4);
}

.maintenance-bottom-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #ff8866;
    letter-spacing: 0.02em;
    text-align: center;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 68, 102, 0.35);
    animation: warning-text-pulse 3s ease-in-out infinite;
}

@keyframes warning-text-pulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

.maintenance-bottom-row strong {
    color: #ff4466;
    text-shadow: 0 0 20px rgba(255, 68, 102, 0.8);
    font-weight: 800;
    letter-spacing: 0.03em;
}

.maintenance-warning-icon {
    font-size: 16px;
    animation: warning-shake 1.5s ease-in-out infinite;
    display: inline-block;
    filter: drop-shadow(0 0 8px rgba(255, 68, 102, 0.8));
}

@keyframes warning-shake {
    0%, 100% { transform: rotate(0deg) scale(1); }
    20% { transform: rotate(-15deg) scale(1.1); }
    40% { transform: rotate(15deg) scale(1.1); }
    60% { transform: rotate(-10deg) scale(1.05); }
    80% { transform: rotate(10deg) scale(1.05); }
}

.maintenance-warning-text {
    line-height: 1.4;
    text-shadow: 0 0 10px rgba(255, 136, 102, 0.5);
}

/* =========================
   MEDIA QUERIES
   ========================= */

@media (max-width: 992px) {
    .two-col { grid-template-columns: 1fr; }
    .admin-content { padding: 20px 16px; }
    .admin-sidebar { width: 220px; }

    .maintenance-top-row { gap: 14px; }
    .maintenance-text { font-size: 12px; }
    .timer-block { min-width: 54px; padding: 4px 8px; }
    .timer-num { font-size: 18px; }
    .timer-label { font-size: 8px; }
    .timer-sep { font-size: 16px; }
}

@media (max-width: 768px) {
    nav { padding: 8px 12px; gap: 6px; min-height: 56px; flex-wrap: wrap; }
    .nav-brand { font-size: 15px; gap: 6px; }
    .nav-brand .crown { font-size: 16px; }
    .mobile-menu-btn { display: block; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: rgba(10, 10, 15, 0.98); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); flex-direction: column; padding: 12px 16px; border-bottom: 1px solid var(--border-color); gap: 4px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6); z-index: 99; align-items: stretch; }
    .nav-links.open { display: flex; }
    .nav-link { padding: 10px 14px; font-size: 14px; text-align: center; width: 100%; white-space: normal; }
    .nav-right { gap: 4px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
    .btn-invite { padding: 4px 10px; font-size: 10px; }
    .btn-invite svg { width: 14px; height: 14px; }
    .btn-outline { padding: 4px 10px; font-size: 10px; }
    .logout-btn { padding: 4px 8px; font-size: 10px; }
    .user-chip { font-size: 11px; gap: 4px; }
    .user-chip img { width: 24px; height: 24px; }

    .hero-content { padding: 30px 16px; }
    .hero-title { font-size: clamp(28px, 8vw, 42px); }
    .hero-desc { font-size: 14px; }
    .hero-sub { font-size: 12px; }

    .section { padding: 40px 16px; }
    .section-title { font-size: 24px; }
    .section-text { font-size: 14px; }

    .gallery-carousel { gap: 6px; }
    .gallery-nav-btn { width: 40px; height: 40px; font-size: 22px; }
    .gallery-stage { aspect-ratio: 4 / 3; min-height: 200px; border-radius: 12px; }
    .gallery-caption { font-size: 13px; padding: 10px 14px; }
    .gallery-dot { width: 8px; height: 8px; }

    .lightbox-nav { width: 44px; height: 44px; font-size: 24px; }
    .lightbox-nav.prev { left: 8px; }
    .lightbox-nav.next { right: 8px; }
    .lightbox-close { width: 38px; height: 38px; top: 12px; right: 12px; font-size: 18px; }
    .lightbox-title { font-size: 16px; }
    .lightbox-desc { font-size: 13px; }

    .page-title { font-size: 26px; }

    .cal-card { padding: 12px; }
    .cal-cell { min-height: 48px; padding: 3px; font-size: 10px; }
    .cal-cell .day-num { font-size: 9px; }
    .bday-entry { font-size: 7px; }
    .bday-entry img { width: 12px; height: 12px; }
    .bday-name { font-size: 7px; max-width: 28px; }
    .cal-month { font-size: 15px; }
    .cal-nav-btn { font-size: 11px; padding: 4px 10px; }

    .upcoming-item { padding: 8px 12px; gap: 8px; }
    .upcoming-name { font-size: 12px; }
    .upcoming-date { font-size: 11px; }
    .upcoming-days { font-size: 11px; }

    .admin-layout { flex-direction: column; }
    .admin-sidebar { position: fixed; top: 0; left: 0; width: 280px; height: 100vh; transform: translateX(-100%); z-index: 200; border-right: 1px solid var(--border-color); padding-top: 12px; max-height: 100vh; overflow-y: auto; background: var(--bg-secondary); }
    .admin-sidebar.open { transform: translateX(0); }
    .sidebar-close { display: block; }
    .sidebar-item { padding: 12px 20px; font-size: 14px; }

    .admin-sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 199; }
    .admin-sidebar-overlay.open { display: block; }

    .admin-content { padding: 16px 12px; }
    .admin-section-title { font-size: 20px; gap: 8px; }
    .form-card { padding: 16px; margin-bottom: 16px; }
    .form-card h3 { font-size: 13px; }

    .bday-list-item { padding: 8px 12px; }
    .bday-list-item .name { font-size: 13px; }
    .bday-list-item .meta { font-size: 11px; }

    .gallery-admin-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }

    .modal { padding: 20px 16px; }
    .modal h3 { font-size: 18px; }
    .modal p { font-size: 13px; }

    .toast { bottom: 12px; left: 12px; right: 12px; padding: 12px 16px; font-size: 13px; max-width: 100%; }
    #login-error { top: 60px; padding: 12px 16px; font-size: 13px; width: 94%; }

    .music-controls-grid { grid-template-columns: repeat(2, 1fr); }
    .music-ctrl-btn { padding: 12px 8px; font-size: 20px; }

    .volume-control { gap: 10px; }
    .volume-display { min-width: 80px; padding: 10px 14px; }
    .volume-icon { font-size: 20px; }
    .volume-value { font-size: 15px; }
    .music-ctrl-btn.vol-btn { min-width: 70px; max-width: 80px; padding: 12px 8px; font-size: 20px; }

    .maintenance-banner { padding: 10px 12px; }
    .maintenance-inner { gap: 10px; }
    .maintenance-top-row { gap: 10px; flex-direction: column; }
    .maintenance-text { font-size: 11px; gap: 4px; }
    .maintenance-icon { font-size: 14px; }
    .maintenance-timer { gap: 4px; }
    .timer-block { min-width: 44px; padding: 4px 6px; border-radius: 8px; }
    .timer-num { font-size: 15px; }
    .timer-label { font-size: 7px; letter-spacing: 0.05em; }
    .timer-sep { font-size: 13px; }
    .maintenance-date { font-size: 10px; padding: 3px 8px; }

    .maintenance-bottom-row { font-size: 11px; gap: 6px; padding-top: 8px; }
    .maintenance-warning-icon { font-size: 14px; }
}

@media (max-width: 480px) {
    .cal-grid { gap: 2px; min-width: auto; }
    .cal-cell { min-height: 40px; padding: 2px; font-size: 9px; }
    .cal-cell .day-num { font-size: 8px; }
    .bday-entry { font-size: 6px; }
    .bday-entry img { width: 10px; height: 10px; }
    .bday-name { font-size: 6px; max-width: 20px; }
    .gallery-admin-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .contacts-grid { gap: 12px; }
    .contact-card { padding: 18px 16px; }
    .contact-card .icon { font-size: 24px; }
    .btn-primary { font-size: 11px; padding: 8px 16px; }
    .btn-gold { font-size: 11px; padding: 6px 12px; }
    .music-controls-grid { grid-template-columns: repeat(2, 1fr); }

    .gallery-nav-btn { width: 34px; height: 34px; font-size: 18px; }
    .gallery-stage { min-height: 160px; }

    .timer-block { min-width: 38px; padding: 3px 5px; }
    .timer-num { font-size: 13px; }
    .timer-label { font-size: 6px; }
    .timer-sep { font-size: 11px; }

    .maintenance-bottom-row { font-size: 10px; gap: 4px; }
    .maintenance-warning-icon { font-size: 16px; }
}
/* Галерея и другие секции участника — адаптив */
.member-section {
    width: 100%;
    overflow-x: hidden;
}

/* Карусель галереи — на всю ширину контейнера */
#member-gallery-grid,
#front-gallery-grid {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* Убираем огромные отступы у секций участника на мобильном */
@media (max-width: 992px) {
    .member-section[style*="padding:80px 64px"] {
        padding: 60px 32px !important;
    }
}

@media (max-width: 768px) {
    .member-section[style*="padding:80px 64px"] {
        padding: 40px 16px !important;
    }
}

@media (max-width: 480px) {
    .member-section[style*="padding:80px 64px"] {
        padding: 30px 10px !important;
    }
}
/* На мобильном галерея — на всю ширину */
@media (max-width: 768px) {
    .gallery-carousel {
        max-width: 100%;
        gap: 6px;
    }
    
    .gallery-stage {
        min-height: 200px;
        aspect-ratio: 4 / 3;
    }
    
    .gallery-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .gallery-carousel {
        gap: 4px;
    }
    
    .gallery-stage {
        min-height: 160px;
        border-radius: 10px;
    }
    
    .gallery-nav-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
        padding-bottom: 2px;
    }
}
