@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-color: #06110f;
    --accent: #22c55e;
    --accent-hover: #16a34a;
    --accent-glow: rgba(34, 197, 94, 0.38);
    --accent-cyan: #38bdf8;
    --accent-cyan-glow: rgba(56, 189, 248, 0.34);
    --accent-amber: #f59e0b;

    --card-bg: rgba(8, 21, 18, 0.7);
    --card-border: rgba(148, 163, 184, 0.14);
    --card-border-hover: rgba(226, 232, 240, 0.2);

    --text-primary: #f8fafc;
    --text-secondary: #8fb4ae;

    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.4);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.4);
    --warning: #f59e0b;

    --sidebar-bg: rgba(5, 16, 14, 0.82);
    --header-bg: rgba(8, 24, 21, 0.72);

    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Dynamic Background */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%),
        radial-gradient(circle at 50% 80%, rgba(14, 165, 233, 0.1), transparent 30%);
    background-color: var(--bg-color);
    background-size: 140% 140%;
    animation: nebulaShift 18s ease-in-out infinite alternate;
}

.bg-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzQnPgo8cmVjdCB3aWR0aD0nNCcgaGVpZ2h0PSc0JyBmaWxsPSd0cmFuc3BhcmVudCcvPgo8cmVjdCB3aWR0aD0nMScgaGVpZ2h0PScxJyBmaWxsPSdyZ2JhKDI1NSwyNTUsMjU1LDAuMDMpJy8+Cjwvc3ZnPg==');
    pointer-events: none;
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes nebulaShift {
    0% {
        transform: scale(1) translate3d(0, 0, 0);
        filter: saturate(1);
    }

    50% {
        transform: scale(1.06) translate3d(-1.5%, 1%, 0);
        filter: saturate(1.05);
    }

    100% {
        transform: scale(1.03) translate3d(1.5%, -1%, 0);
        filter: saturate(1.12);
    }
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes sheenSlide {
    from {
        transform: translateX(-120%);
    }

    to {
        transform: translateX(130%);
    }
}

@keyframes barFlow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

.animate-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-on-load {
    animation: cardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Global Card Component - Glassmorphism */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 30px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.06) 48%, transparent 56%);
    transform: translateX(-120%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.card:hover {
    border-color: var(--card-border-hover);
}

.card:hover::after {
    opacity: 1;
    animation: sheenSlide 1.1s ease;
}

/* Auth */
.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    text-align: center;
    animation: fadeInScale 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.login-card h1 {
    font-weight: 700;
    font-size: 2.2rem;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.login-card p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.login-card input {
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
}

.auth-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.auth-stack input {
    margin-bottom: 0;
    text-align: left;
}

.auth-note {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.55;
}

.login-card button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
    box-shadow: 0 10px 25px -5px var(--accent-glow);
}

.login-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px var(--accent-glow);
}

.setup-card {
    max-width: 520px;
}

/* Layout */
.main-container {
    display: none;
    height: 100vh;
    min-height: 100vh;
    width: 100vw;
    min-width: 0;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    z-index: 10;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.sidebar-header {
    padding: 32px 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 600;
}

#addServerBtn {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: var(--transition);
}

#addServerBtn:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--accent-glow);
}

.server-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 16px;
}

.sidebar-footer {
    padding: 8px 8px 0;
}

.sidebar-settings-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
    padding: 13px 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--text-primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.sidebar-settings-btn i {
    width: 18px;
    height: 18px;
}

.sidebar-settings-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(148, 163, 184, 0.2);
}

.sidebar-settings-btn.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(56, 189, 248, 0.1));
    border-color: rgba(56, 189, 248, 0.28);
    box-shadow: 0 12px 24px -20px rgba(34, 197, 94, 0.5);
}

.server-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 8px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    position: relative;
}

.server-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.server-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: inset 0 0 20px rgba(99, 102, 241, 0.05);
}

.server-item.active::before {
    content: '';
    position: absolute;
    left: -16px;
    height: 50%;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--accent);
}

.server-item .name {
    font-weight: 500;
    font-size: 0.95rem;
}

.server-item-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.server-kind {
    color: var(--text-secondary);
    font-size: 0.77rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Main App Area */
.app {
    flex: 1;
    padding: 40px 48px;
    overflow-y: auto;
    position: relative;
    min-width: 0;
    min-height: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    background: var(--header-bg);
    padding: 20px 30px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    animation: cardReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.topbar-left h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.topbar-left p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4px;
}

.tabs {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tab-btn {
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.tab-btn i {
    width: 18px;
    height: 18px;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.status-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid var(--card-border);
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 30px rgba(2, 6, 23, 0.25);
}

/* Use different animation logic since multiple apps might share styles */
@keyframes ping-glow {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4b5563;
    position: relative;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 15px var(--success-glow);
}

.status-dot.online::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 1px solid var(--success);
    animation: ping-glow 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.status-dot.offline {
    background: var(--danger);
    box-shadow: 0 0 15px var(--danger-glow);
}

/* Inputs and Buttons */
button {
    font-family: var(--font-sans);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    letter-spacing: 0;
}

button:active {
    transform: scale(0.97);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22), 0 0 0 1px rgba(56, 189, 248, 0.32);
}

input,
select,
textarea {
    background: rgba(3, 12, 10, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: white;
    border-radius: var(--radius-md);
    padding: 13px 15px;
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.35;
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(56, 189, 248, 0.45);
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
    background: rgba(2, 10, 9, 0.82);
}

/* Grid Cards */
.grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

.dashboard-grid {
    margin-top: 24px;
}

.full-width {
    grid-column: 1 / -1;
}

h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

/* Control Buttons */
.button-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.button-row button {
    flex: 1;
    min-height: 76px;
    padding: 17px 16px;
    border-radius: 14px;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: #fff;
    border: 1px solid rgba(226, 232, 240, 0.11);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 14px 28px -24px rgba(0, 0, 0, 0.7);
}

.button-row button:hover {
    transform: translateY(-1px);
    border-color: rgba(226, 232, 240, 0.2);
}

.button-row button i {
    width: 24px;
    height: 24px;
    stroke-width: 2.05;
}

.control-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 26px;
}

.control-danger-row {
    display: flex;
    justify-content: flex-end;
}

.start {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(8, 47, 42, 0.9));
    border-color: rgba(16, 185, 129, 0.28);
    color: #d7ffe9;
}

.start:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.38), rgba(8, 47, 42, 0.96));
    color: #fff;
    box-shadow: 0 16px 30px -20px var(--success-glow);
}

.stop {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.24), rgba(58, 21, 24, 0.92));
    border-color: rgba(239, 68, 68, 0.24);
    color: #ffd5d5;
}

.stop:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.36), rgba(58, 21, 24, 0.96));
    color: #fff;
    box-shadow: 0 16px 30px -20px var(--danger-glow);
}

.restart {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(61, 43, 12, 0.92));
    border-color: rgba(245, 158, 11, 0.24);
    color: #ffe7b0;
}

.restart:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.38), rgba(61, 43, 12, 0.96));
    color: #fff;
    box-shadow: 0 16px 30px -20px rgba(245, 158, 11, 0.48);
}

/* Info List */
.info-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.info-card {
    min-width: 0;
    min-height: 118px;
    padding: 18px 18px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02)),
        rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.info-card strong {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.info-value {
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.info-value-mono {
    font-family: var(--font-mono);
    font-weight: 500;
}

.info-card-wide {
    grid-column: span 2;
}

.info-card-full {
    grid-column: 1 / -1;
    min-height: 92px;
}

.info-card-accent {
    background:
        linear-gradient(135deg, rgba(34, 197, 94, 0.09), rgba(56, 189, 248, 0.05)),
        rgba(0, 0, 0, 0.22);
}

.playit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
    gap: 24px;
}

.settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 24px;
}

.settings-modal {
    align-items: center;
}

.settings-window {
    width: min(980px, calc(100vw - 48px));
    max-width: none;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.settings-window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.settings-window-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.18);
}

.icon-btn i {
    width: 18px;
    height: 18px;
}

.settings-card {
    min-width: 0;
    padding: 22px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.025));
    border: 1px solid rgba(148, 163, 184, 0.13);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.settings-intro {
    margin-bottom: 22px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.settings-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 6px;
}

.settings-meta-item {
    padding: 15px 16px;
    border-radius: 12px;
    background: rgba(3, 12, 10, 0.44);
    border: 1px solid rgba(148, 163, 184, 0.12);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-meta-item span {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.settings-meta-item strong {
    font-size: 1rem;
    line-height: 1.35;
}

.settings-actions {
    justify-content: flex-start;
    margin-top: 24px;
}

.settings-toggle-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 88px;
}

.settings-checkbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    padding: 14px 14px 14px 16px;
    border-radius: 13px;
    background: rgba(3, 12, 10, 0.46);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: var(--transition);
}

.settings-checkbox-row:hover {
    background: rgba(8, 24, 21, 0.72);
    border-color: rgba(56, 189, 248, 0.22);
}

.settings-checkbox-row input {
    appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.settings-checkbox-row input::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 2px;
    left: 2px;
    border-radius: 50%;
    background: #d8e7e3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: var(--transition);
}

.settings-checkbox-row input:checked {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(56, 189, 248, 0.78));
    border-color: rgba(110, 231, 183, 0.48);
}

.settings-checkbox-row input:checked::after {
    transform: translateX(20px);
    background: #ffffff;
}

.settings-toggle-group .field-help {
    margin-top: 8px;
    padding-left: 2px;
}

.settings-network-box {
    margin-top: 18px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-network-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-network-item span {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.settings-network-item code {
    font-family: var(--font-mono);
    color: var(--text-primary);
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.guest-access-result {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.22);
    color: var(--text-primary);
    font-family: var(--font-mono);
    line-height: 1.5;
    word-break: break-word;
}

.guest-access-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guest-access-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 14px;
    border-radius: 12px;
    background: rgba(3, 12, 10, 0.44);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.guest-access-row strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.guest-access-row small {
    color: var(--text-secondary);
    line-height: 1.45;
}

.guest-audit-list {
    margin-top: 10px;
    display: grid;
    gap: 4px;
}

.guest-audit-list small {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: rgba(143, 180, 174, 0.86);
}

.guest-access-row button {
    flex: 0 0 auto;
    padding: 9px 12px;
    border-radius: 9px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #fecaca;
}

.guest-access-row button:hover {
    background: rgba(239, 68, 68, 0.2);
}

.settings-network-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-network-list code {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(8, 15, 18, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-path-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-path-item {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-path-item span {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.settings-path-item code {
    font-family: var(--font-mono);
    color: var(--text-primary);
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.95fr);
    gap: 24px;
    align-items: center;
    min-height: 220px;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #c7d2fe;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-eyebrow i {
    width: 15px;
    height: 15px;
}

.hero-title {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    text-transform: none;
}

.hero-subtitle {
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 56ch;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hero-stat {
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.hero-stat span,
.performance-summary-card span {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-stat strong,
.performance-summary-card strong {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.hero-stat small,
.performance-summary-card small {
    color: var(--text-secondary);
    line-height: 1.45;
}

.playit-card {
    height: fit-content;
}

.playit-tab-header {
    margin-bottom: 18px;
}

.playit-intro {
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.5;
}

.playit-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.playit-header-row h3 {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.playit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.playit-grid div {
    background: rgba(0, 0, 0, 0.2);
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.playit-grid strong {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.playit-grid span {
    font-size: 0.98rem;
    font-family: var(--font-mono);
    word-break: break-word;
}

.delete-server-btn {
    min-width: 220px;
    padding: 12px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(127, 29, 29, 0.08));
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fecaca;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: left;
}

.delete-server-btn span {
    font-size: 0.98rem;
}

.delete-server-btn small {
    color: rgba(254, 202, 202, 0.7);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.delete-server-btn:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 10px 20px -5px var(--danger-glow);
    transform: translateY(-2px);
}

.playit-address-row button {
    padding: 11px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
}

.playit-address-row button:hover {
    background: rgba(255, 255, 255, 0.12);
}

.playit-config {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.playit-address-row {
    display: flex;
    gap: 12px;
}

.playit-address-row input {
    flex: 1;
    font-family: var(--font-mono);
}

.playit-help {
    color: var(--text-secondary);
    line-height: 1.55;
    font-size: 0.88rem;
}

.playit-guide-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.playit-guide-steps p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-actions button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.quick-actions button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.log-quick-actions {
    padding: 0 18px 18px;
}

.performance-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.performance-panel {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 18px;
    position: relative;
}

.cpu-panel {
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.07), rgba(99, 102, 241, 0.05)),
        rgba(0, 0, 0, 0.22);
}

.performance-topline,
.performance-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.performance-topline span,
.performance-meta span {
    color: var(--text-secondary);
}

.performance-topline strong {
    font-size: 1.35rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.memory-bar {
    width: 100%;
    height: 14px;
    margin: 14px 0 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.memory-bar-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e 0%, #eab308 65%, #ef4444 100%);
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.3);
    transition: width 0.35s ease;
    background-size: 200% 100%;
    animation: barFlow 5s linear infinite;
}

.cpu-bar-fill {
    background: linear-gradient(90deg, #22d3ee 0%, #6366f1 55%, #f59e0b 100%);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.28);
}

.performance-summary-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.performance-summary-card {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ram-settings {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ram-settings label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.ram-input-row {
    display: flex;
    gap: 12px;
}

.ram-input-row input {
    flex: 1;
    font-family: var(--font-mono);
}

.ram-input-row button {
    padding: 0 22px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.95));
    color: white;
    border: 1px solid rgba(187, 247, 208, 0.2);
}

.ram-input-row button:hover {
    background: var(--accent-hover);
    box-shadow: 0 8px 15px -3px var(--accent-glow);
}

.ram-help {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

.message {
    margin-top: 10px;
    font-size: 0.9rem;
}

.message.error {
    color: var(--danger);
}

.message.success {
    color: var(--success);
}

/* Terminal style Logs */
.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logs-header h2 {
    margin-bottom: 0;
}

#clearLogsBtn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

#clearLogsBtn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.log-console {
    background: #050505;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.5);
    border-top: 4px solid var(--accent);
}

#logOutput {
    height: 500px;
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.7;
    overflow-y: auto;
    position: relative;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.tab-content {
    animation: cardReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 0;
}

#logOutput::before {
    /* shine effect */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.8), transparent);
}

#logOutput span.log-time {
    color: #64748b;
    margin-right: 10px;
}

#logOutput span.log-info {
    color: #38bdf8;
}

#logOutput span.log-warn {
    color: #fbbf24;
}

#logOutput span.log-error {
    color: #ef4444;
}

.log-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.log-prompt {
    color: var(--success);
    font-family: var(--font-mono);
    font-size: 1rem;
}

.log-input-row input {
    flex: 1;
    font-family: var(--font-mono);
}

.log-input-row button {
    padding: 0 22px;
    align-self: stretch;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.95));
    color: white;
    border: 1px solid rgba(187, 247, 208, 0.2);
}

.log-input-row button:hover {
    background: var(--accent-hover);
    box-shadow: 0 8px 15px -3px var(--accent-glow);
}

/* File Manager */
.file-manager {
    padding: 0 !important;
    overflow: hidden;
}

.fm-header {
    padding: 24px 30px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
}

.breadcrumbs {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 1rem;
}

.breadcrumbs span {
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.breadcrumbs span:hover {
    color: var(--accent);
    text-decoration: underline;
}

.fm-actions {
    display: flex;
    gap: 12px;
}

.fm-actions button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: var(--radius-md);
}

.fm-actions button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.fm-actions button i {
    width: 16px;
    height: 16px;
}

#uploadFilesBtn {
    background: var(--accent);
    border-color: var(--accent);
}

#uploadFilesBtn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 10px var(--accent-glow);
}

.file-list-container {
    padding: 0;
    overflow-x: auto;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
}

.file-table th {
    padding: 20px 30px 15px;
    text-align: left;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--card-border);
}

.file-table td {
    padding: 16px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
}

.file-table tr {
    transition: var(--transition);
}

.file-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.file-table tr:last-child td {
    border-bottom: none;
}

.fileNameCol {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.fileNameCol i {
    color: var(--accent);
}

.file-table td.actions {
    width: 100px;
    text-align: right;
}

.file-table td.actions button {
    background: transparent;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 6px;
}

.file-table td.actions button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.file-table td.actions button.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 24px;
    overflow-y: auto;
}

.modal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 48px);
    transform: scale(0.95) translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

.modal:not(.hidden) .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-content h2 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 24px;
    text-transform: none;
    letter-spacing: 0;
}

.create-server-modal {
    width: min(980px, calc(100vw - 48px));
    max-width: none;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.modal-intro {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.form-group input,
.form-group select {
    width: 100%;
}

.form-group .label-row {
    margin-bottom: 8px;
}

.form-group .label-row label {
    margin-bottom: 0;
}

.field-help {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
    opacity: 0.88;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-row label {
    margin-bottom: 0;
}

.text-btn {
    background: transparent;
    color: var(--accent);
    padding: 0;
    font-size: 0.85rem;
    font-weight: 500;
}

.text-btn:hover {
    text-decoration: underline;
    color: #fff;
}

.create-server-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
    gap: 24px;
}

.velocity-config {
    margin-bottom: 20px;
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.velocity-targets {
    display: grid;
    gap: 10px;
}

.velocity-target-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.24);
    cursor: pointer;
}

.velocity-target-option input {
    margin-top: 3px;
}

.velocity-target-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.velocity-target-copy strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.velocity-target-copy small,
.velocity-target-empty {
    color: var(--text-secondary);
    line-height: 1.45;
}

.velocity-target-empty {
    padding: 14px;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.24);
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.create-server-main {
    min-width: 0;
}

.create-server-side {
    min-width: 0;
}

.source-summary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.source-summary h3 {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.source-summary p {
    color: var(--text-secondary);
    line-height: 1.55;
    font-size: 0.9rem;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
}

.modal-buttons button {
    min-height: 44px;
    padding: 11px 20px;
    border-radius: 10px;
    font-size: 0.92rem;
}

.modal-buttons .cancel {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--text-primary);
}

.modal-buttons .cancel:hover {
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(148, 163, 184, 0.26);
}

.modal-buttons .confirm {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.95));
    color: white;
    border: 1px solid rgba(187, 247, 208, 0.22);
    box-shadow: 0 14px 26px -20px var(--accent-glow);
}

.modal-buttons .confirm:hover {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.98), rgba(22, 163, 74, 0.98));
    box-shadow: 0 16px 30px -18px var(--accent-glow);
    transform: translateY(-1px);
}

.editor-modal {
    max-width: 900px;
    width: 90vw;
}

#fileContentEditor {
    width: 100%;
    height: 60vh;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    resize: none;
    background: #000;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
}

.settings-modal {
    align-items: center;
}

.settings-window {
    width: min(980px, calc(100vw - 48px));
    max-width: none;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.settings-window .settings-window-header h2 {
    margin: 0;
}

/* Remote Versions */
.remote-browser {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 20px;
}

.remote-source-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.source-switch {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.source-pill {
    padding: 9px 15px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.source-pill:hover {
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(148, 163, 184, 0.24);
}

.source-pill.active {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(56, 189, 248, 0.32);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.14) inset;
}

.remote-note {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.88rem;
    margin-bottom: 14px;
}

.search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.search-row input {
    flex: 1;
    padding: 10px 14px;
}

.search-row button {
    padding: 0 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: white;
}

.search-row button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.remote-list {
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.remote-empty {
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    line-height: 1.5;
}

.remote-card {
    padding: 16px;
    border-radius: var(--radius-md);
    cursor: default;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.remote-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.remote-card-main {
    min-width: 0;
    flex: 1;
}

.remote-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 6px;
}

.remote-card-header strong {
    font-size: 1rem;
}

.remote-card-subtitle,
.remote-card-description,
.remote-filename {
    color: var(--text-secondary);
    line-height: 1.45;
    font-size: 0.88rem;
}

.remote-card-description {
    margin-top: 6px;
}

.remote-filename {
    margin-top: 10px;
    font-family: var(--font-mono);
    word-break: break-all;
}

.remote-badge {
    flex: none;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.14);
    color: #c7d2fe;
    font-size: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.24);
}

.remote-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.remote-tag {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.76rem;
}

.remote-card button {
    padding: 10px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.95));
    color: white;
    flex: none;
    border: 1px solid rgba(187, 247, 208, 0.2);
}

.remote-card button:hover {
    background: var(--accent-hover);
    box-shadow: 0 8px 15px -3px var(--accent-glow);
}

@keyframes ambientFloat {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(24px, -18px, 0) scale(1.08);
    }

    100% {
        transform: translate3d(-18px, 20px, 0) scale(0.96);
    }
}

@keyframes pulseFlash {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.22);
    }

    65% {
        box-shadow: 0 0 0 16px rgba(56, 189, 248, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    }
}

@keyframes panelSweep {
    0% {
        transform: translateX(-110%);
        opacity: 0;
    }

    35% {
        opacity: 1;
    }

    100% {
        transform: translateX(130%);
        opacity: 0;
    }
}

body {
    background:
        radial-gradient(circle at top, rgba(34, 197, 94, 0.08), transparent 28%),
        linear-gradient(180deg, #04100e 0%, #071715 55%, #04100e 100%);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at center, black, transparent 88%);
    opacity: 0.22;
    z-index: -1;
}

.bg-gradient {
    background:
        radial-gradient(circle at 12% 18%, rgba(34, 197, 94, 0.22), transparent 24%),
        radial-gradient(circle at 88% 22%, rgba(56, 189, 248, 0.16), transparent 26%),
        radial-gradient(circle at 52% 84%, rgba(245, 158, 11, 0.1), transparent 24%),
        linear-gradient(180deg, rgba(5, 20, 17, 0.95), rgba(4, 12, 11, 1));
}

.bg-noise {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.08;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3) 0 1px, transparent 1px),
        radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.24) 0 1px, transparent 1px),
        radial-gradient(circle at 40% 70%, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px);
    background-size: 120px 120px, 180px 180px, 160px 160px;
}

.ambient-orb {
    position: fixed;
    width: 22rem;
    aspect-ratio: 1;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(32px);
    opacity: 0.2;
    z-index: -1;
    animation: ambientFloat 18s ease-in-out infinite alternate;
}

.orb-a {
    top: 8vh;
    left: -8rem;
    background: rgba(34, 197, 94, 0.42);
}

.orb-b {
    right: -7rem;
    top: 20vh;
    background: rgba(56, 189, 248, 0.32);
    animation-duration: 22s;
}

.orb-c {
    bottom: -6rem;
    left: 34vw;
    width: 18rem;
    background: rgba(245, 158, 11, 0.18);
    animation-duration: 20s;
}

.card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
        var(--card-bg);
    box-shadow: 0 22px 48px -18px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-card {
    max-width: 460px;
}

.login-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: rgba(56, 189, 248, 0.08);
    color: #b6e8ff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 auto 18px;
}

.login-card h1 {
    background: linear-gradient(135deg, #ffffff 0%, #b5f7d0 55%, #8ee3ff 100%);
    -webkit-background-clip: text;
}

.login-card::before {
    background: radial-gradient(circle at center, rgba(34, 197, 94, 0.12) 0%, transparent 42%);
}

.login-card button {
    background: linear-gradient(135deg, var(--accent) 0%, #15803d 100%);
}

input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.main-container {
    position: relative;
}

.sidebar {
    padding: 24px 18px 18px;
    gap: 18px;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.sidebar-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 6px;
}

.sidebar-stat {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    min-width: 0;
}

.sidebar-stat span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-stat strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
    letter-spacing: -0.03em;
}

.sidebar-header {
    padding: 6px 12px 4px;
}

#addServerBtn {
    background: rgba(34, 197, 94, 0.14);
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.26);
}

#addServerBtn:hover {
    background: var(--accent);
    box-shadow: 0 8px 20px var(--accent-glow);
}

.server-list {
    padding: 4px 8px 8px;
}

.server-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
    animation: fadeInUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.server-item:hover {
    transform: translateX(6px);
    box-shadow: 0 14px 28px -20px rgba(56, 189, 248, 0.55);
}

.server-item.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.14) 0%, rgba(56, 189, 248, 0.08) 100%);
    border-color: rgba(56, 189, 248, 0.28);
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12), 0 10px 24px -20px rgba(34, 197, 94, 0.8);
}

.server-item.active::before {
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent));
}

.server-empty {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 16px;
    border: 1px dashed rgba(143, 180, 174, 0.24);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    line-height: 1.5;
}

.server-empty strong {
    color: var(--text-primary);
    font-size: 0.96rem;
}

.app {
    padding-top: 32px;
}

.topbar {
    margin-bottom: 24px;
    box-shadow: 0 20px 44px -22px rgba(0, 0, 0, 0.68);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-left h1 {
    background: linear-gradient(120deg, #fff 0%, #cdf7de 45%, #9ae6ff 100%);
    -webkit-background-clip: text;
}

.tabs {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--accent) 0%, #15803d 100%);
    box-shadow: 0 10px 20px -12px var(--accent-glow);
}

.status-box {
    position: relative;
    overflow: hidden;
}

.status-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.08) 48%, transparent 60%);
    transform: translateX(-120%);
}

.status-box.is-pulsing::after {
    animation: panelSweep 0.8s ease;
}

.overview-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.overview-card {
    position: relative;
    padding: 18px 20px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        rgba(3, 10, 9, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.overview-card::before {
    content: '';
    position: absolute;
    inset: auto -20% -55% auto;
    width: 10rem;
    height: 10rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent 70%);
}

.overview-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.overview-card strong {
    display: block;
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.overview-card small {
    display: block;
    color: var(--text-secondary);
    line-height: 1.45;
}

.dashboard-hero {
    min-height: 240px;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 26%),
        radial-gradient(circle at left center, rgba(34, 197, 94, 0.1), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
        var(--card-bg);
}

.hero-eyebrow {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
    color: #c8f7d9;
}

.hero-stat,
.performance-panel,
.performance-summary-card,
.playit-grid div,
.info-card,
.source-summary {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.08);
}

.cpu-panel {
    background:
        linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(34, 197, 94, 0.06)),
        rgba(255, 255, 255, 0.035);
}

.hero-stat {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-stat:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.2);
    box-shadow: 0 16px 24px -22px rgba(56, 189, 248, 0.7);
}

.memory-bar-fill {
    background: linear-gradient(90deg, #22c55e 0%, #38bdf8 55%, #f59e0b 100%);
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.24);
}

.cpu-bar-fill {
    background: linear-gradient(90deg, #38bdf8 0%, #22c55e 60%, #f59e0b 100%);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.28);
}

.log-console {
    background:
        linear-gradient(180deg, rgba(56, 189, 248, 0.04), transparent 16%),
        #030706;
}

#logOutput::before {
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.72), transparent);
}

.quick-actions button,
.fm-actions button,
.remote-card button,
.playit-address-row button,
.ram-input-row button,
.log-input-row button {
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.quick-actions button:hover,
.fm-actions button:hover,
.remote-card button:hover,
.playit-address-row button:hover,
.ram-input-row button:hover,
.log-input-row button:hover {
    transform: translateY(-2px);
}

.message {
    min-height: 1.35rem;
    font-weight: 600;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.message.success,
.message.error {
    opacity: 1;
}

[data-animate] {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    transition:
        opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--stagger-index, 0) * 70ms);
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.is-pulsing {
    animation: pulseFlash 0.8s ease;
}

.tab-content {
    animation: none;
}

.tab-content.tab-active {
    animation: cardReveal 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.source-pill.active {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.16) inset;
}

.remote-badge {
    background: rgba(56, 189, 248, 0.14);
    color: #d1f1ff;
    border-color: rgba(56, 189, 248, 0.22);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 1100px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 240px;
    }

    .app {
        padding: 30px;
    }

    .create-server-layout {
        grid-template-columns: 1fr;
    }

    .playit-layout {
        grid-template-columns: 1fr;
    }

    .settings-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .button-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .info-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .info-card-wide,
    .info-card-full {
        grid-column: 1 / -1;
    }

    .hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .overview-strip {
        grid-template-columns: 1fr;
    }

    .topbar-right {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 980px),
(max-height: 760px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 38vh;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
        padding: 18px 14px 14px;
    }

    .sidebar-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0;
    }

    .server-list {
        display: flex;
        flex: none;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 10px;
    }

    .server-item {
        flex: 0 0 min(280px, 78vw);
        margin-bottom: 0;
    }

    .app {
        padding: 24px 20px 28px;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 18px 20px;
        margin-bottom: 18px;
    }

    .topbar-right {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .tabs {
        width: 100%;
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .tab-btn {
        flex: 1 1 180px;
        justify-content: center;
    }

    .overview-strip,
    .grid,
    .dashboard-hero,
    .playit-layout,
    .settings-layout,
    .create-server-layout,
    .hero-stats,
    .performance-summary-row,
    .info-list,
    .playit-grid,
    .settings-grid,
    .settings-meta-grid {
        grid-template-columns: 1fr;
    }

    .info-card,
    .info-card-wide,
    .info-card-full {
        grid-column: auto;
    }

    .button-row {
        grid-template-columns: 1fr;
    }

    .button-row button {
        min-height: 68px;
    }

    .control-danger-row {
        justify-content: stretch;
    }

    .delete-server-btn {
        width: 100%;
        min-width: 0;
    }

    .playit-address-row,
    .ram-input-row,
    .log-input-row,
    .search-row {
        flex-wrap: wrap;
    }

    .playit-address-row button,
    .ram-input-row button,
    .log-input-row button,
    .search-row button {
        width: 100%;
        min-height: 46px;
    }

    #logOutput {
        height: min(42vh, 360px);
        padding: 18px;
    }

    .create-server-modal,
    .settings-window {
        width: min(96vw, 980px);
        max-height: calc(100vh - 32px);
        padding: 22px;
    }
}

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

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
        padding: 18px 14px 14px;
    }

    .sidebar-summary {
        grid-template-columns: 1fr 1fr;
        padding: 0;
    }

    .server-list {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 10px;
        flex: none;
        gap: 10px;
    }

    .server-item {
        margin-bottom: 0;
        white-space: nowrap;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .topbar-right {
        flex-direction: column;
        align-items: stretch;
    }

    .tabs {
        width: 100%;
        justify-content: stretch;
    }

    .tab-btn {
        flex: 1;
        justify-content: center;
    }

    .button-row {
        grid-template-columns: 1fr;
    }

    .button-row button {
        min-height: 68px;
    }

    .control-danger-row {
        justify-content: stretch;
    }

    .delete-server-btn {
        width: 100%;
        min-width: 0;
    }

    .info-list {
        grid-template-columns: 1fr;
    }

    .info-card,
    .info-card-wide,
    .info-card-full {
        grid-column: auto;
        min-height: 96px;
    }

    .playit-grid {
        grid-template-columns: 1fr;
    }

    .playit-address-row {
        flex-wrap: wrap;
    }

    .playit-address-row button {
        width: 100%;
    }

    .create-server-modal,
    .settings-window {
        width: min(96vw, 980px);
        max-height: calc(100vh - 32px);
        padding: 22px;
    }

    .source-switch {
        gap: 8px;
    }

    .source-pill {
        width: calc(50% - 4px);
        text-align: center;
    }

    .remote-card {
        flex-direction: column;
    }

    .remote-card button {
        width: 100%;
    }

    .ram-input-row {
        flex-wrap: wrap;
    }

    .ram-input-row button {
        width: 100%;
        min-height: 46px;
    }

    .log-input-row {
        flex-wrap: wrap;
    }

    .log-input-row button {
        width: 100%;
        min-height: 46px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .performance-summary-row {
        grid-template-columns: 1fr;
    }

    .overview-strip {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.download-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    color: var(--accent);
    font-weight: 500;
}