/* =========================================================
   botweb.css — GamePuls BotWeb
   Mobile-first overhaul: Hamburger, Sidebar-Overlay, Touch-UX
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');


/* # Reset & Base
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    background: #080b14;
    color: #dde3f5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}


/* # CSS Variables
   ========================================================= */

:root {
    --bg-base:        #080b14;
    --bg-surface:     #0d1120;
    --bg-card:        #101527;
    --bg-card-hover:  #131828;
    --bg-input:       #0a0e1a;

    --border:         #1c2238;
    --border-light:   #232b45;

    --accent:         #6c8aff;
    --accent-glow:    rgba(108, 138, 255, 0.18);
    --accent-hover:   #839bff;
    --violet:         #a78bfa;

    --green:          #34d399;
    --green-bg:       rgba(52, 211, 153, 0.12);
    --red:            #f87171;
    --red-bg:         rgba(248, 113, 113, 0.12);
    --yellow:         #fbbf24;
    --yellow-bg:      rgba(251, 191, 36, 0.12);

    --text-primary:   #dde3f5;
    --text-muted:     #5a6585;
    --text-subtle:    #8892b0;

    --radius-sm:      8px;
    --radius-md:      12px;
    --radius-lg:      16px;
    --radius-xl:      20px;

    --shadow-card:    0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow:    0 0 0 1px var(--accent-glow);

    --transition:     0.18s ease;

    --topbar-height:  60px;
    --sidebar-width:  248px;
}


/* # Typography
   ========================================================= */

h1, h2, h3, h4 {
    font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: #edf0ff;
    padding-bottom: 2px;
    overflow: visible;
}

h1 { font-size: 28px; }
h2 { font-size: 20px; margin-bottom: 16px; }
h3 { font-size: 17px; margin-bottom: 10px; }
h4 { font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-subtle); margin-bottom: 12px; }

p { margin-bottom: 12px; }
p:last-child { margin-bottom: 0; }

code,
pre,
.mono {
    font-family: "JetBrains Mono", "Consolas", monospace;
    font-size: 13px;
    background: rgba(108, 138, 255, 0.1);
    padding: 2px 6px;
    border-radius: 5px;
    color: var(--accent);
}

.page-header h1,
.gp-card h2,
.gp-card h3,
.gp-server h3 {
    font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
    letter-spacing: -0.02em;
}

.gp-endpoint-code,
.gp-page-meta,
.page-header-meta {
    font-family: "JetBrains Mono", "Consolas", monospace;
}

label,
.gp-label,
.gp-stat-label,
.gp-endpoint-name {
    font-family: "Inter", system-ui, sans-serif;
    letter-spacing: 0;
    text-transform: none;
}

button,
.btn,
.gp-add-btn,
.gp-actions button,
.gp-link-actions a {
    font-family: "Inter", system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: 0;
}


/* # Links
   ========================================================= */

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-subtle);
    margin-bottom: 22px;
    transition: color var(--transition), gap var(--transition);
}

.back-link::before {
    content: '←';
    font-size: 16px;
}

.back-link:hover {
    color: var(--accent);
    gap: 10px;
    text-decoration: none;
}


/* # Topbar
   ========================================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--topbar-height);
    min-height: var(--topbar-height);
    display: block;
    background: rgba(8, 11, 20, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.topbar-left {
    overflow: visible;
}

.topbar-right {
    justify-content: flex-end;
    flex-shrink: 0;
}

.topbar-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    white-space: nowrap;
    overflow: visible;
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
}

.topbar-logo:hover {
    color: #fff;
    text-decoration: none;
}

.topbar-logo img {
    display: block !important;
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px;
    object-fit: contain;
    border-radius: 0 !important;
}

.topbar-logo span {
    display: inline-block;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
}

.topbar-link {
    color: var(--text-subtle);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: color var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.topbar-link:hover,
.topbar-link.active {
    color: #fff;
    text-decoration: none;
}

.topbar-btn {
    padding: 8px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff2a3f, #ff7a00);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 18px rgba(255, 70, 30, 0.28);
    transition: filter var(--transition), transform var(--transition);
    flex-shrink: 0;
}

.topbar-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}


/* # Hamburger Button
   ========================================================= */

.topbar-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 10px;
    flex-shrink: 0;
    /* Override global button styles */
    transition: background var(--transition), border-color var(--transition) !important;
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
    color: var(--text-subtle);
}

.topbar-hamburger:hover {
    background: rgba(108, 138, 255, 0.1) !important;
    border-color: var(--accent) !important;
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}

.topbar-hamburger:active {
    transform: none !important;
    filter: none !important;
}

.topbar-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-subtle);
    border-radius: 2px;
    transition: all 0.26s cubic-bezier(0.23, 1, 0.32, 1);
    transform-origin: center;
    pointer-events: none;
}

.topbar-hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--accent);
}

.topbar-hamburger.is-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.topbar-hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--accent);
}


/* # Sidebar Overlay (mobile)
   ========================================================= */

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 150;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    cursor: pointer;
}

.sidebar-overlay.is-active {
    display: block;
    animation: overlayFadeIn 0.22s ease;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* # Mobile Nav Dropdown (public pages)
   ========================================================= */

.mobile-nav-dropdown {
    display: none;
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    z-index: 130;
    background: rgba(8, 11, 20, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    max-height: calc(100vh - var(--topbar-height));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav-dropdown.is-open {
    display: block;
    animation: mobileNavSlideDown 0.24s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes mobileNavSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-nav-dropdown a {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    color: var(--text-subtle);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    border: 1px solid transparent;
    margin-bottom: 4px;
    min-height: 48px;
}

.mobile-nav-dropdown a:hover,
.mobile-nav-dropdown a.active {
    background: var(--accent-glow);
    color: var(--accent);
    border-color: rgba(108, 138, 255, 0.22);
    text-decoration: none;
}

.mobile-nav-divider {
    height: 1px;
    background: var(--border);
    margin: 10px 0;
}

.mobile-nav-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
    padding: 13px 16px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #ff2a3f, #ff7a00);
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    text-decoration: none;
    border: none !important;
    box-shadow: 0 6px 24px rgba(255, 70, 30, 0.3);
    min-height: 50px;
}

.mobile-nav-cta:hover {
    filter: brightness(1.08);
    text-decoration: none;
    color: #fff !important;
}


/* # Layout
   ========================================================= */

.layout {
    display: flex;
    min-height: calc(100vh - var(--topbar-height));
}

.main {
    flex: 1;
    padding: 36px 40px;
    width: 100%;
    max-width: none;
    overflow-x: hidden;
    min-width: 0;
}


/* # Sidebar
   ========================================================= */

.sidebar {
    width: var(--sidebar-width);
    min-height: 100%;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--topbar-height);
    height: calc(100vh - var(--topbar-height));
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent) 0%, var(--violet) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(108, 138, 255, 0.35);
}

.brand-logo img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 0;
}

.brand-text strong {
    display: block;
    font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #edf0ff;
}

.brand-text span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.03em;
}


/* # Navigation
   ========================================================= */

nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px 12px 4px;
    margin-top: 8px;
}

nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-subtle);
    font-weight: 500;
    font-size: 14px;
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
    min-height: 42px;
}

nav a:hover {
    background: rgba(108, 138, 255, 0.1);
    color: #c4ccee;
    text-decoration: none;
}

nav a.active {
    background: var(--accent-glow);
    color: var(--accent);
    font-weight: 600;
}

nav .nav-logout {
    color: var(--red);
    opacity: 0.8;
}

nav .nav-logout:hover {
    background: var(--red-bg);
    color: var(--red);
    opacity: 1;
}


/* # Page Header
   ========================================================= */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 28px;
    background: linear-gradient(135deg, #edf0ff 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header-meta {
    font-size: 13px;
    color: var(--text-muted);
    font-family: "JetBrains Mono", "Consolas", monospace;
    margin-top: 4px;
    word-break: break-all;
}


/* # Grid
   ========================================================= */

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}


/* # Cards
   ========================================================= */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
    transition: border-color var(--transition), box-shadow var(--transition);
    position: relative;
}

.card:last-child {
    margin-bottom: 0;
}

.card:hover {
    border-color: var(--border-light);
}

.server-card {
    border-left: 3px solid var(--accent);
    background: linear-gradient(135deg, rgba(108, 138, 255, 0.04) 0%, transparent 60%),
                var(--bg-card);
}

.server-card:hover {
    box-shadow: var(--shadow-card), 0 0 0 1px var(--accent-glow);
}

.card-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}


/* # Badges
   ========================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-green {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.badge-green::before { background: var(--green); }

.badge-red {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.badge-red::before { background: var(--red); }

.badge-yellow {
    background: var(--yellow-bg);
    color: var(--yellow);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.badge-yellow::before { background: var(--yellow); }

.badge-accent {
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid rgba(108, 138, 255, 0.25);
}

.badge-accent::before { background: var(--accent); }


/* # Notices
   ========================================================= */

.notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    line-height: 1.5;
}

.notice-success {
    background: var(--green-bg);
    color: var(--green);
    border-color: rgba(52, 211, 153, 0.2);
}

.notice-error {
    background: var(--red-bg);
    color: var(--red);
    border-color: rgba(248, 113, 113, 0.2);
}

.notice-warning {
    background: var(--yellow-bg);
    color: var(--yellow);
    border-color: rgba(251, 191, 36, 0.2);
}


/* # Forms & Inputs
   ========================================================= */

.form-row {
    margin-bottom: 16px;
}

.form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-subtle);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
input[type="date"],
input[type="time"],
input[type="color"],
select,
textarea {
    width: 100%;
    max-width: 560px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    /* Touch friendly */
    min-height: 44px;
    -webkit-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="datetime-local"]:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

input[type="color"] {
    min-height: 44px;
    cursor: pointer;
}

/* Color scheme for datetime */
input[type="datetime-local"],
input[type="date"],
input[type="time"] {
    color-scheme: dark;
}

select[multiple] {
    min-height: 130px;
    padding: 8px;
}

select[multiple] option {
    padding: 6px 8px;
    border-radius: 6px;
}

select[multiple] option:checked {
    background: var(--accent-glow);
    color: var(--accent);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: background var(--transition), border-color var(--transition);
    min-height: 44px;
}

.radio-group label:hover {
    background: rgba(108, 138, 255, 0.06);
    border-color: var(--border-light);
}

.radio-group input[type="radio"],
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    flex-shrink: 0;
    cursor: pointer;
}


/* # Buttons
   ========================================================= */

button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: filter var(--transition), transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    white-space: nowrap;
    /* Touch friendly */
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

button {
    background: var(--accent);
    color: #fff;
}

button:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108, 138, 255, 0.35);
}

button:active {
    transform: translateY(0);
    filter: brightness(0.96);
}

button.danger {
    background: transparent;
    color: var(--red);
    border-color: rgba(248, 113, 113, 0.35);
}

button.danger:hover {
    background: var(--red-bg);
    box-shadow: none;
    transform: none;
    filter: none;
}

button.secondary {
    background: transparent;
    color: var(--text-subtle);
    border-color: var(--border-light);
}

button.secondary:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    box-shadow: none;
    transform: none;
    filter: none;
}

button:disabled,
button:disabled:hover {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    filter: none;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}


/* # Divider
   ========================================================= */

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

.nav-divider {
    margin: 14px 6px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(108, 138, 255, 0.35),
        transparent
    );
    opacity: 0.6;
}


/* # Stat Row
   ========================================================= */

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    gap: 12px;
}

.stat-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
    min-width: 0;
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    flex-shrink: 0;
}


/* # Home Page
   ========================================================= */

.home-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 70vh;
    gap: 0;
}

.home-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-eyebrow::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.home-hero h1 {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #edf0ff 20%, var(--accent) 60%, var(--violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-hero p {
    font-size: 17px;
    color: var(--text-subtle);
    margin-bottom: 36px;
    max-width: 480px;
}

.home-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 24px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 15px;
    transition: filter var(--transition), transform var(--transition), box-shadow var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
    min-height: 48px;
}

.btn-discord:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(108, 138, 255, 0.4);
    text-decoration: none;
    color: #fff;
}


/* # Guilds Page
   ========================================================= */

.guild-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.guild-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    min-height: 64px;
}

.guild-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(108, 138, 255, 0.15);
    text-decoration: none;
    color: var(--text-primary);
}

.guild-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent), var(--violet));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}

.guild-item-arrow {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 20px;
    transition: transform var(--transition);
    flex-shrink: 0;
}

.guild-item:hover .guild-item-arrow {
    transform: translateX(4px);
    color: var(--accent);
}


/* # Utilities
   ========================================================= */

.muted {
    color: var(--text-muted);
    font-size: 13px;
}

.text-subtle { color: var(--text-subtle); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }

.mb-0  { margin-bottom: 0 !important; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.mt-16 { margin-top: 16px; }


/* # Discord Embed Preview
   ========================================================= */

.discord-preview {
    display: flex;
    background: #111827;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 560px;
}

.discord-preview-bar {
    width: 5px;
    background: #5865F2;
    flex-shrink: 0;
}

.discord-preview-content {
    padding: 16px;
    width: 100%;
    min-width: 0;
}

.discord-preview-content h3 {
    margin-bottom: 8px;
    color: #ffffff;
    text-transform: none;
    letter-spacing: 0;
    font-size: 18px;
}

.discord-preview-content p {
    color: #d6d9e0;
    white-space: pre-wrap;
    word-break: break-word;
}

.discord-preview-image {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-top: 14px;
}

.discord-preview-footer {
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-muted);
}


/* # Giveaway Info Tooltip
   ========================================================= */

.gp-info {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(108,138,255,.12);
    border: 1px solid rgba(108,138,255,.2);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: #9fb7ff;
    /* Override button */
    background-color: rgba(108,138,255,.12) !important;
    min-height: unset !important;
}

.gp-info-tooltip {
    position: absolute;
    top: 34px;
    right: 0;
    width: 260px;
    background: rgba(20,28,52,.98);
    border: 1px solid rgba(120,145,210,.2);
    border-radius: 12px;
    padding: 12px;
    font-size: 12px;
    color: #cbd6ff;
    box-shadow: 0 10px 25px rgba(0,0,0,.3);
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: all 0.18s ease;
    z-index: 20;
}

.gp-info:hover .gp-info-tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.gp-weight-info {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(108,138,255,.08), rgba(167,139,250,.06));
    border: 1px solid rgba(108,138,255,.2);
    font-size: 13px;
    color: #cbd6ff;
}


/* # Owner Panel Table
   ========================================================= */

.owner-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.owner-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.owner-table th,
.owner-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
}

.owner-table th {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.owner-table td {
    color: var(--text-primary);
}

.owner-table tr:hover td {
    background: rgba(108, 138, 255, 0.04);
}

.owner-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.owner-table-header .card-label {
    margin-bottom: 0;
}

.owner-table-search {
    max-width: 260px;
}

.owner-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.owner-pagination input {
    width: 76px;
    text-align: center;
}

.nav-label:has(+ a[href="/owner/security"]) {
    color: #fbbf24;
}


/* # Status Menu
   ========================================================= */

.gp-systemstatus-menu,
.gp-owner-systemstatus-menu {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.gp-status-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.gp-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #34d399;
    box-shadow: 0 0 14px rgba(52,211,153,.65);
}


/* # Legal Footer
   ========================================================= */

.gp-legal-footer {
    margin-top: 34px;
    padding: 26px 18px;
    border-top: 1px solid rgba(255,255,255,.08);
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

.gp-legal-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.gp-legal-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    text-align: center;
}

.gp-legal-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

.gp-legal-footer a:hover {
    color: var(--accent);
}


/* =========================================================
   # RESPONSIVE — MOBILE FIRST
   ========================================================= */

/* ── Tablet: 901px – 1200px ─────────────────────────── */
@media (max-width: 1200px) {
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ── Mobile: ≤ 900px ────────────────────────────────── */
@media (max-width: 900px) {

    /* Show hamburger */
    .topbar-hamburger {
        display: flex;
    }

    /* Hide topbar nav links — sidebar/mobile-menu handles this */
    .topbar-left .topbar-link {
        display: none;
    }

    /* Layout: block, sidebar handled separately */
    .layout {
        display: block;
    }

    /* Sidebar: fixed overlay, slides in from left */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        border-right: 1px solid rgba(255,255,255,0.1);
        border-bottom: none;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        position: fixed !important;
    }

    .sidebar.is-open {
        transform: translateX(0);
        box-shadow: 6px 0 48px rgba(0, 0, 0, 0.7);
    }

    /* Nav in sidebar: vertical */
    nav {
        flex-direction: column;
    }

    nav a {
        min-height: 48px;
        font-size: 15px;
        padding: 12px 14px;
    }

    .nav-label {
        padding: 10px 14px 4px;
    }

    /* Main: full width */
    .main {
        padding: 20px 18px;
        min-height: calc(100vh - var(--topbar-height));
    }

    /* Grids collapse */
    .grid,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    /* Cards: reduce padding */
    .card {
        padding: 18px 16px;
        border-radius: 16px;
        margin-bottom: 16px;
    }

    /* Page header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
        padding-bottom: 18px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    /* Forms: full width */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="datetime-local"],
    input[type="date"],
    input[type="time"],
    select,
    textarea {
        max-width: 100%;
        width: 100%;
    }

    /* Discord preview */
    .discord-preview {
        max-width: 100%;
    }

    /* Home hero */
    .home-hero h1 {
        font-size: 34px;
    }

    /* Guilds */
    .guild-list {
        grid-template-columns: 1fr;
    }

    /* Hide wide bot button on mobile (in topbar) — shown in mobile menu */
    .topbar-btn {
        display: none;
    }

    h1 { font-size: 24px; }
    h2 { font-size: 19px; }
}


/* ── Smartphone: ≤ 600px ─────────────────────────────── */
@media (max-width: 600px) {

    .topbar-inner {
        padding: 0 14px;
        gap: 8px;
    }

    .topbar-logo span {
        font-size: 16px;
    }

    .topbar-right {
        gap: 8px;
    }

    .topbar-right .topbar-link {
        font-size: 13px;
    }

    .main {
        padding: 16px 14px;
    }

    .card {
        padding: 14px 12px;
        border-radius: 14px;
        margin-bottom: 12px;
    }

    h1 { font-size: 22px; }
    h2 { font-size: 18px; }
    h3 { font-size: 16px; }

    .page-header h1 {
        font-size: 22px;
    }

    .page-header-meta {
        font-size: 11px;
    }

    /* Stack button groups */
    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn,
    .btn-group button {
        width: 100%;
        justify-content: center;
    }

    /* Better stat rows on small screens */
    .stat-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 12px 0;
    }

    .stat-value {
        text-align: left;
    }

    /* Back link */
    .back-link {
        font-size: 13px;
        margin-bottom: 16px;
    }

    /* Tables: ensure horizontal scroll */
    .owner-table-wrap {
        border-radius: var(--radius-md);
        border: 1px solid var(--border);
    }

    /* Home hero */
    .home-hero {
        min-height: auto;
        padding: 20px 0;
    }

    .home-hero h1 {
        font-size: 28px;
    }

    .home-hero p {
        font-size: 15px;
    }

    /* Giveaway info tooltip: adjust position on mobile */
    .gp-info-tooltip {
        right: -10px;
        width: calc(100vw - 40px);
        max-width: 280px;
    }
}


/* ── Extra small: ≤ 400px ────────────────────────────── */
@media (max-width: 400px) {

    .topbar-right .topbar-link {
        display: none;
    }

    .main {
        padding: 14px 12px;
    }

    .card {
        padding: 12px 10px;
        border-radius: 12px;
    }

    h1 { font-size: 20px; }
    h2 { font-size: 17px; }

    nav a {
        font-size: 14px;
        padding: 10px 12px;
    }
}


/* ── Lock body scroll when sidebar is open ───────────── */
body.sidebar-is-open {
    overflow: hidden;
}

/* Cookie consent */
.gp-cookie-consent {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1200;
    width: min(620px, calc(100vw - 36px));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(12, 18, 32, 0.98);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.gp-cookie-consent[hidden],
.gp-cookie-modal[hidden] {
    display: none;
}

.gp-cookie-consent.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.gp-cookie-consent__content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: end;
    padding: 18px;
}

.gp-cookie-consent h2,
.gp-cookie-modal h2,
.gp-cookie-category h3 {
    margin: 0;
    color: var(--text-primary);
    letter-spacing: 0;
}

.gp-cookie-consent h2 {
    font-size: 18px;
}

.gp-cookie-consent p,
.gp-cookie-category p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.gp-cookie-consent__actions,
.gp-cookie-modal__actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.gp-cookie-btn {
    min-height: 38px;
    border-radius: 8px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
}

.gp-cookie-btn--primary {
    border-color: rgba(255, 122, 0, 0.7);
    background: linear-gradient(135deg, #ff2a3f, #ff7a00);
    color: #fff;
}

.gp-cookie-btn--secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.gp-cookie-btn--neutral {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
}

.gp-cookie-btn:hover {
    filter: brightness(1.08);
}

.gp-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 1210;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(5, 8, 15, 0.72);
    opacity: 0;
    transition: opacity 0.16s ease;
}

.gp-cookie-modal.is-open {
    opacity: 1;
}

.gp-cookie-modal__panel {
    width: min(660px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: #111827;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.gp-cookie-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 10px;
}

.gp-cookie-modal h2 {
    font-size: 20px;
}

.gp-cookie-modal__close {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 22px;
    line-height: 1;
}

.gp-cookie-modal__body {
    display: grid;
    gap: 10px;
    padding: 8px 18px 16px;
}

.gp-cookie-category {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.gp-cookie-category h3 {
    font-size: 15px;
}

.gp-cookie-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.gp-cookie-switch input {
    width: 18px;
    height: 18px;
    accent-color: #ff7a00;
}

.gp-cookie-switch--disabled {
    opacity: 0.72;
}

.gp-cookie-modal__actions {
    padding: 0 18px 18px;
}

body.gp-cookie-modal-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .gp-cookie-consent {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
    }

    .gp-cookie-consent__content,
    .gp-cookie-category {
        grid-template-columns: 1fr;
    }

    .gp-cookie-consent__actions,
    .gp-cookie-modal__actions {
        justify-content: stretch;
    }

    .gp-cookie-btn {
        flex: 1 1 140px;
    }

    .gp-cookie-switch {
        justify-content: space-between;
    }
}
