* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: #f8fbff;
    background:
        radial-gradient(circle at 15% 5%, rgba(0, 246, 255, 0.24), transparent 28%),
        radial-gradient(circle at 85% 85%, rgba(255, 0, 220, 0.20), transparent 34%),
        linear-gradient(135deg, #030611 0%, #0a1025 52%, #17162f 100%);
    overflow-x: hidden;
}

.bg-image,
.bg-grid,
.glow {
    position: fixed;
    pointer-events: none;
}

.bg-image {
    inset: 0;
    opacity: 0.25;
    background:
        repeating-linear-gradient(60deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 22px),
        linear-gradient(120deg, transparent 0%, rgba(0,246,255,0.14) 18%, transparent 19%),
        linear-gradient(300deg, transparent 0%, rgba(255,77,240,0.12) 24%, transparent 25%);
}

.bg-grid {
    inset: 0;
    opacity: 0.25;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 42px 42px;
}

.glow {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.65;
}

.glow-a {
    background: #00f6ff;
    top: -90px;
    left: -90px;
}

.glow-b {
    background: #b34dff;
    right: -110px;
    bottom: -90px;
}

.hidden {
    display: none !important;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card,
.panel {
    position: relative;
    z-index: 1;
    background:
        linear-gradient(145deg, rgba(21, 30, 58, 0.88), rgba(7, 12, 29, 0.86)),
        repeating-linear-gradient(135deg, rgba(255,255,255,0.028) 0px, rgba(255,255,255,0.028) 1px, transparent 1px, transparent 9px);
    border: 1px solid rgba(113, 244, 255, 0.26);
    box-shadow:
        0 0 38px rgba(0, 246, 255, 0.18),
        0 24px 70px rgba(0,0,0,0.42),
        inset 0 1px 0 rgba(255,255,255,0.12);
    backdrop-filter: blur(18px);
    border-radius: 24px;
}

.auth-card {
    width: min(460px, 100%);
    padding: 34px;
}

.brand {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
}

.logo,
.small-logo {
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #00f6ff, #b34dff, #ff4df0);
    color: #06111f;
    font-weight: 900;
    box-shadow: 0 0 26px rgba(0, 246, 255, 0.48);
}

.logo {
    width: 64px;
    height: 64px;
    font-size: 24px;
}

.small-logo {
    width: 38px;
    height: 38px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.hint,
.brand p,
.panel p {
    color: #b7c5e7;
}

.tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

button,
.tab {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 11px 16px;
    color: #edf8ff;
    background: linear-gradient(145deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
    cursor: pointer;
    transition: 0.18s ease;
}

button:hover,
.tab.active {
    background: linear-gradient(135deg, #00eaff, #b34dff);
    color: #06111f;
    box-shadow: 0 0 22px rgba(0, 246, 255, 0.42);
    transform: translateY(-1px);
}

input,
textarea,
select {
    width: 100%;
    margin: 9px 0;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid rgba(128, 215, 255, 0.24);
    background: linear-gradient(145deg, rgba(4, 10, 24, 0.86), rgba(12, 21, 45, 0.72));
    color: white;
    outline: none;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.primary-btn {
    width: 100%;
    background: linear-gradient(135deg, #00f6ff, #b34dff, #ff4df0);
    color: #06111f;
    font-weight: 800;
}

.danger-btn {
    background: rgba(255, 75, 120, 0.16);
    color: #ff9ab7;
}

.message {
    min-height: 22px;
    margin-top: 12px;
    color: #7ff8ff;
}

.app {
    padding: 22px;
}

.topbar {
    position: sticky;
    top: 16px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    margin-bottom: 24px;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(9, 14, 30, 0.90), rgba(13, 22, 48, 0.76));
    border: 1px solid rgba(113, 244, 255, 0.22);
    backdrop-filter: blur(18px);
}

.top-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.nav-badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ff4df0;
    color: white;
    font-size: 12px;
}

.page {
    display: none;
}

.active-page {
    display: block;
}

.panel {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px;
}

.hero h1 {
    font-size: clamp(34px, 6vw, 70px);
    line-height: 0.95;
    background: linear-gradient(135deg, #ffffff, #7ff8ff, #ff8cff);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-symbol {
    font-size: 58px;
    color: #7ff8ff;
    text-shadow: 0 0 25px #00f6ff;
}

.info-grid,
.triple-grid,
.profile-layout {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.info-grid,
.triple-grid {
    grid-template-columns: repeat(3, 1fr);
}

.profile-layout {
    grid-template-columns: 220px 1fr;
}

.inner-card,
.card,
.member-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 18px;
    padding: 18px;
}

.card-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0, 246, 255, 0.12);
    color: #7ff8ff;
    font-size: 13px;
    margin: 2px 5px 5px 0;
}

.badge.pink {
    background: rgba(255, 77, 240, 0.12);
    color: #ff9df7;
}

.badge.locked {
    background: rgba(255, 75, 120, 0.14);
    color: #ff9ab7;
}

.badge.admin {
    background: rgba(255, 215, 80, 0.14);
    color: #ffe27a;
}

.badge.owner {
    background: rgba(0, 255, 160, 0.16);
    color: #8fffd2;
}

.controls,
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.toggle-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 12px 0;
}

.toggle-row input {
    width: auto;
}

.chat-box {
    height: 430px;
    overflow-y: auto;
    padding: 16px;
    background: linear-gradient(145deg, rgba(4, 10, 24, 0.86), rgba(11, 20, 46, 0.72));
    border: 1px solid rgba(128, 215, 255, 0.16);
    border-radius: 18px;
    margin-bottom: 12px;
}

.chat-message {
    margin: 8px 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.07);
}

.chat-message strong {
    color: #7ff8ff;
}

.chat-row {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 10px;
}

.big-avatar {
    width: 180px;
    height: 180px;
    border-radius: 28px;
    object-fit: cover;
    background: linear-gradient(135deg, #10162c, #30215a);
    border: 1px solid rgba(127, 248, 255, 0.35);
    box-shadow: 0 0 28px rgba(0, 246, 255, 0.22);
}

.small-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 10px;
    border: 1px solid rgba(127, 248, 255, 0.25);
}

.toast-area {
    position: fixed;
    top: 88px;
    right: 18px;
    z-index: 999;
    display: grid;
    gap: 10px;
    max-width: 340px;
}

.toast {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(7, 12, 29, 0.94);
    border: 1px solid rgba(127, 248, 255, 0.25);
    box-shadow: 0 0 24px rgba(0, 246, 255, 0.22);
}

.unread {
    border-color: rgba(255, 77, 240, 0.35);
    box-shadow: 0 0 18px rgba(255, 77, 240, 0.12);
}

@media (max-width: 760px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        justify-content: flex-start;
    }

    .info-grid,
    .triple-grid,
    .profile-layout,
    .chat-row {
        grid-template-columns: 1fr;
    }
}