/* ---------- ROOT NEON VARIABLES ---------- */
:root {
    --neon-pink: #ff00cc;
    --neon-purple: #8a2be2;
    --deep-bg: #0f001a;
    --panel-bg: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(0, 0, 0, 0.4);
}

/* ---------- Global ---------- */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at top left, #2a003f, #0f001a);
    color: #fff;
}

a {
    color: var(--neon-pink);
    text-decoration: none;
}
a:hover {
    text-shadow: 0 0 8px var(--neon-pink);
}

/* ---------- Buttons ---------- */
button {
    cursor: pointer;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 0, 200, 0.6);
}

button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 20px var(--neon-pink),
        0 0 35px var(--neon-purple);
}

/* ---------- Login / Signup ---------- */
.center-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.center-page form {
    display: flex;
    flex-direction: column;
    width: 340px;
    background: var(--panel-bg);
    padding: 25px;
    border-radius: 16px;
    backdrop-filter: blur(12px);
    box-shadow:
        0 0 25px rgba(255, 0, 200, 0.4),
        0 0 40px rgba(138, 43, 226, 0.3);
}

.center-page input {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 0, 200, 0.3);
    background: var(--glass-bg);
    color: #fff;
}

.center-page input:focus {
    outline: none;
    box-shadow:
        0 0 12px var(--neon-pink),
        0 0 20px var(--neon-purple);
}

/* ---------- Topbar ---------- */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;           /* vertical bar width */
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* top orbs & bottom user panel */
    align-items: center;
    padding: 15px 0;
    background: linear-gradient(180deg, #14001f, #0f001a);
    border-right: 1px solid rgba(255, 0, 200, 0.3);
    box-shadow:
        0 0 25px rgba(255, 0, 200, 0.4),
        0 0 40px rgba(138, 43, 226, 0.3);
    z-index: 2000;
}

.topbar-right button {
    width: 50px;
    height: 50px;
    border-radius: 50%; /* perfect circle */
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    box-shadow:
        0 0 15px var(--neon-pink),
        0 0 25px var(--neon-purple);
    transition: 0.3s ease;
}

.topbar-right button:hover {
    transform: scale(1.1);
    box-shadow:
        0 0 20px var(--neon-pink),
        0 0 35px var(--neon-purple);
}

.topbar-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    margin-top: 10px;       /* spacing from top */
    padding-bottom: 40px;  /* extra space so buttons aren’t cut off */
}

/* Container */
.server-orbs {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 10px; /* nudge all orbs slightly right */
}

/* Wrapper for each orb */
.server-orb-wrapper {
    display: flex;
    justify-content: center;
    position: relative;
    margin-bottom: 18px;  /* spacing between orbs, prevents overlap */
}

/* Optional: extra spacing after home orb */
.server-orb-wrapper:first-child {
    margin-bottom: 25px;  /* larger gap after home orb */
}

/* Individual orb */
.server-orb {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 15px var(--neon-pink);
    background-color: var(--orb-bg, #222);
}

/* Hover effect */
.server-orb:hover {
    transform: scale(1.15);
    box-shadow:
        0 0 20px var(--neon-pink),
        0 0 35px var(--neon-purple);
}

/* Active indicator */
.server-orb.active::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 30px;
    background: var(--neon-pink);
    border-radius: 10px;
    box-shadow: 0 0 10px var(--neon-pink);
}

/* Empty orb placeholder */
.server-orb:empty::after {
    content: " ";
    display: block;
    width: 1px;
    height: 1px;
}




.server-content {
    display: flex;
    gap: 20px;           /* space between chat-section and chat-selection */
    align-items: flex-start;
    width: 100%;
    min-height: 0;       /* prevent flex shrink bugs */
}


/* ---------- Container ---------- */
.container {
    margin-left: 100px; /* leave space for sidebar */
    margin-top: 0px;
    padding: 20px;
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: 250px;
    background: var(--panel-bg);
    padding: 15px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 25px rgba(138, 43, 226, 0.3);
}

.sidebar .member:hover {
    background: rgba(255, 0, 200, 0.15);
    box-shadow: 0 0 12px var(--neon-pink);
}

/* ---------- Chat Section ---------- */
.chat-section {
    flex: 1;             /* fill remaining horizontal space */
    display: flex;
    flex-direction: column;
    min-width: 0;        /* critical: allows flex child to shrink correctly */
}

.chat-box {
    flex: 1;             /* take full vertical space */
    width: 100%;         /* fill horizontal space inside chat-section */
    min-height: 400px;   /* optional minimum height */
    overflow-y: auto;
}



.chat-message {
    display: block;           /* take full width */
    width: 100%;              /* fill chat-box */
    box-sizing: border-box;   /* include padding in width */
    padding: 10px 14px;
    margin-bottom: 10px;
    border-radius: 16px;
    word-wrap: break-word;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 0, 200, 0.3);
    box-shadow: 0 0 10px rgba(255, 0, 200, 0.2);
    transition: 0.3s ease;
}

.chat-message:hover {
    box-shadow:
        0 0 15px var(--neon-pink),
        0 0 25px var(--neon-purple);
}

.chat-attachment img {
    margin-top: 4px;
    border-radius: 6px;
    display: block;
}

.chat-file-link {
    display: inline-block;
    margin-top: 4px;
    padding: 4px 6px;
    background: #2c2f33;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}


/* ---------- Inputs ---------- */

.chat-input {
    width: 100%;             /* fill the full width of chat-section */
    box-sizing: border-box;  /* includes padding and border in width */
    background: var(--glass-bg);
    border: 1px solid rgba(255, 0, 200, 0.3);
    border-radius: 8px;
    color: #fff;
    padding: 10px;
    font-size: 16px;
    flex-shrink: 0;          /* prevents input from shrinking in flex layout */
}

.chat-input:focus {
    outline: none;
    box-shadow:
        0 0 12px var(--neon-pink),
        0 0 20px var(--neon-purple);
}


/* ---------- PM Window ---------- */
.pm-window {
    position: fixed;              /* so it’s relative to viewport */
    bottom: 20px;                 /* distance from bottom of screen */
    left: 50%;                    /* center horizontally */
    transform: translateX(-50%);  /* adjust for horizontal center */
    
    width: 520px !important;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    border-radius: 16px;
    box-shadow:
        0 0 25px rgba(255, 0, 200, 0.7),
        0 0 50px rgba(138, 43, 226, 0.6),
        0 15px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
    z-index: 3000;               /* above other elements */
}


.pm-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    font-weight: bold;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(8px);
    text-shadow: 0 0 8px var(--neon-pink);
}

.pm-close:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

.pm-input {
    border: none;
    padding: 10px;
    border-radius: 0 0 16px 16px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
}

.pm-input:focus {
    outline: none;
    box-shadow: 0 0 12px var(--neon-pink);
}

/* ---------- Scrollbar ---------- */
.chat-box::-webkit-scrollbar {
    width: 8px;
}

.chat-box::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--neon-pink), var(--neon-purple));
    border-radius: 10px;
}

.chat-box::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--neon-purple), var(--neon-pink));
}


.user-panel.full-left {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 15px;
    box-shadow:
        0 0 20px rgba(255, 0, 200, 0.4),
        0 0 35px rgba(138, 43, 226, 0.3);
    z-index: 1500;
}

#image-modal {
    display: none;
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    z-index: 3000;
    transition: opacity 0.3s ease;
}

#image-modal img {
    border-radius: 6px;
    box-shadow: 0 0 20px var(--neon-pink);
}


@media (max-width: 768px) {
    .server-content {
        flex-direction: column;
    }

    .chat-section, .chat-selection {
        width: 100%;
    }

    .chat-box {
        max-height: none;
    }

    .chat-message {
        max-width: 100%;
    }
}
