:root {
    --sidebar-width: 250px;
    --page-bg: rgb(9, 9, 11);
    --surface-bg: rgb(17, 17, 20);
    --surface-bg-strong: rgb(13, 13, 15);
    --surface-border: rgb(25, 25, 25);
    --text-primary: rgb(230, 230, 230);
    --text-secondary: rgb(200, 200, 200);
    --text-muted: rgb(120, 126, 160);
    --accent-gradient: linear-gradient(45deg, rgb(39, 9, 209), rgb(228, 16, 199));
    --accent-cool-gradient: linear-gradient(135deg, #006466 24%, #186785 50%, #186785 79%, #316aa4 100%);
    --accent-success-gradient: linear-gradient(135deg, #2b692e, #1fc428);
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-soft: 0 24px 40px rgba(0, 0, 0, 0.2);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-primary);
    background-color: var(--page-bg);
    background-image: url('bg.png');
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: var(--sidebar-width);
    min-height: 100vh;
    padding: 20px 16px;
    background-color: rgb(9, 9, 11);
    border-right: 0.5px solid var(--surface-border);
}

.sidebar img {
    width: auto;
    height: auto;
    margin: 0;
    border-radius: 0;
}

.logo {
    margin-left: 5%;
    padding: 4px 8px 8px;
}

.logo img {
    display: block;
    width: 184px;
    max-width: 100%;
    height: auto;
    margin: 0;
    border-radius: 0;
}

.sidebar hr {
    width: 100%;
    height: 1px;
    margin: 0 0 2px;
    border: none;
    background-color: var(--surface-border);
}

.sidebar a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 14px 16px;
    margin: 0;
    border-radius: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 20px;
    line-height: 1;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    z-index: 0;
    overflow: hidden;
}

.sidebar a img {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    display: block;
    margin: 0;
}

.sidebar a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.035);
}

.sidebar a.active {
    color: white;
    padding: 14px 16px;
    border-radius: 14px;
    background-color: transparent;
}

.sidebar a.active::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: inherit;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
        rgba(13, 13, 15, 0.96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    z-index: -2;
}

.sidebar a.active::after {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;
    right: auto;
    width: 3px;
    border-radius: 999px;
    background: var(--accent-gradient);
    z-index: -1;
}

.content {
    margin-left: var(--sidebar-width);
    padding: 24px;
}

#users-page .box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

#keys-page > .box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

#users-page .box {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    padding: 20px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    background-color: rgba(17, 17, 20, 0.95);
    box-shadow: var(--shadow-soft);
}

#keys-page > .box-container .box {
    width: 100%;
    max-width: 620px;
    min-height: 132px;
    margin-right: 0;
    overflow: hidden;
    justify-self: start;
    box-shadow: var(--shadow-soft);
}

#users-page .box-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

#users-page .box-header img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
}

#users-page .box-header h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
}

#users-page .box-content p {
    margin: 0;
    color: var(--text-secondary);
}

.glow-effect {
    position: absolute;
    width: 220px;
    height: 220px;
    pointer-events: none;
    opacity: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04), transparent 55%);
}

.box:hover .glow-effect,
.script-box:hover .glow-effect,
.panel:hover .glow-effect {
    opacity: 1;
}

.stack-list {
    display: grid;
    gap: 14px;
}

.panel {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    background-color: rgba(17, 17, 20, 0.95);
    box-shadow: var(--shadow-soft);
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 600;
}

.panel-header p {
    margin: 6px 0 0;
    color: var(--text-muted);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.control {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.control span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.control select {
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background-color: rgba(9, 9, 11, 0.95);
    color: white;
    font-size: 0.95rem;
    outline: none;
}

.control select:focus {
    border-color: rgba(255, 255, 255, 0.25);
}

.empty-state {
    padding: 28px 24px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-align: center;
    background-color: rgba(9, 9, 11, 0.7);
}

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

@media (max-width: 980px) {
    .sidebar {
        position: static;
        width: 100%;
        min-height: 0;
    }

    .content {
        margin-left: 0;
        padding: 20px 16px 28px;
    }

    .panel-header {
        flex-direction: column;
    }

    .control {
        min-width: 0;
        width: 100%;
    }
}
