/* Full galaxy background */
body {
    margin: 0;
    padding: 0;
    height: 100vh;
    font-family: 'Poppins', sans-serif;
    background: url("/static/images/novalightbackgorundweb.png") no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Dark overlay for readability */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 20, 0.55);
    backdrop-filter: blur(3px);
}

/* Center container */
.wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* The login box */
.login-card {
    background: rgba(255,255,255,0.08);
    padding: 40px 55px;
    border-radius: 14px;
    text-align: center;
    backdrop-filter: blur(15px);
    box-shadow: 0 0 30px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.15);
}

/* Logo */
.login-card .logo {
    width: 150px;
    margin-bottom: 18px;
    filter: drop-shadow(0px 0px 8px rgba(255,255,255,0.4));
}

/* Login button */
.discord-btn {
    display: inline-block;
    padding: 14px 28px;
    margin-top: 20px;
    font-size: 17px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f47c6, #8a4ddc, #d246ff);
    background-size: 200%;
    transition: 0.35s ease;
    box-shadow: 0px 0px 15px rgba(140, 50, 255, 0.55);
}

.discord-btn:hover {
    background-position: right;
    transform: scale(1.05);
    box-shadow: 0px 0px 20px rgba(200, 100, 255, 0.75);
}

/* Login text */
.login-card h2 {
    margin-bottom: 20px;
    color: white;
    font-weight: 500;
}

/* Floating role badge */
.role-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 8px 15px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.25);
}

/* UNAUTHORIZED PAGE */
.unauth-wrapper {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.unauth-card {
    background: rgba(0, 0, 0, 0.65);
    padding: 40px;
    width: 350px;
    border-radius: 20px;
    text-align: center;
    color: white;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.4);
    animation: fadeIn 0.5s ease-in-out;
}

.unauth-card h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.unauth-card p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 20px;
}

/* Unauthorized buttons */
.unauth-card .logout-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #4f47c6, #8a4ddc, #d246ff);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    transition: 0.2s;
}

.unauth-card .logout-btn:hover {
    transform: scale(1.05);
    box-shadow: 0px 0px 20px rgba(200, 100, 255, 0.75);
}

/* fade animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

.button-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
}

.button-column .logout-btn {
    width: 60%;
    max-width: 250px;
    text-align: center;
    padding: 10px 0;
    font-size: 15px;
}

/* ========================================================= */
/*                  NEW SLIDE-IN / SLIDE-OUT SIDEBAR        */
/* ========================================================= */

/* Toggle button */
.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.4);
    padding: 10px 14px;
    border-radius: 8px;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 3000;
    transition: 0.3s;
}
.sidebar-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0px 0px 20px rgba(200, 100, 255, 0.75);
}

/* --- Sidebar Overlay --- */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px; /* hidden */
    width: 270px;
    height: 100%;
    background: rgba(25, 0, 50, 0.85);
    backdrop-filter: blur(12px);
    padding: 30px 20px;
    box-shadow: 4px 0 15px rgba(0,0,0,0.3);
    transition: left 0.35s ease;
    z-index: 2500;
    color: #fff;
    overflow-y: auto;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(140, 0, 255, 0.4);
    border-radius: 6px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(160, 50, 255, 0.7);
}

/* Base sidebar link style */
.sidebar a {
    background: #a26bff;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    margin: 8px 0;
    display: block;
    text-align: center;
    transition: 0.2s;
}
.sidebar a:hover {
    background: #c098ff;
}



/* Sidebar opens ON TOP (overlay) */
.sidebar.open {
    left: 0;
}

/* --- Content stays EXACTLY where it is (no movement) --- */
.page-content {
    position: relative;
    z-index: 1;
    padding: 40px;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Sidebar user section */
.sidebar-user {
    text-align: center;
}
.sidebar-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #fff;
    margin-bottom: 10px;
}
.sidebar-role {
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
}

/* Divider line */
.sidebar-divider {
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.15);
    margin: 20px 0;
}

/* Sidebar links */
.sidebar a {
    display: block;
    padding: 12px;
    margin: 8px 0;
    background: #8b3dfd;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    transition: 0.2s;
}

.sidebar a:hover {
    transform: scale(1.05);
    box-shadow: 0px 0px 20px rgba(200, 100, 255, 0.75);
}

/* Floating Role Badge (dashboard) */
.role-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    box-shadow: 0 0 12px rgba(0,0,0,0.3);
}


/* Page content moves right when sidebar opens */
.page-content {
    margin-left: 0;
    padding: 40px;
    width: 100%;
    transition: margin-left 0.35s ease;
    display: flex;
    justify-content: center;
}



/* ðŸŒŒ Galaxy Theme Database Table */

.db-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.db-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.limit-form select {
    padding: 4px 8px;
    background: #1a002f;
    color: white;
    border: 1px solid #8b3eff;
    border-radius: 6px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-btn {
    padding: 6px 12px;
    background: #3b0077;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    transition: 0.2s;
}

.page-btn:hover {
    background: #6a09c8;
}

.page-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.page-info {
    color: #e3c4ff;
    font-size: 14px;
}


/* Dropdown menu inside sidebar */
/* Dropdown container */
.dropdown {
    width: 100%;
}

/* Main dropdown button (matches sidebar buttons) */
.dropdown-btn {
    all: unset;                 /* THIS removes all browser styling */
    display: flex;
    width: 100%;
    padding: 12px 20px;
    background: #a26bff;
    color: white;
    border-radius: 6px;
    margin: 8px 0;
    font-size: 16px;
    cursor: pointer;
    box-sizing: border-box;
    justify-content: space-between; 
    align-items: center;
    text-align: center;
    justify-content: center;
}


.dropdown-btn:hover {
    background-position: right;
    transform: scale(1.05);
    box-shadow: 0px 0px 20px rgba(200, 100, 255, 0.75);         /* same hover as sidebar */
}

/* Make arrow aligned properly */
.dropdown-btn .arrow {
    margin-left: auto;            /* push arrow to the right */
    transition: transform 0.25s ease;
    
}

/* CONTENT AREA â€” NOW SCROLLABLE */
.dropdown-content {
    width: 90%;
    max-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    list-style: none;
    margin: 0;
    padding-left: 25px;  /* <-- push items to the right */
}

/* When open */
.dropdown.open .dropdown-content {
    max-height: 250px; /* <-- adjust this number to change dropdown height */
    opacity: 1;
}

/* Dropdown link buttons */
.dropdown-content li a {
    display: block;
    padding: 12px 20px;
    color: #e3c6ff;
    font-size: 16px;
    text-decoration: none;
    transition: 0.25s;
}

/* Hover matches sidebar */
.dropdown-content li a:hover {
    background-position: right;
    transform: scale(1.05);
    box-shadow: 0px 0px 20px rgba(200, 100, 255, 0.75);
}

/* Scrollbar styling */
.dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background: rgba(140, 0, 255, 0.5);
    border-radius: 6px;
}

.dropdown-content::-webkit-scrollbar-thumb:hover {
    background: rgba(160, 60, 255, 0.8);
}




/* Make header cells sticky */
.db-cell.header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(130, 0, 255, 0.45); /* stronger background */
    backdrop-filter: blur(4px);
    border-bottom: 2px solid rgba(200, 150, 255, 0.6);
}

.db-scroll-box {
    margin-top: 15px;
    overflow-y: auto;    /* vertical scroll */
    overflow-x: hidden;  /* NO horizontal scroll */
    flex-grow: 1;
    padding-right: 5px;
}