/* =================================
   ArinBot Web - Główne Style
   ================================= */

:root {
    /* Kolory główne — lekko ciemniejszy pomarańczowy */
    --primary:        #E05A1A;
    --primary-dark:   #c44a10;
    --primary-light:  #f07030;
    --secondary:      #F7931E;
    --accent:         #FFB84D;

    /* Aliasy (kompatybilność ze starym kodem) */
    --primary-color:  #E05A1A;
    --secondary-color: #F7931E;
    --accent-color:   #FFB84D;

    /* Tła */
    --bg-dark:        #0f0f0f;
    --bg-darker:      #0a0a0a;
    --bg-card:        #1a1a1a;
    --bg-card-hover:  #202020;

    /* Aliasy tła */
    --background-dark:    #0f0f0f;
    --background-darker:  #0a0a0a;
    --card-background:    #1a1a1a;
    --input-background:   #242424;

    /* Tekst */
    --text-primary:   #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted:     #666666;

    /* Border */
    --border:         #2a2a2a;
    --border-color:   #2a2a2a;

    /* Nakładka hover */
    --hover-overlay:  rgba(224, 90, 26, 0.1);

    /* Statusy */
    --success:        #22c55e;
    --error:          #ef4444;
    --warning:        #f59e0b;
    --info:           #3b82f6;
    --success-color:  #22c55e;
    --error-color:    #ef4444;
    --warning-color:  #f59e0b;
    --info-color:     #3b82f6;

    /* Gradienty */
    --gradient-primary:   linear-gradient(135deg, #E05A1A 0%, #c44a10 100%);
    --gradient-secondary: linear-gradient(135deg, #F7931E 0%, #FFB84D 100%);

    /* Cienie */
    --shadow-sm:   0 2px 8px rgba(0,0,0,0.1);
    --shadow-md:   0 4px 16px rgba(0,0,0,0.2);
    --shadow-lg:   0 12px 32px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 20px rgba(224,90,26,0.3);

    /* Animacje */
    --transition-fast:   0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow:   0.5s ease;
}

/* =================================
   Reset & Base
   ================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Gradient przeniesiony z .hero — obejmuje całą stronę jednolicie */
    background: radial-gradient(ellipse at 60% 40%, rgba(224,90,26,0.07) 0%, transparent 60%), var(--bg-dark);
    background-attachment: fixed; /* gradient stały względem viewport, nie przewija się */
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--secondary); }

/* =================================
   Container & Layout
   ================================= */

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.main-content { min-height: calc(100vh - 400px); }

/* =================================
   Navbar (landing page)
   ================================= */

.navbar {
    background: rgba(10,10,10,0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 64px;
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 32px;   /* odstęp od logo */
    flex: 1;
}

/* ZMIANA: prawdziwe logo zamiast kwadratu z "A" */
.nav-logo-img {
    width: 32px; height: 32px;
    border-radius: 6px;
    object-fit: contain;
    flex-shrink: 0;
}

.nav-logo-icon {
    width: 36px; height: 36px; background: var(--primary);
    border-radius: 9px; display: flex; align-items: center;
    justify-content: center; font-weight: 800; color: white;
    font-size: 18px; flex-shrink: 0;
}

.nav-right { display: flex; align-items: center; gap: 16px; }

.nav-link.active { color: var(--primary) !important; }

/* ZMIANA: mniejszy avatar usera */
.user-avatar-placeholder {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--primary); display: flex; align-items: center;
    justify-content: center; font-weight: 700; color: white; font-size: 11px;
    flex-shrink: 0;
}

.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.dropdown-item.danger:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

/* Ukryj footer na stronach app */
.footer-hidden { display: none; }

.nav-title {
    font-size: 1.5rem; font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.nav-menu { display: flex; align-items: center; gap: 32px; }
.nav-link { color: var(--text-secondary); font-weight: 500; transition: color var(--transition-fast); }
.nav-link:hover { color: var(--primary); }

/* ZMIANA: kompaktowy nav-user */
.nav-user {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 12px;
    background: var(--bg-card);
    border-radius: 20px; border: 1px solid var(--border);
    cursor: pointer; transition: all var(--transition-fast);
    position: relative;
}
.nav-user:hover { border-color: var(--primary); box-shadow: var(--shadow-glow); }
.user-avatar { width: 26px; height: 26px; border-radius: 50%; }
.user-name { font-weight: 600; color: var(--text-primary); font-size: 13px; }

/* Login button w navbarze — dopasowany do rozmiaru nav-user */
.nav-right .btn-primary {
    padding: 5px 14px;
    font-size: 13px;
    border-radius: 20px;
    gap: 6px;
}

.user-dropdown {
    display: none; position: fixed;
    background: var(--bg-card); border: 2px solid var(--border);
    border-radius: 10px; padding: 6px; min-width: 180px; max-width: calc(100vw - 16px);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    animation: dropIn .15s ease;
}
@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.user-dropdown.open { display: block; }
.user-dropdown .dropdown-item {
    padding: 10px 12px;
    font-size: 13px;
}
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 8px; color: var(--text-primary); transition: background var(--transition-fast); }
.dropdown-item:hover { background: var(--hover-overlay); }

.nav-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--text-primary); }

/* Navbar - ukryj na stronach app (sidebar layout) */
.app-layout ~ footer .footer,

/* =================================
   Buttons
   ================================= */

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border: none; border-radius: 12px;
    font-weight: 600; font-size: 1rem; cursor: pointer;
    transition: all var(--transition-fast); text-decoration: none;
    font-family: inherit;
}

.btn-primary { background: var(--gradient-primary); color: white; box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), var(--shadow-glow); color: white; }

.btn-secondary { background: var(--bg-card); border: 2px solid var(--border); color: var(--text-primary); }
.btn-secondary:hover { border-color: var(--primary); background: var(--hover-overlay); color: var(--text-primary); }

.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }

.btn-danger { background: var(--error); color: white; }
.btn-danger:hover { background: #dc2626; color: white; }

.btn-lg { padding: 16px 32px; font-size: 1.1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }

/* =================================
   Flash Messages
   ================================= */

.flash-container {
    position: fixed; top: 80px; right: 24px;
    z-index: 9999; display: flex; flex-direction: column;
    gap: 12px; max-width: 400px;
}

.flash {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card); border: 2px solid;
    border-radius: 12px; box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

.flash-success { border-color: var(--success); color: var(--success); }
.flash-error   { border-color: var(--error);   color: var(--error); }
.flash-warning { border-color: var(--warning); color: var(--warning); }
.flash-info    { border-color: var(--info);    color: var(--info); }

.flash-close {
    margin-left: auto; background: none; border: none;
    color: inherit; cursor: pointer; font-size: 1.2rem;
    opacity: 0.7; transition: opacity var(--transition-fast);
}
.flash-close:hover { opacity: 1; }

/* =================================
   Footer — ZMIANA: pełny redesign
   ================================= */

.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
    padding: 60px 0 0;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-col-brand .footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.footer-logo {
    width: 36px; height: 36px;
    border-radius: 8px;
    object-fit: contain;
}
.footer-brand-name {
    font-size: 1.2rem; font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.footer-col-brand p {
    color: var(--text-muted);
    font-size: 14px; line-height: 1.7;
    margin-bottom: 20px; max-width: 300px;
}

.footer-col h4 {
    font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-muted); margin-bottom: 18px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a {
    color: var(--text-secondary); font-size: 14px;
    transition: color var(--transition-fast);
    display: flex; align-items: center; gap: 8px;
}
.footer-col ul li a i { font-size: 12px; color: var(--text-muted); }
.footer-col ul li a:hover { color: var(--primary); }
.footer-col ul li a:hover i { color: var(--primary); }

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
}

/* Stare klasy footera — zachowane dla kompatybilności */
.footer p { color: var(--text-muted); font-size: 14px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-muted); font-size: 14px; transition: color var(--transition-fast); }
.footer-links a:hover { color: var(--primary); }
.footer-social { display: flex; gap: 16px; }
.footer-social a {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg-card); border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-primary); font-size: 1.2rem;
    transition: all var(--transition-fast);
}
.footer-social a:hover { border-color: var(--primary); color: var(--primary); }
.status-indicator { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; animation: blink 2s ease-in-out infinite; }
.status-online { background: var(--success); }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.5} }

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .footer-col-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* =================================
   Toast notifications (JS)
   ================================= */

.toast-container {
    position: fixed; bottom: 24px; right: 24px;
    z-index: 9999; display: flex; flex-direction: column; gap: 10px;
}

.toast {
    padding: 14px 18px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; min-width: 280px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transform: translateX(400px); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    font-size: 14px; font-weight: 500;
}
.toast.show { transform: translateX(0); }
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--error); }
.toast.info    { border-left: 4px solid var(--info); }

/* =================================
   APP LAYOUT (dashboard + panel)
   ================================= */

.app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-dark);
}

/* ---- SIDEBAR ---- */

.app-sidebar {
    width: 240px;
    background: var(--bg-darker);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    position: fixed; top: 64px; left: 0; height: calc(100vh - 64px);
    z-index: 100; transition: transform 0.3s ease;
    overflow: hidden;
}

.sidebar-top {
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

/* Logo w sidebarze */
.sidebar-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; text-decoration: none; }
.sidebar-logo-icon {
    width: 32px; height: 32px; background: var(--primary);
    border-radius: 8px; display: flex; align-items: center;
    justify-content: center; font-weight: 800; color: white; font-size: 16px;
    flex-shrink: 0;
}
.sidebar-logo-name {
    font-size: 18px; font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* User button */
.sidebar-user { position: relative; }

.sidebar-user-btn {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 10px 12px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; cursor: pointer; transition: all 0.2s;
    text-align: left;
}
.sidebar-user-btn:hover { border-color: var(--primary); background: var(--bg-card-hover); }
.sidebar-user-btn.open .sidebar-user-chevron { transform: rotate(180deg); }

.sidebar-user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
}
.sidebar-user-avatar-placeholder {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--primary); display: flex; align-items: center;
    justify-content: center; font-weight: 700; color: white; font-size: 16px;
    flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-tag  { font-size: 12px; color: var(--text-muted); }
.sidebar-user-chevron { color: var(--text-muted); font-size: 12px; transition: transform 0.2s; }

/* Dropdown */
.sidebar-dropdown {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    display: none; z-index: 100;
}
.sidebar-dropdown.open { display: block; }

.sidebar-dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; color: var(--text-secondary);
    text-decoration: none; font-size: 14px;
    transition: all 0.15s; cursor: pointer;
    border: none; background: none; width: 100%; text-align: left;
}
.sidebar-dropdown-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.sidebar-dropdown-item.danger:hover { background: rgba(239,68,68,0.1); color: #ef4444; }
.sidebar-dropdown-item i { width: 16px; text-align: center; }

/* Server info w sidebarze (panel serwera) */
.sidebar-server {
    padding: 16px; border-bottom: 1px solid var(--border);
    display: flex; flex-direction: column;
    align-items: center; text-align: center; gap: 8px;
    flex-shrink: 0;
}
.sidebar-server-icon { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.sidebar-server-icon-placeholder {
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #ff4500);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 800; color: white;
}
.sidebar-server-name { font-size: 15px; font-weight: 700; }

/* Nav */
.sidebar-nav {
    padding: 12px; flex: 1;
    overflow-y: auto;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-nav-section { margin-bottom: 6px; }
.sidebar-nav-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    color: var(--text-muted); letter-spacing: 0.5px;
    padding: 8px 8px 4px;
}

.sidebar-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px;
    color: var(--text-secondary); text-decoration: none;
    font-size: 14px; font-weight: 500;
    transition: all 0.15s; margin-bottom: 1px;
    cursor: pointer; background: none; border: none; width: 100%; text-align: left;
    font-family: inherit;
}
.sidebar-nav-item:hover { background: var(--bg-card); color: var(--text-primary); }
.sidebar-nav-item.active { background: var(--primary); color: white; }
.sidebar-nav-item i { width: 18px; text-align: center; }

/* ---- MAIN CONTENT AREA ---- */

.app-main {
    flex: 1;
    margin-left: 240px;
    display: flex; flex-direction: column;
    min-height: 100vh;
}

/* Header paska (panel serwera) */
.app-main-header {
    padding: 20px 32px;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-darker);
    position: sticky; top: 0; z-index: 100;
    flex-shrink: 0;
}
.app-main-header-left h2 { font-size: 18px; font-weight: 700; }
.app-main-header-left p  { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* Header user (prawy górny róg) */
.header-user { position: relative; }
.header-user-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 10px;
    cursor: pointer; transition: all 0.2s;
    font-family: inherit;
}
.header-user-btn:hover { border-color: var(--primary); }
.header-user-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.header-user-avatar-placeholder {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); display: flex;
    align-items: center; justify-content: center;
    font-weight: 700; color: white; font-size: 12px;
}
.header-user-name { font-size: 13px; font-weight: 600; }

.header-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    min-width: 180px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 10px;
    overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    display: none; z-index: 100;
}
.header-dropdown.open { display: block; }
.header-dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; color: var(--text-secondary);
    text-decoration: none; font-size: 14px;
    transition: all 0.15s; cursor: pointer;
    border: none; background: none; width: 100%; text-align: left;
    font-family: inherit;
}
.header-dropdown-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.header-dropdown-item.danger:hover { background: rgba(239,68,68,0.1); color: #ef4444; }
.header-dropdown-item i { width: 16px; text-align: center; }

/* ---- Dashboard - header (lista serwerów) ---- */
.app-main-header-simple {
    padding: 32px 40px 0;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 32px;
}
.app-main-header-simple h1 { font-size: 28px; font-weight: 800; }
.app-main-header-simple p  { color: var(--text-secondary); margin-top: 4px; }

/* ---- SERVERS GRID ---- */

.servers-wrapper { padding: 32px 40px; flex: 1; }

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
}

.server-item {
    display: flex; flex-direction: column;
    align-items: center; gap: 10px;
    padding: 20px 12px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; text-decoration: none; color: var(--text-primary);
    transition: all 0.2s; cursor: pointer; position: relative;
}
.server-item:hover {
    border-color: var(--primary); transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(224,90,26,0.15);
    color: var(--text-primary);
}
.server-item.no-bot { opacity: 0.65; }
.server-item.no-bot:hover { opacity: 1; }

.server-item-icon { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.server-item-icon-placeholder {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #ff4500);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 800; color: white;
}
.server-item-name {
    font-size: 13px; font-weight: 600;
    text-align: center; width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.server-item-badge {
    position: absolute; top: 8px; right: 8px;
    width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid var(--bg-card);
}
.server-item-badge.active   { background: #22c55e; }
.server-item-badge.inactive { background: #6b7280; }

/* Add server button */
.server-add-btn {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 20px 12px; background: transparent;
    border: 2px dashed var(--border); border-radius: 16px;
    color: var(--text-muted); text-decoration: none;
    transition: all 0.2s; cursor: pointer;
    font-family: inherit;
}
.server-add-btn:hover { border-color: var(--primary); color: var(--primary); }
.server-add-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--bg-card);
    display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.server-add-label { font-size: 13px; font-weight: 600; text-align: center; }

/* Empty state */
.empty-servers {
    grid-column: 1 / -1;
    text-align: center; padding: 60px 20px;
    color: var(--text-secondary);
}
.empty-servers i { font-size: 3rem; color: var(--text-muted); margin-bottom: 16px; display: block; }
.empty-servers h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }

/* ---- PANEL CONTENT ---- */

.panel-content { padding: 32px; flex: 1; }

.panel-section { display: none; }
.panel-section.active { display: block; }

.section-title    { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.section-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; }

/* Settings cards */
.settings-group { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }

.settings-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 14px; padding: 22px 24px;
    transition: border-color 0.2s;
}
.settings-card:hover { border-color: rgba(224,90,26,0.3); }

.settings-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.settings-card-title  { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.settings-card-desc   { font-size: 13px; color: var(--text-secondary); }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--bg-darker); border: 2px solid var(--border);
    border-radius: 26px; transition: 0.2s;
}
.toggle-slider:before {
    position: absolute; content: "";
    height: 18px; width: 18px; left: 2px; bottom: 2px;
    background: var(--text-muted); border-radius: 50%; transition: 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--primary); border-color: var(--primary); }
.toggle input:checked + .toggle-slider:before { transform: translateX(22px); background: white; }

/* Form controls */
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

.form-control {
    padding: 10px 14px;
    background: var(--bg-darker); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text-primary);
    font-size: 14px; font-family: inherit;
    transition: border-color 0.2s; width: 100%;
}
.form-control:focus { outline: none; border-color: var(--primary); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--text-muted); }

/* Checkbox */
.checkbox-list { display: flex; flex-direction: column; gap: 10px; }
.checkbox-item { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.checkbox-item input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

/* Save bar */
.save-bar { display: flex; justify-content: flex-end; gap: 12px; padding-top: 8px; }

/* =================================
   Hamburger & Mobile Overlay
   ================================= */

.hamburger {
    display: none;
    position: fixed; top: 16px; left: 16px;
    z-index: 300;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; width: 44px; height: 44px;
    align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-primary);
}

.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 150;
}

/* =================================
   LANDING PAGE - Hero
   ================================= */

.hero {
    min-height: 100vh; display: flex; align-items: center;
    background: transparent; /* gradient przeniesiony na body */
    padding: 100px 0 60px; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -200px; right: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(224,90,26,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }

.hero-label {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(224,90,26,0.1); border: 1px solid rgba(224,90,26,0.2);
    border-radius: 20px; padding: 6px 16px;
    font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 24px;
}
.hero-label span { width: 6px; height: 6px; background: var(--primary); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.4)} }

.hero-title { font-size: 58px; font-weight: 800; line-height: 1.1; margin-bottom: 20px; letter-spacing: -1px; }
.hero-title .accent { color: var(--primary); }

.hero-subtitle { font-size: 18px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 36px; max-width: 480px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }

.hero-stats { display: flex; gap: 32px; padding-top: 32px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.hero-stat-value { font-size: 28px; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 4px; }
.hero-stat-label { font-size: 13px; color: var(--text-muted); }

/* Discord preview card */
.discord-card {
    background: #1e2124; border-radius: 16px; overflow: hidden;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.05);
}
.discord-card-header {
    background: #18191c; padding: 14px 18px;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dc-dots { display: flex; gap: 6px; }
.dc-dot { width: 12px; height: 12px; border-radius: 50%; }
.dc-dot.red    { background: #ff5f57; }
.dc-dot.yellow { background: #ffbd2e; }
.dc-dot.green  { background: #28c941; }
.dc-channel { font-size: 13px; color: #72767d; margin-left: 6px; }
.dc-channel span { color: #dcddde; }

.discord-messages { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.dc-msg { display: flex; gap: 12px; }
.dc-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.dc-bot-avatar {
    background: linear-gradient(135deg, var(--primary), #ff8c5a);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: white;
}
.dc-msg-author { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.dc-msg-author .bot-tag { background: #5865f2; color: white; font-size: 10px; padding: 1px 5px; border-radius: 3px; margin-left: 6px; font-weight: 500; }
.dc-msg-text { font-size: 14px; color: #dcddde; line-height: 1.5; }
.dc-msg-text .hl { color: var(--primary); font-weight: 600; }
.dc-embed {
    background: #2b2d31; border-left: 4px solid var(--primary);
    border-radius: 0 8px 8px 0; padding: 12px 14px; margin-top: 8px; font-size: 13px;
}
.dc-embed-title { font-weight: 700; margin-bottom: 4px; color: #fff; }
.dc-embed-desc { color: #b9bbbe; }

/* =================================
   GALAKTYKA SERWERÓW
   ======================================== */

.galaxy-section {
    width: 100%;
    height: 66vh;
    padding: 0;
    margin: 0;
    background: transparent;
    position: relative;
    overflow: hidden;
}

/* Wyszukiwarka */
.galaxy-search {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    max-width: 400px;
    width: 100%;
}

.galaxy-search input {
    flex: 1;
    padding: 12px 20px;
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(224, 90, 26, 0.3);
    border-radius: 25px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.galaxy-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(224, 90, 26, 0.3);
    border-radius: 25px 25px 0 0;
}

.galaxy-search input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.galaxy-search button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: rgba(224, 90, 26, 0.2);
    border: 1px solid rgba(224, 90, 26, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
}

.galaxy-search button:hover {
    background: rgba(224, 90, 26, 0.4);
    transform: scale(1.1);
}

/* Scrollbar dla podpowiedzi */
#galaxySuggestions::-webkit-scrollbar { width: 8px; }
#galaxySuggestions::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 0 0 15px 0; }
#galaxySuggestions::-webkit-scrollbar-thumb { background: rgba(224, 90, 26, 0.5); border-radius: 4px; }
#galaxySuggestions::-webkit-scrollbar-thumb:hover { background: rgba(224, 90, 26, 0.7); }

#galaktyka {
    display: block;
    cursor: grab;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

#galaktyka:active {
    cursor: grabbing;
}

@media (max-width: 768px) {
    .galaxy-search { top: 10px; }
    .galaxy-search input { width: 240px; font-size: 13px; padding: 10px 16px; }
}

/* =================================
   LANDING PAGE - Features
   ================================= */

.features-section { padding: 100px 0; }
.features-section .section-header { text-align: center; margin-bottom: 60px; }
.features-section .section-header h2 { font-size: 40px; font-weight: 800; margin-bottom: 12px; }
.features-section .section-header p  { color: var(--text-secondary); font-size: 17px; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.feature-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; padding: 28px; transition: all 0.25s;
}
.feature-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: 0 12px 32px rgba(224,90,26,0.1); }
.feature-icon-wrap {
    width: 52px; height: 52px; background: rgba(224,90,26,0.1);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin-bottom: 18px; color: var(--primary);
}
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.feature-card p  { color: var(--text-secondary); font-size: 14px; line-height: 1.6; }

/* =================================
   LANDING PAGE - CTA
   ================================= */

.cta-section {
    padding: 100px 0; text-align: center;
    background: radial-gradient(ellipse at center, rgba(224,90,26,0.08) 0%, transparent 70%), var(--bg-darker);
    border-top: 1px solid var(--border);
}
.cta-section h2 { font-size: 44px; font-weight: 800; margin-bottom: 16px; }
.cta-section p  { color: var(--text-secondary); font-size: 18px; margin-bottom: 36px; }
.cta-btns { display: flex; gap: 14px; justify-content: center; }

/* =================================
   Responsive
   ================================= */

@media (max-width: 968px) {
    .nav-menu  { display: none; }
    .nav-toggle { display: block; }
    .features-grid { grid-template-columns: 1fr 1fr; }
    #server-map { height: 360px; }
}

@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .hero-title { font-size: 38px; }
}

@media (max-width: 768px) {
    .app-sidebar { transform: translateX(-100%); top: 64px; height: calc(100vh - 64px); }
    .app-sidebar.open { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .hamburger { display: flex; }
    .sidebar-overlay.open { display: block; }

    .panel-content { padding: 20px; }
    .form-row { grid-template-columns: 1fr; }
    .app-main-header { padding: 14px 20px; padding-left: 72px; }
    .servers-wrapper { padding: 20px; padding-top: 72px; }
    .app-main-header-simple { padding: 72px 20px 0; }
    .servers-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

@media (max-width: 600px) {
    .features-grid { grid-template-columns: 1fr; }
    .hero-stats { flex-wrap: wrap; gap: 20px; }
    .cta-btns { flex-direction: column; align-items: center; }
    .hero-title { font-size: 32px; }
}

/* === NAVBAR FIX === */
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0;
}
.nav-brand a {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    text-decoration: none;
}
.nav-title {
    white-space: nowrap;
    font-size: 1.2rem;
}
.nav-logo-icon {
    flex-shrink: 0;
}
.nav-menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    flex: none;
}
.nav-right {
    margin-left: auto;
    flex-shrink: 0;
}

/* === NAV LINKS SPACING === */
.nav-menu {
    gap: 24px !important;
}
.nav-link {
    padding: 8px 12px !important;
}

/* === NAVBAR MOBILE === */
@media (max-width: 768px) {
    /* Wyzeruj absolutne pozycjonowanie nav-menu */
    .nav-menu {
        position: static !important;
        transform: none !important;
        left: auto !important;
        display: none !important;
        margin: 0 !important;
    }

    /* Ukryj toggle – nie potrzebny */
    .nav-toggle { display: none !important; }

    /* Ukryj nav-title żeby logo nie zajmowało miejsca */
    .nav-title { display: none; }

    /* Kontener: logo po lewej, przycisk po prawej */
    .navbar .container {
        justify-content: space-between;
        padding: 0 16px;
        position: relative;
    }

    /* Nav-right: nic nie przesuwa, flex auto po prawej */
    .nav-right { margin-left: auto; flex-shrink: 0; }

    /* Nav-brand nie rozciąga się */
    .nav-brand { flex-shrink: 0; }

    /* Przycisk logowania — tylko ikona */
    .nav-right .btn-primary .btn-text { display: none; }
    .nav-right .btn-primary { padding: 8px 12px; border-radius: 10px; }

    /* User pill — tylko avatar */
    .user-name { display: none; }
    .nav-user i.fa-chevron-down { display: none; }
    .nav-user { padding: 4px 8px; gap: 4px; }
}