/* launcher.css – extracted from launcher.html inline <style> */

:root {
    --danger: #f87171;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 10% 10%,
            rgba(251, 191, 36, 0.18),
            transparent 40%),
        radial-gradient(circle at 85% 20%,
            rgba(16, 185, 129, 0.2),
            transparent 45%),
        linear-gradient(160deg, var(--bg), var(--bg-2)) !important;
    min-height: 100vh;
    display: block;
    padding: 26px 20px 48px;
}

.shell {
    width: min(1100px, 100%);
    display: grid;
    gap: 28px;
    margin: 0 auto;
}

.hero {
    display: grid;
    gap: 10px;
}

.kicker {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 12px;
    color: var(--muted);
}

h1 {
    font-family: "Silkscreen", monospace;
    font-size: clamp(28px, 4vw, 52px);
    margin: 0;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.subtitle {
    margin: 0;
    color: var(--muted);
    font-size: clamp(14px, 2vw, 18px);
    max-width: 800px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.panel {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 16px;
}

.panel h2 {
    margin: 0;
    font-size: 20px;
}

.panel h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text);
}

.status {
    display: grid;
    gap: 10px;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: var(--muted);
}

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.15);
    color: var(--muted);
}

.badge.ok {
    background: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}

.badge.warn {
    background: rgba(248, 113, 113, 0.2);
    color: #fecaca;
}

.controls {
    display: grid;
    gap: 12px;
}

.control {
    display: grid;
    gap: 6px;
    font-size: 14px;
    color: var(--muted);
}

.control input[type="text"] {
    background: var(--theme-toggle-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    padding: 10px 12px;
    font-size: 14px;
}

.control input[type="checkbox"] {
    accent-color: var(--accent);
    transform: translateY(1px);
}

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

button {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 600;
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent), #f59e0b);
    color: #1f1300;
    box-shadow: 0 12px 30px rgba(251, 191, 36, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(251, 191, 36, 0.35);
}

.ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    background: var(--theme-toggle-bg);
    font-size: 14px;
}

.ghost.secondary {
    background: transparent;
}

.hint {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    display: grid;
    gap: 6px;
    font-size: 14px;
}

.tip {
    border-left: 3px solid var(--accent-2);
    padding-left: 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.warning {
    color: var(--danger);
    font-size: 13px;
}

.preview {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 180px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), transparent),
        radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.25), transparent 45%),
        var(--bg);
    border: 1px solid var(--border);
}

.preview::before,
.preview::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg,
            rgba(148, 163, 184, 0.08) 1px,
            transparent 1px),
        linear-gradient(rgba(148, 163, 184, 0.08) 1px,
            transparent 1px);
    background-size: 22px 22px;
    opacity: 0.7;
}

.preview::after {
    background: radial-gradient(circle at 70% 30%, rgba(251, 191, 36, 0.3), transparent 45%);
    opacity: 0.9;
}

.preview-content {
    position: relative;
    z-index: 1;
    padding: 18px;
    display: grid;
    gap: 8px;
}

.preview-title {
    font-family: "Silkscreen", monospace;
    font-size: 16px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--theme-toggle-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    color: var(--muted);
}

.launcher-card {
    display: grid;
    gap: 12px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    padding: 14px;
    color: var(--muted);
    font-size: 14px;
}

.launcher-card strong {
    color: var(--text);
}

.launcher-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.actions.compact {
    gap: 8px;
}

.actions.compact button,
.actions.compact .ghost {
    padding: 10px 12px;
    font-size: 13px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px 0;
    backdrop-filter: blur(10px);
}

.topbar-inner {
    background: var(--theme-toggle-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.brand-title {
    font-family: "Silkscreen", monospace;
    font-size: 16px;
    letter-spacing: 0.04em;
}

.brand-tag {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.nav a:hover {
    color: var(--text);
    border-color: var(--border);
    background: rgba(148, 163, 184, 0.08);
}

.nav .cta {
    color: #0b1220;
    background: var(--accent);
    border-color: rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

.nav .cta.secondary {
    color: var(--text);
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
}

.sections {
    display: grid;
    gap: 18px;
}

.section {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: var(--shadow);
}

.section h2 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.section p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.team {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.member {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(148, 163, 184, 0.06);
}

.member strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.member span {
    display: block;
    font-size: 13px;
    color: var(--muted);
}

@media (max-width: 620px) {
    .topbar {
        padding: 8px 0;
    }

    .topbar-inner {
        padding: 8px 10px;
        gap: 6px;
    }

    .brand-tag,
    .brand-title {
        display: none;
    }

    .nav {
        gap: 4px;
        justify-content: center;
        width: 100%;
    }
}

/* ═══ Settings Panel ═══ */

.settings-panel {
    border-color: rgba(251, 191, 36, 0.3);
}

.setting-group {
    display: grid;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.setting-group:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.setting-chip {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--theme-toggle-bg);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
}

.setting-chip:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: none;
    box-shadow: none;
}

.setting-chip.active {
    background: linear-gradient(135deg, var(--accent), #f59e0b);
    color: #1f1300;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

/* Slider */
.slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: rgba(148, 163, 184, 0.2);
    outline: none;
    cursor: pointer;
}

.setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #f59e0b);
    border: 2px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.setting-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.setting-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #f59e0b);
    border: 2px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    cursor: pointer;
}

.slider-value {
    min-width: 72px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.slider-icon {
    font-size: 16px;
    user-select: none;
}

/* Toggle Switch */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    gap: 12px;
}

.toggle-label {
    font-size: 14px;
    color: var(--muted);
}

.toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: rgba(148, 163, 184, 0.25);
    border-radius: 13px;
    transition: background 0.25s ease;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease;
}

.toggle-input:checked+.toggle-switch {
    background: linear-gradient(135deg, var(--accent), #f59e0b);
}

.toggle-input:checked+.toggle-switch::after {
    transform: translateX(22px);
}

.setting-hint {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
    opacity: 0.7;
    line-height: 1.4;
}

/* Save / Reset */
.setting-actions {
    display: flex;
    gap: 10px;
    padding-top: 8px;
}

.save-btn {
    flex: 1;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.save-btn:hover {
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.45);
}

.reset-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    box-shadow: none;
}

.reset-btn:hover {
    color: var(--text);
    border-color: var(--text);
    box-shadow: none;
}

/* Launch Primary */
.launch-primary {
    font-size: 16px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
}

.launch-primary:hover {
    box-shadow: 0 16px 40px rgba(16, 185, 129, 0.5);
}

/* ═══ World Manager ═══ */

.world-manager-panel {
    border-color: rgba(59, 130, 246, 0.3);
}

.world-create {
    display: flex;
    gap: 10px;
}

.world-input {
    flex: 1;
    background: var(--theme-toggle-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.world-input:focus {
    border-color: var(--accent);
}

.create-world-btn {
    white-space: nowrap;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.create-world-btn:hover {
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.45);
}

.world-list {
    display: grid;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.world-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(148, 163, 184, 0.06);
    animation: worldFadeIn 0.3s ease;
}

@keyframes worldFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.world-info {
    flex: 1;
    min-width: 0;
}

.world-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.world-meta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.world-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.world-load-btn {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.world-load-btn:hover {
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.world-delete-btn {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 8px;
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
    font-weight: 600;
    box-shadow: none;
}

.world-delete-btn:hover {
    background: rgba(248, 113, 113, 0.25);
    box-shadow: none;
}

.world-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--muted);
    font-size: 13px;
    border: 1px dashed var(--border);
    border-radius: 12px;
}

.world-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    padding-top: 4px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

@media (max-width: 600px) {
    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .actions button,
    .actions .ghost {
        width: 100%;
    }
}