@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg: #0c0d12;
    --surface: #13151d;
    --surface-light: #191c27;
    --border: #282b39;
    --text: #f3f3fa;
    --muted: #a0a3b5;
    --accent: #9b7bff;
    --accent-strong: #7752f6;
    --green: #72e6ae;
    --danger: #ff6b82;
    --radius: 18px;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    background:
        radial-gradient(ellipse at 50% -20%, #282044 0, transparent 55%),
        var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

button,
a,
input,
textarea {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

h1,
h2,
h3,
.brand {
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 7vw, 5.2rem);
    letter-spacing: -0.065em;
}

h2 {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    letter-spacing: -0.04em;
}

h3 {
    font-size: 1.2rem;
    letter-spacing: -0.025em;
}

p {
    margin-top: 0;
}

.container {
    width: min(var(--max-width), calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    width: 100%;
    min-height: 76px;
    padding: 14px max(20px, calc((100vw - var(--max-width)) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    background: rgba(12,13,18,.82);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(135deg, #b4a0ff, #7652f5);
    color: white;
    box-shadow: 0 5px 22px rgba(119,82,246,.24);
}

.main-nav,
.header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.main-nav a,
.site-footer a {
    color: var(--muted);
    font-size: .91rem;
    transition: color .2s ease;
}

.main-nav a:hover,
.site-footer a:hover {
    color: white;
}

.header-actions {
    gap: 12px;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 19px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: linear-gradient(135deg, #a68dff, #7954f5);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease, filter .2s ease;
}

.button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.button-small {
    min-height: 38px;
    padding: 8px 13px;
    font-size: .85rem;
}

.button-ghost {
    background: rgba(255,255,255,.035);
    border-color: var(--border);
}

.button-danger {
    background: rgba(255,107,130,.12);
    border-color: rgba(255,107,130,.25);
    color: #ff9cac;
}

.hero {
    min-height: 560px;
    padding: 90px 0 70px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 60px;
}

.hero-content {
    max-width: 650px;
}

.eyebrow {
    color: var(--accent);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .15em;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 14px rgba(114,230,174,.6);
}

.hero h1 {
    margin: 20px 0;
}

.hero h1 span {
    color: var(--accent);
}

.hero-description {
    max-width: 530px;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero-card {
    position: relative;
    min-height: 330px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 34px;
    border: 1px solid #353049;
    border-radius: 26px;
    background:
        linear-gradient(150deg, rgba(130,97,255,.18), transparent 65%),
        var(--surface);
    box-shadow: 0 30px 90px rgba(0,0,0,.2);
}

.hero-card h2 {
    max-width: 340px;
    margin: 8px 0 15px;
}

.hero-card-label {
    position: relative;
    z-index: 1;
    color: var(--muted);
    font-size: .75rem;
    letter-spacing: .08em;
}

.discord-symbol {
    position: absolute;
    top: 42px;
    right: 38px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 118px;
    height: 118px;
    border-radius: 35px;
    background: linear-gradient(135deg, #a58cff, #7150ee);
    box-shadow: 0 15px 55px rgba(119,82,246,.35);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 4.5rem;
    font-weight: 700;
    transform: rotate(7deg);
}

.orb {
    position: absolute;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(175,151,255,.18);
    border-radius: 50%;
}

.orb-one {
    top: -70px;
    right: -20px;
}

.orb-two {
    top: -45px;
    right: 5px;
    width: 230px;
    height: 230px;
}

.card-line {
    width: 48px;
    height: 3px;
    margin: 0 0 12px;
    background: var(--accent);
}

.section {
    padding: 65px 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 8px 0 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.content-card,
.panel,
.empty-state {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(255,255,255,.025), transparent), var(--surface);
}

.content-card {
    min-width: 0;
    padding: 25px;
}

.content-card h3 {
    margin: 10px 0;
}

.content-card p {
    color: var(--muted);
}

.card-meta {
    color: var(--accent) !important;
    font-size: .8rem;
}

.empty-state {
    padding: 38px 24px;
    text-align: center;
}

.empty-state h3 {
    margin: 10px 0;
}

.empty-state p {
    margin-bottom: 0;
    color: var(--muted);
}

.empty-icon {
    color: var(--accent);
    font-size: 2rem;
}

.event-list {
    display: grid;
    gap: 12px;
}

.event-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.event-date {
    flex: 0 0 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 9px;
    border: 1px solid #40365f;
    border-radius: 13px;
    background: rgba(155,123,255,.09);
}

.event-date strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.7rem;
}

.event-date span {
    color: var(--accent);
    font-size: .72rem;
    font-weight: 700;
}

.event-details {
    flex: 1;
    min-width: 0;
}

.event-details h3 {
    margin: 0 0 6px;
}

.event-details p {
    margin: 4px 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.text-link {
    color: #b7a5ff;
    font-weight: 700;
    white-space: nowrap;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.gallery-item {
    overflow: hidden;
    display: block;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.join-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin: 50px 0 80px;
    padding: 38px;
    border: 1px solid #42365e;
    border-radius: 22px;
    background: linear-gradient(110deg, rgba(155,123,255,.15), rgba(19,21,29,.8));
}

.join-banner h2 {
    margin: 8px 0;
}

.join-banner p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 26px max(20px, calc((100vw - var(--max-width)) / 2));
    border-top: 1px solid var(--border);
}

.site-footer p {
    margin: 0;
    color: var(--muted);
    font-size: .85rem;
}

.preserve-lines {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.muted {
    color: var(--muted);
}

.notice {
    margin: 22px 0;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.notice.success {
    border-color: rgba(114,230,174,.35);
    color: var(--green);
}

.notice.error {
    border-color: rgba(255,107,130,.4);
    color: #ff9cac;
}

.standalone {
    max-width: 800px;
    margin: 70px auto;
    padding: 34px;
}

.standalone h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
}

.admin-header {
    padding: 48px 0 20px;
}

.admin-header h1 {
    margin: 8px 0;
    font-size: clamp(2.3rem, 5vw, 3.5rem);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 20px 0 30px;
}

.panel {
    min-width: 0;
    padding: 25px;
}

.panel h2 {
    margin-top: 0;
    font-size: 1.45rem;
}

.panel form {
    display: grid;
    gap: 15px;
}

.panel label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: .9rem;
}

.panel input:not([type="hidden"]),
.panel textarea {
    width: 100%;
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #0e1017;
    color: var(--text);
}

.panel textarea {
    resize: vertical;
}

.panel input[type="file"] {
    padding: 10px;
}

.list-panel {
    margin-bottom: 18px;
}

.count {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    padding: 0 7px;
    border-radius: 8px;
    background: var(--surface-light);
    color: var(--accent);
    font-size: .8rem;
}

.admin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 0;
    border-top: 1px solid var(--border);
}

.admin-item p {
    margin: 4px 0;
    font-size: .85rem;
}

.admin-item form {
    flex: 0 0 auto;
}

.admin-thumb {
    display: block;
    width: 90px;
    height: 65px;
    margin-top: 8px;
    border-radius: 8px;
    object-fit: cover;
}

@media (max-width: 900px) {
    .site-header {
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding: 5px 0;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 35px;
        padding-top: 60px;
    }

    .hero-card {
        min-height: 290px;
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .event-card {
        align-items: flex-start;
    }

    .site-footer {
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .container {
        width: calc(100% - 28px);
    }

    .site-header {
        padding: 13px 14px;
        gap: 12px;
    }

    .brand {
        font-size: .9rem;
    }

    .header-actions {
        margin-left: auto;
    }

    .main-nav {
        gap: 18px;
    }

    .hero {
        padding: 45px 0 25px;
    }

    .hero-card {
        min-height: 280px;
        padding: 24px;
    }

    .discord-symbol {
        top: 28px;
        right: 28px;
        width: 85px;
        height: 85px;
        border-radius: 25px;
        font-size: 3.2rem;
    }

    .section {
        padding: 42px 0;
    }

    .card-grid,
    .gallery-grid,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .event-card {
        flex-wrap: wrap;
        gap: 13px;
        padding: 15px;
    }

    .event-details {
        flex-basis: calc(100% - 80px);
    }

    .event-card > .text-link {
        margin-left: 77px;
    }

    .join-banner {
        align-items: flex-start;
        flex-direction: column;
        margin: 35px 0 55px;
        padding: 25px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 25px 18px;
    }

    .standalone,
    .panel {
        padding: 22px;
    }

    .admin-item {
        align-items: flex-start;
    }
}