* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #050505;
    --panel: #090909;
    --panel2: #0d0d0d;
    --line: rgba(255,255,255,.08);
    --text: #f4f4f4;
    --muted: #777;
    --orange: #ff4d00;
    --orange2: #ff8a00;
    --green: #45e875;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    overflow: hidden;

    background:
        #030303;

    color: var(--text);

    font-family:
        Inter,
        Arial,
        Helvetica,
        sans-serif;
}


/* ========================================
   GLOBAL ATMOSPHERE
======================================== */

body::before {
    content: "";

    position: fixed;

    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            115deg,
            transparent 20%,
            rgba(255,70,0,.035),
            transparent 70%
        );

    animation:
        atmosphere 8s ease-in-out infinite;

    z-index: 0;
}

@keyframes atmosphere {

    0% {
        transform: translateX(-10%);
    }

    50% {
        transform: translateX(10%);
    }

    100% {
        transform: translateX(-10%);
    }
}


/* ========================================
   LOADING
======================================== */

#loading {
    position: fixed;

    inset: 0;

    z-index: 99999;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        radial-gradient(
            circle at center,
            rgba(255,65,0,.18),
            transparent 30%
        ),
        #020202;

    transition:
        opacity .7s ease,
        visibility .7s ease;
}

#loading.finished {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-bg {
    position: absolute;

    width: 200vw;
    height: 200vh;

    background:
        repeating-conic-gradient(
            from 0deg,
            transparent 0deg 8deg,
            rgba(255,60,0,.025) 9deg 10deg
        );

    animation:
        rotateLoading 30s linear infinite;
}

@keyframes rotateLoading {
    to {
        transform: rotate(360deg);
    }
}

.loading-content {
    position: relative;

    width: min(500px, 85vw);

    text-align: center;
}

.loading-symbol {
    width: 85px;
    height: 85px;

    margin: 0 auto 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,90,0,.6);

    border-radius: 50%;

    color: var(--orange);

    font-size: 40px;
    font-weight: 900;

    box-shadow:
        0 0 30px rgba(255,60,0,.2),
        inset 0 0 30px rgba(255,60,0,.08);

    animation:
        symbolPulse 2s ease-in-out infinite;
}

@keyframes symbolPulse {

    0%,
    100% {
        transform: scale(.95);
        box-shadow:
            0 0 20px rgba(255,60,0,.15);
    }

    50% {
        transform: scale(1.05);
        box-shadow:
            0 0 50px rgba(255,60,0,.4);
    }
}

.loading-title {
    font-size: clamp(36px, 8vw, 70px);

    font-weight: 1000;

    letter-spacing: 12px;

    text-shadow:
        0 0 25px rgba(255,70,0,.5);
}

.loading-subtitle {
    margin-top: 8px;

    color: #666;

    font-size: 9px;

    letter-spacing: 4px;
}

.loading-number {
    margin-top: 45px;

    font-size: 30px;

    font-weight: 800;
}

.loading-track {
    width: 100%;
    height: 5px;

    margin-top: 12px;

    overflow: hidden;

    border-radius: 20px;

    background:
        rgba(255,255,255,.08);
}

#loadBar {
    width: 0%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            #ff3200,
            #ff9d00
        );

    box-shadow:
        0 0 20px rgba(255,80,0,.8);

    transition:
        width .08s linear;
}

#loadText {
    margin-top: 14px;

    color: #555;

    font-size: 9px;

    letter-spacing: 3px;
}


/* ========================================
   LOGIN
======================================== */

#loginPage {
    position: fixed;

    inset: 0;

    z-index: 100;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    background:
        #030303;
}

.login-background {
    position: absolute;

    inset: 0;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 50% 30%,
            rgba(255,65,0,.14),
            transparent 30%
        );
}

.moon {
    position: absolute;

    width: min(500px, 70vw);
    height: min(500px, 70vw);

    top: 50%;
    left: 50%;

    transform:
        translate(-50%, -55%);

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 35%,
            #222,
            #090909 55%,
            #020202 70%
        );

    box-shadow:
        0 0 100px rgba(255,70,0,.08);

    animation:
        moonFloat 7s ease-in-out infinite;
}

@keyframes moonFloat {

    0%,
    100% {
        transform:
            translate(-50%, -55%)
            scale(1);
    }

    50% {
        transform:
            translate(-50%, -52%)
            scale(1.03);
    }
}

.cloud {
    position: absolute;

    width: 240px;
    height: 60px;

    border-radius: 50%;

    background:
        rgba(255,255,255,.025);

    filter: blur(8px);

    animation:
        cloudMove 18s linear infinite;
}

.cloud1 {
    top: 20%;
    left: -250px;
}

.cloud2 {
    top: 55%;
    left: -500px;

    animation-delay: 5s;
}

.cloud3 {
    top: 75%;
    left: -350px;

    animation-delay: 10s;
}

@keyframes cloudMove {

    to {
        transform:
            translateX(calc(100vw + 700px));
    }
}

.particle {
    position: absolute;

    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: var(--orange);

    box-shadow:
        0 0 15px var(--orange);

    animation:
        particleFloat 5s ease-in-out infinite;
}

.p1 {
    left: 10%;
    top: 30%;
}

.p2 {
    left: 80%;
    top: 20%;
    animation-delay: 1s;
}

.p3 {
    left: 20%;
    top: 80%;
    animation-delay: 2s;
}

.p4 {
    left: 90%;
    top: 70%;
    animation-delay: 3s;
}

.p5 {
    left: 50%;
    top: 15%;
    animation-delay: 4s;
}

@keyframes particleFloat {

    0%,
    100% {
        transform:
            translateY(0)
            scale(1);
        opacity: .2;
    }

    50% {
        transform:
            translateY(-30px)
            scale(2);
        opacity: 1;
    }
}

.login-card {
    position: relative;

    width: min(420px, calc(100% - 35px));

    padding: 40px;

    border:
        1px solid rgba(255,80,0,.2);

    border-radius: 24px;

    background:
        rgba(7,7,7,.84);

    backdrop-filter:
        blur(25px);

    box-shadow:
        0 30px 100px rgba(0,0,0,.7),
        0 0 60px rgba(255,60,0,.06);

    animation:
        cardEnter .8s ease;
}

@keyframes cardEnter {

    from {
        opacity: 0;
        transform:
            translateY(30px)
            rotateX(8deg);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            rotateX(0);
    }
}

.login-logo {
    width: 70px;
    height: 70px;

    margin: 0 auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 20px;

    transform:
        rotate(-5deg);

    background:
        linear-gradient(
            135deg,
            #ff3900,
            #ff8500
        );

    box-shadow:
        0 15px 40px rgba(255,60,0,.25);
}

.login-logo span {
    font-size: 34px;
    font-weight: 900;

    transform:
        rotate(5deg);
}

.login-brand {
    text-align: center;

    font-size: 29px;
    font-weight: 900;

    letter-spacing: 5px;
}

.login-small {
    margin:
        7px 0 30px;

    text-align: center;

    color: #666;

    font-size: 9px;

    letter-spacing: 4px;
}

.field {
    margin-bottom: 17px;
}

.field label {
    display: block;

    margin-bottom: 7px;

    color: #777;

    font-size: 9px;

    letter-spacing: 2px;
}

.field input {
    width: 100%;

    padding: 15px;

    border:
        1px solid rgba(255,255,255,.08);

    border-radius: 11px;

    outline: none;

    background:
        rgba(255,255,255,.045);

    color: white;

    font-size: 14px;

    transition: .2s;
}

.field input:focus {
    border-color:
        rgba(255,80,0,.7);

    box-shadow:
        0 0 25px rgba(255,60,0,.1);
}

#loginButton {
    width: 100%;

    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-top: 8px;

    padding: 15px 18px;

    border: 0;

    border-radius: 11px;

    background:
        linear-gradient(
            100deg,
            #e73700,
            #ff8500
        );

    color: white;

    font-weight: 900;

    letter-spacing: 1px;

    cursor: pointer;

    transition: .25s;
}

#loginButton:hover {
    transform:
        translateY(-2px);

    box-shadow:
        0 12px 35px rgba(255,70,0,.25);
}

#loginButton:active {
    transform:
        translateY(0)
        scale(.98);
}

#loginButton b {
    font-size: 20px;
}

.login-error {
    min-height: 20px;

    margin-top: 12px;

    text-align: center;

    color: #ff5252;

    font-size: 12px;
}

.login-footer {
    margin-top: 20px;

    text-align: center;

    color: #444;

    font-size: 8px;

    letter-spacing: 2px;
}


/* ========================================
   APP
======================================== */

#app {
    display: none;
}

.app {
    width: 100%;
    height: 100vh;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 55% 45%,
            rgba(255,70,0,.045),
            transparent 35%
        ),
        #060606;
}


/* ========================================
   SERVER RAIL
======================================== */

.server-rail {
    width: 72px;

    flex-shrink: 0;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding-top: 14px;

    gap: 12px;

    background:
        rgba(2,2,2,.9);

    border-right:
        1px solid var(--line);
}

.server-logo {
    width: 47px;
    height: 47px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 15px;

    background:
        #151515;

    color: #777;

    font-weight: 900;

    cursor: pointer;

    transition: .25s;
}

.server-logo:hover,
.server-logo.active {
    border-radius: 13px;

    color: white;

    background:
        linear-gradient(
            135deg,
            #ff3c00,
            #ff8500
        );

    box-shadow:
        0 0 25px rgba(255,70,0,.25);
}

.rail-separator {
    width: 32px;
    height: 1px;

    background:
        rgba(255,255,255,.08);
}


/* ========================================
   CHANNEL PANEL
======================================== */

.channel-panel {
    width: 245px;

    flex-shrink: 0;

    display: flex;
    flex-direction: column;

    background:
        rgba(8,8,8,.95);

    border-right:
        1px solid var(--line);
}

.server-header {
    height: 64px;

    padding:
        0 18px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-bottom:
        1px solid var(--line);

    font-size: 12px;

    font-weight: 900;

    letter-spacing: 1px;
}

.server-header small {
    display: block;

    margin-top: 3px;

    color: #555;

    font-size: 7px;

    letter-spacing: 2px;
}

.server-header > span {
    color: #777;
}

.channel-heading {
    padding:
        20px 15px 8px;

    color: #555;

    font-size: 9px;

    letter-spacing: 2px;
}

.channel {
    margin:
        0 9px;

    padding:
        11px;

    display: flex;

    align-items: center;

    gap: 9px;

    border-radius: 8px;

    color: #777;

    cursor: pointer;
}

.channel.selected {
    color: white;

    background:
        rgba(255,255,255,.07);
}

.channel-hash {
    color: #777;

    font-size: 20px;
}

.channel-lock {
    margin-left: auto;

    font-size: 9px;

    opacity: .5;
}

.channel-info {
    margin:
        25px 12px;

    padding: 12px;

    display: flex;

    align-items: center;

    gap: 10px;

    border:
        1px solid rgba(255,80,0,.12);

    border-radius: 12px;

    background:
        rgba(255,60,0,.035);
}

.mini-orb {
    width: 27px;
    height: 27px;

    flex-shrink: 0;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 30%,
            #ffb000,
            #ff3c00 45%,
            #250800
        );

    box-shadow:
        0 0 15px rgba(255,60,0,.3);
}

.channel-info strong {
    display: block;

    font-size: 9px;
}

.channel-info small {
    color: #555;

    font-size: 8px;
}

.user-panel {
    margin-top: auto;

    padding: 12px;

    display: flex;

    align-items: center;

    gap: 9px;

    background:
        rgba(0,0,0,.35);

    border-top:
        1px solid var(--line);
}

.user-avatar {
    width: 35px;
    height: 35px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #ff3d00,
            #ff9000
        );

    font-weight: 900;
}

.user-details {
    min-width: 0;
    flex: 1;
}

.user-details strong {
    display: block;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 11px;
}

.user-details small {
    color: var(--green);

    font-size: 7px;

    letter-spacing: 1px;
}

#logoutButton {
    border: none;

    background: transparent;

    color: #555;

    font-size: 19px;

    cursor: pointer;
}

#logoutButton:hover {
    color: #ff4d00;
}


/* ========================================
   CHAT
======================================== */

.chat {
    min-width: 0;

    flex: 1;

    display: flex;

    flex-direction: column;
}

.chat-header {
    height: 64px;

    flex-shrink: 0;

    padding:
        0 20px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-bottom:
        1px solid var(--line);

    background:
        rgba(5,5,5,.7);
}

.chat-name {
    display: flex;

    align-items: center;

    gap: 8px;
}

.chat-name span {
    color: #666;

    font-size: 23px;
}

.chat-name strong {
    font-size: 13px;
}

.chat-tools {
    display: flex;

    align-items: center;

    gap: 8px;

    color: #555;

    font-size: 8px;

    letter-spacing: 2px;
}

.green-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 10px rgba(69,232,117,.7);
}


/* ========================================
   WELCOME
======================================== */

.welcome {
    margin:
        auto auto 0;

    width: min(800px, 90%);

    padding-bottom: 20px;
}

.welcome-icon {
    width: 50px;
    height: 50px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            #ff4200,
            #ff8c00
        );

    box-shadow:
        0 0 30px rgba(255,70,0,.2);

    font-size: 25px;

    font-weight: 900;
}

.welcome h1 {
    margin-top: 14px;

    font-size: 25px;
}

.welcome p {
    margin-top: 6px;

    color: #666;

    font-size: 12px;
}


/* ========================================
   MESSAGES
======================================== */

.messages {
    width: min(900px, 100%);

    flex: 1;

    overflow-y: auto;

    margin:
        0 auto;

    padding:
        15px 20px 5px;
}

.messages:empty {
    flex: 0;
}

.message {
    display: flex;

    gap: 11px;

    margin-bottom: 18px;

    animation:
        messageIn .25s ease;
}

@keyframes messageIn {

    from {
        opacity: 0;
        transform:
            translateY(8px);
    }

    to {
        opacity: 1;
        transform:
            translateY(0);
    }
}

.message-avatar {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #222,
            #333
        );

    font-size: 13px;

    font-weight: 900;
}

.message-avatar.admin {
    background:
        linear-gradient(
            135deg,
            #ff4200,
            #ff9000
        );
}

.message-body {
    min-width: 0;
}

.message-meta {
    display: flex;

    align-items: center;

    gap: 8px;
}

.message-name {
    font-size: 12px;

    font-weight: 900;
}

.message-time {
    color: #555;

    font-size: 9px;
}

.admin-tag {
    padding:
        2px 5px;

    border-radius: 4px;

    background:
        rgba(255,70,0,.2);

    color: #ff743d;

    font-size: 7px;

    letter-spacing: 1px;
}

.message-text {
    margin-top: 4px;

    color: #c8c8c8;

    font-size: 13px;

    line-height: 1.5;

    white-space: pre-wrap;

    word-break: break-word;
}

.delete-message {
    margin-left: 8px;

    border: 0;

    background: transparent;

    color: #444;

    cursor: pointer;
}

.delete-message:hover {
    color: #ff4d00;
}


/* ========================================
   COMPOSER
======================================== */

.composer-wrapper {
    width: min(900px, 100%);

    margin:
        0 auto;

    padding:
        10px 20px 15px;
}

.composer {
    min-height: 52px;

    display: flex;

    align-items: center;

    gap: 7px;

    padding:
        7px 8px;

    border:
        1px solid rgba(255,255,255,.08);

    border-radius: 13px;

    background:
        rgba(255,255,255,.045);

    box-shadow:
        0 10px 40px rgba(0,0,0,.25);
}

.composer button {
    flex-shrink: 0;
}

.add-button,
.composer-button {
    width: 34px;
    height: 34px;

    border: none;

    border-radius: 9px;

    background:
        rgba(255,255,255,.06);

    color: #888;

    cursor: pointer;

    transition: .2s;
}

.add-button:hover,
.composer-button:hover {
    color: white;

    background:
        rgba(255,255,255,.12);
}

#messageInput {
    flex: 1;

    min-width: 0;

    resize: none;

    max-height: 130px;

    border: none;

    outline: none;

    background: transparent;

    color: white;

    font-family: inherit;

    font-size: 13px;

    line-height: 1.5;
}

#messageInput::placeholder {
    color: #555;
}

.youtube-button {
    color: #ff4933;
}

.send-button {
    width: 36px;
    height: 36px;

    border: none;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #ff4000,
            #ff8000
        );

    color: white;

    font-size: 19px;

    font-weight: 900;

    cursor: pointer;

    transition: .2s;
}

.send-button:hover {
    transform:
        scale(1.05);

    box-shadow:
        0 0 20px rgba(255,70,0,.3);
}

.composer-tip {
    padding-top: 5px;

    color: #444;

    font-size: 8px;

    text-align: right;
}


/* ========================================
   MEMBERS
======================================== */

.members {
    width: 205px;

    flex-shrink: 0;

    padding: 20px 12px;

    background:
        rgba(7,7,7,.75);

    border-left:
        1px solid var(--line);
}

.members-title {
    margin-bottom: 17px;

    color: #555;

    font-size: 9px;

    letter-spacing: 2px;
}

.member {
    position: relative;

    display: flex;

    align-items: center;

    gap: 9px;

    margin-bottom: 13px;

    color: #aaa;
}

.member-pic {
    width: 32px;
    height: 32px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #202020;

    color: #999;

    font-size: 11px;

    font-weight: 900;
}

.member-pic.orange {
    background:
        linear-gradient(
            135deg,
            #ff4300,
            #ff9000
        );

    color: white;
}

.member strong {
    display: block;

    font-size: 11px;
}

.member small {
    color: #ff6c35;

    font-size: 7px;

    letter-spacing: 1px;
}

.status {
    width: 7px;
    height: 7px;

    margin-left: auto;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 9px rgba(69,232,117,.6);
}


/* ========================================
   YOUTUBE
======================================== */

.modal {
    position: fixed;

    inset: 0;

    z-index: 500;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;

    inset: 0;

    background:
        rgba(0,0,0,.78);

    backdrop-filter:
        blur(10px);
}

.youtube-modal {
    position: relative;

    width: min(470px, 100%);

    padding: 28px;

    border:
        1px solid rgba(255,80,0,.2);

    border-radius: 20px;

    background:
        #0b0b0b;

    box-shadow:
        0 30px 100px rgba(0,0,0,.7);

    animation:
        modalIn .25s ease;
}

@keyframes modalIn {

    from {
        opacity: 0;
        transform:
            scale(.94)
            translateY(15px);
    }

    to {
        opacity: 1;
        transform:
            scale(1)
            translateY(0);
    }
}

.modal-close {
    position: absolute;

    right: 14px;
    top: 10px;

    border: none;

    background: transparent;

    color: #555;

    font-size: 28px;

    cursor: pointer;
}

.modal-close:hover {
    color: white;
}

.modal-icon {
    width: 48px;
    height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background:
        #ff4030;

    box-shadow:
        0 10px 30px rgba(255,50,40,.2);

    font-size: 20px;
}

.youtube-modal h2 {
    margin-top: 17px;

    font-size: 20px;
}

.youtube-modal p {
    margin-top: 5px;

    color: #666;

    font-size: 11px;
}

#youtubeInput {
    width: 100%;

    margin-top: 18px;

    padding: 13px;

    border:
        1px solid rgba(255,255,255,.09);

    border-radius: 9px;

    outline: none;

    background:
        rgba(255,255,255,.04);

    color: white;
}

.preview-button,
.share-button {
    width: 100%;

    margin-top: 10px;

    padding: 13px;

    border: none;

    border-radius: 9px;

    font-weight: 900;

    letter-spacing: 1px;

    cursor: pointer;
}

.preview-button {
    background:
        rgba(255,255,255,.08);

    color: white;
}

.share-button {
    background:
        linear-gradient(
            90deg,
            #e83d00,
            #ff8000
        );

    color: white;
}

.share-button:disabled {
    opacity: .35;

    cursor: not-allowed;
}

.youtube-preview {
    margin-top: 15px;

    overflow: hidden;

    border:
        1px solid rgba(255,255,255,.08);

    border-radius: 11px;

    background:
        #111;
}

.youtube-preview.hidden {
    display: none;
}

.youtube-preview img {
    display: block;

    width: 100%;

    aspect-ratio: 16 / 9;

    object-fit: cover;
}

.preview-info {
    padding: 11px;
}

.preview-info strong {
    display: block;

    font-size: 12px;
}

.preview-info span {
    display: block;

    margin-top: 4px;

    color: #666;

    font-size: 9px;
}


/* ========================================
   SCROLLBAR
======================================== */

::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #252525;

    border-radius: 20px;
}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 1000px) {

    .members {
        display: none;
    }
}

@media (max-width: 700px) {

    .server-rail {
        width: 58px;
    }

    .server-logo {
        width: 40px;
        height: 40px;
    }

    .channel-panel {
        width: 205px;
    }
}

@media (max-width: 560px) {

    .channel-panel {
        display: none;
    }

    .server-rail {
        width: 55px;
    }

    .chat-header {
        height: 55px;
    }

    .composer-wrapper {
        padding:
            7px 8px 10px;
    }

    .composer-tip {
        display: none;
    }

    .welcome {
        padding-left: 15px;
    }

    .messages {
        padding:
            10px 10px 5px;
    }

    .login-card {
        padding: 30px 22px;
    }
}
