/* =====================================================
   StreamPlay Platform â€“ Global Styles
   ===================================================== */

:root {
	--sp-bg: #0f0f14;
	--sp-surface: #1a1a24;
	--sp-surface2: #22222f;
	--sp-border: #2e2e42;
	--sp-accent: #7c3aed;
	--sp-accent-hover: #6d28d9;
	--sp-accent2: #06b6d4;
	--sp-text: #e2e2f0;
	--sp-text-muted: #8888aa;
	--sp-success: #22c55e;
	--sp-danger: #ef4444;
	--sp-warning: #f59e0b;
	--sp-radius: 10px;
	--sp-sidebar-width: 230px;
	--sp-topbar-height: 56px;
}

/* =====================================================
   PUBLIC LAYOUT
   ===================================================== */

.sp-public-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(15, 15, 20, 0.92);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--sp-border);
}

.sp-navbar {
	display: flex;
	align-items: center;
	gap: 2rem;
	padding: 0 2rem;
	height: var(--sp-topbar-height);
	max-width: 1200px;
	margin: 0 auto;
}

.sp-navbar-brand {
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--sp-text);
	text-decoration: none;
	white-space: nowrap;
}

.sp-navbar-nav {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0.25rem;
	flex: 1;
}

.sp-navbar-nav a {
	color: var(--sp-text-muted);
	text-decoration: none;
	padding: 0.4rem 0.85rem;
	border-radius: 6px;
	font-size: 0.95rem;
	transition: color 0.15s, background 0.15s;
}

.sp-navbar-nav a:hover,
.sp-navbar-nav a.active {
	color: var(--sp-text);
	background: var(--sp-surface2);
}

.sp-navbar-auth {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-left: auto;
}

.sp-navbar-user {
	color: var(--sp-text-muted);
	font-size: 0.875rem;
	text-decoration: none;
}

.sp-public-main {
	min-height: calc(100vh - var(--sp-topbar-height) - 56px);
	background: var(--sp-bg);
	color: var(--sp-text);
}

.sp-public-footer {
	text-align: center;
	padding: 1rem;
	color: var(--sp-text-muted);
	font-size: 0.8rem;
	border-top: 1px solid var(--sp-border);
	background: var(--sp-surface);
}

/* =====================================================
   BUTTONS
   ===================================================== */

.sp-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 1.1rem;
	border-radius: 7px;
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	white-space: nowrap;
}

.sp-btn-primary {
	background: var(--sp-accent);
	color: #fff;
	border-color: var(--sp-accent);
}

.sp-btn-primary:hover {
	background: var(--sp-accent-hover);
	border-color: var(--sp-accent-hover);
	color: #fff;
}

.sp-btn-outline {
	background: transparent;
	color: var(--sp-text);
	border-color: var(--sp-border);
}

.sp-btn-outline:hover {
	background: var(--sp-surface2);
	color: var(--sp-text);
}

.sp-btn-danger {
	background: var(--sp-danger);
	color: #fff;
	border-color: var(--sp-danger);
}

/* =====================================================
   HERO SECTION (Public Home)
   ===================================================== */

.sp-hero {
	padding: 5rem 2rem 4rem;
	text-align: center;
	background: linear-gradient(160deg, #0f0f14 0%, #1a0e2e 60%, #0f0f14 100%);
}

.sp-hero h1 {
	font-size: clamp(2rem, 5vw, 3.5rem);
	font-weight: 800;
	color: var(--sp-text);
	margin-bottom: 1rem;
	line-height: 1.15;
}

.sp-hero h1 span {
	background: linear-gradient(90deg, var(--sp-accent), var(--sp-accent2));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.sp-hero p {
	font-size: 1.15rem;
	color: var(--sp-text-muted);
	max-width: 580px;
	margin: 0 auto 2rem;
	line-height: 1.65;
}

.sp-hero-cta {
	display: flex;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
}

/* =====================================================
   FEATURE CARDS
   ===================================================== */

.sp-features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.25rem;
	padding: 3rem 2rem;
	max-width: 1100px;
	margin: 0 auto;
}

.sp-card {
	background: var(--sp-surface);
	border: 1px solid var(--sp-border);
	border-radius: var(--sp-radius);
	padding: 1.5rem;
	transition: border-color 0.2s, transform 0.15s;
}

.sp-card:hover {
	border-color: var(--sp-accent);
	transform: translateY(-2px);
}

.sp-card-icon {
	font-size: 2rem;
	margin-bottom: 0.75rem;
	display: block;
}

.sp-card h3 {
	font-size: 1.05rem;
	font-weight: 600;
	margin-bottom: 0.4rem;
	color: var(--sp-text);
}

.sp-card p {
	font-size: 0.9rem;
	color: var(--sp-text-muted);
	line-height: 1.55;
}

/* =====================================================
   SECTION WRAPPERS
   ===================================================== */

.sp-section {
	padding: 3rem 2rem;
	max-width: 1100px;
	margin: 0 auto;
}

.sp-section-title {
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--sp-text);
	margin-bottom: 0.4rem;
}

.sp-section-sub {
	color: var(--sp-text-muted);
	margin-bottom: 2rem;
	font-size: 0.95rem;
}

/* =====================================================
   STEPS / HOW-IT-WORKS
   ===================================================== */

.sp-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.5rem;
}

.sp-step {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
}

.sp-step-num {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--sp-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.9rem;
	flex-shrink: 0;
}

.sp-step h4 {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--sp-text);
	margin: 0;
}

.sp-step p {
	font-size: 0.85rem;
	color: var(--sp-text-muted);
	margin: 0;
	line-height: 1.5;
}

/* =====================================================
   DOWNLOAD PAGE
   ===================================================== */

.sp-download-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.25rem;
}

.sp-download-card {
	background: var(--sp-surface);
	border: 1px solid var(--sp-border);
	border-radius: var(--sp-radius);
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.sp-download-card .sp-badge {
	display: inline-block;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	background: var(--sp-surface2);
	color: var(--sp-accent2);
	border: 1px solid var(--sp-border);
	width: fit-content;
}

.sp-download-card h3 {
	font-size: 1rem;
	font-weight: 600;
	color: var(--sp-text);
	margin: 0;
}

.sp-download-card p {
	font-size: 0.875rem;
	color: var(--sp-text-muted);
	margin: 0;
	line-height: 1.5;
	flex: 1;
}

/* =====================================================
   DASHBOARD LAYOUT
   ===================================================== */

.sp-dashboard-layout {
	display: flex;
	min-height: 100vh;
	background: var(--sp-bg);
	color: var(--sp-text);
}

.sp-dashboard-sidebar {
	width: var(--sp-sidebar-width);
	background: var(--sp-surface);
	border-right: 1px solid var(--sp-border);
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
}

.sp-sidebar-brand {
	padding: 1.25rem 1rem;
	border-bottom: 1px solid var(--sp-border);
	font-size: 1.1rem;
	font-weight: 700;
}

.sp-sidebar-brand a {
	color: var(--sp-text);
	text-decoration: none;
}

.sp-dashboard-nav ul,
.sp-admin-nav ul {
	list-style: none;
	padding: 0.75rem 0.5rem;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.sp-dashboard-nav a,
.sp-admin-nav a {
	display: block;
	padding: 0.55rem 0.85rem;
	border-radius: 7px;
	color: var(--sp-text-muted);
	text-decoration: none;
	font-size: 0.9rem;
	transition: background 0.15s, color 0.15s;
}

.sp-dashboard-nav a:hover,
.sp-dashboard-nav a.active,
.sp-admin-nav a:hover,
.sp-admin-nav a.active {
	background: var(--sp-surface2);
	color: var(--sp-text);
}

.sp-nav-divider {
	border-top: 1px solid var(--sp-border);
	margin: 0.4rem 0.85rem;
}

.sp-dashboard-content,
.sp-admin-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.sp-dashboard-topbar,
.sp-admin-topbar {
	height: var(--sp-topbar-height);
	border-bottom: 1px solid var(--sp-border);
	padding: 0 1.5rem;
	display: flex;
	align-items: center;
	gap: 1rem;
	background: var(--sp-surface);
	flex-shrink: 0;
}

.sp-topbar-user {
	font-size: 0.875rem;
	color: var(--sp-text-muted);
}

.sp-topbar-link {
	font-size: 0.875rem;
	color: var(--sp-text-muted);
	text-decoration: none;
	transition: color 0.15s;
}

.sp-topbar-link:hover { color: var(--sp-text); }

.sp-topbar-badge {
	font-size: 0.75rem;
	font-weight: 700;
	padding: 0.2rem 0.7rem;
	border-radius: 999px;
	background: var(--sp-accent);
	color: #fff;
	letter-spacing: 0.03em;
}

.sp-dashboard-main,
.sp-admin-main {
	flex: 1;
	overflow-y: auto;
	padding: 1.5rem;
}

/* =====================================================
   ADMIN LAYOUT  (inherits dashboard vars)
   ===================================================== */

.sp-admin-layout {
	display: flex;
	min-height: 100vh;
	background: var(--sp-bg);
	color: var(--sp-text);
}

.sp-admin-sidebar {
	width: var(--sp-sidebar-width);
	background: var(--sp-surface);
	border-right: 1px solid var(--sp-border);
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
}

/* =====================================================
   STAT / INFO CARDS (Dashboard widgets)
   ===================================================== */

.sp-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.sp-stat-card {
	background: var(--sp-surface);
	border: 1px solid var(--sp-border);
	border-radius: var(--sp-radius);
	padding: 1.25rem;
}

.sp-stat-card .sp-stat-label {
	font-size: 0.8rem;
	color: var(--sp-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 0.3rem;
}

.sp-stat-card .sp-stat-value {
	font-size: 1.8rem;
	font-weight: 700;
	color: var(--sp-text);
	line-height: 1;
}

.sp-stat-card .sp-stat-sub {
	font-size: 0.78rem;
	color: var(--sp-text-muted);
	margin-top: 0.3rem;
}

/* =====================================================
   FORM ELEMENTS
   ===================================================== */

.sp-form-group {
	margin-bottom: 1rem;
}

.sp-form-group label {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--sp-text-muted);
	margin-bottom: 0.35rem;
}

.sp-input {
	width: 100%;
	padding: 0.55rem 0.85rem;
	background: var(--sp-surface2);
	border: 1px solid var(--sp-border);
	border-radius: 7px;
	color: var(--sp-text);
	font-size: 0.95rem;
	outline: none;
	transition: border-color 0.15s;
	box-sizing: border-box;
}

.sp-input:focus {
	border-color: var(--sp-accent);
}

/* =====================================================
   CODE / KEY DISPLAY
   ===================================================== */

.sp-code-box {
	background: var(--sp-surface2);
	border: 1px solid var(--sp-border);
	border-radius: 7px;
	padding: 0.6rem 1rem;
	font-family: Consolas, monospace;
	font-size: 0.95rem;
	color: var(--sp-accent2);
	word-break: break-all;
}

/* =====================================================
   BADGES / STATUS PILLS
   ===================================================== */

.sp-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
}

.sp-pill-green  { background: rgba(34,197,94,.15);  color: var(--sp-success); }
.sp-pill-red    { background: rgba(239,68,68,.15);  color: var(--sp-danger); }
.sp-pill-yellow { background: rgba(245,158,11,.15); color: var(--sp-warning); }
.sp-pill-blue   { background: rgba(6,182,212,.15);  color: var(--sp-accent2); }
.sp-pill-purple { background: rgba(124,58,237,.15); color: var(--sp-accent); }

/* =====================================================
   TABLE
   ===================================================== */

.sp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.sp-table th {
	text-align: left;
	padding: 0.6rem 0.85rem;
	color: var(--sp-text-muted);
	font-weight: 600;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-bottom: 1px solid var(--sp-border);
}

.sp-table td {
	padding: 0.7rem 0.85rem;
	border-bottom: 1px solid var(--sp-border);
	color: var(--sp-text);
	vertical-align: middle;
}

.sp-table tr:last-child td { border-bottom: none; }
.sp-table tr:hover td { background: var(--sp-surface2); }

/* =====================================================
   DOCS
   ===================================================== */

.sp-docs-layout {
	display: flex;
	gap: 2.5rem;
	max-width: 1100px;
	margin: 0 auto;
	padding: 3rem 2rem;
	align-items: flex-start;
}

.sp-docs-sidebar {
	width: 220px;
	flex-shrink: 0;
	position: sticky;
	top: calc(var(--sp-topbar-height) + 1rem);
}

.sp-docs-sidebar ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.sp-docs-sidebar a {
	display: block;
	padding: 0.45rem 0.75rem;
	border-radius: 6px;
	color: var(--sp-text-muted);
	text-decoration: none;
	font-size: 0.9rem;
	transition: background 0.15s, color 0.15s;
}

.sp-docs-sidebar a:hover { background: var(--sp-surface2); color: var(--sp-text); }

.sp-docs-content {
	flex: 1;
	min-width: 0;
	color: var(--sp-text);
	line-height: 1.7;
}

.sp-docs-content h2 {
	font-size: 1.5rem;
	font-weight: 700;
	border-bottom: 1px solid var(--sp-border);
	padding-bottom: 0.5rem;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
}

.sp-docs-content h2:first-child { margin-top: 0; }

.sp-docs-content h3 {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--sp-text);
	margin-top: 1.5rem;
}

.sp-docs-content p, .sp-docs-content li {
	color: var(--sp-text-muted);
	font-size: 0.95rem;
}

.sp-docs-content code {
	background: var(--sp-surface2);
	border: 1px solid var(--sp-border);
	border-radius: 4px;
	padding: 0.1em 0.4em;
	font-family: Consolas, monospace;
	font-size: 0.875em;
	color: var(--sp-accent2);
}

.sp-docs-content pre {
	background: var(--sp-surface2);
	border: 1px solid var(--sp-border);
	border-radius: 8px;
	padding: 1rem 1.25rem;
	overflow-x: auto;
	font-family: Consolas, monospace;
	font-size: 0.875rem;
	color: var(--sp-accent2);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {
	.sp-dashboard-sidebar,
	.sp-admin-sidebar {
		display: none;
	}

	.sp-docs-layout {
		flex-direction: column;
	}

	.sp-docs-sidebar {
		width: 100%;
		position: static;
	}

	.sp-navbar-nav {
		display: none;
	}
}

/* Manage Nav */
.sp-manage-nav-active { background: rgba(145,71,255,.15); color: var(--sp-accent1) !important; font-weight: 600; }

/* =====================================================
   MAIN LAYOUT – Global TopBar + Body
   ===================================================== */

html, body {
    margin: 0;
    padding: 0;
    background: var(--sp-bg);
    color: var(--sp-text);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
}

/* Entfernt das alte Bootstrap .page/.sidebar-Layout */
.page { all: unset; display: contents; }
.sidebar { display: none !important; }

.sp-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sp-main {
    flex: 1;
    background: var(--sp-bg);
    color: var(--sp-text);
}

/* TopBar (MainLayout NavMenu) */
.sp-topbar {
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: var(--sp-topbar-height);
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--sp-border);
    gap: 1.5rem;
}

.sp-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--sp-text);
    text-decoration: none;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--sp-accent), var(--sp-accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sp-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    flex: 1;
    flex-wrap: wrap;
}

.sp-nav-link {
    color: var(--sp-text-muted);
    text-decoration: none;
    padding: .38rem .85rem;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 500;
    transition: color .15s, background .15s;
    white-space: nowrap;
}

.sp-nav-link:hover,
.sp-nav-link.active {
    color: var(--sp-text);
    background: var(--sp-surface2);
}

.sp-nav-link-cta {
    background: var(--sp-accent);
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    border-radius: 7px;
    padding: .38rem 1rem;
}

.sp-nav-link-cta:hover {
    background: var(--sp-accent-hover);
}

.sp-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--sp-text);
    font-size: 1.4rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .sp-nav-toggle { display: block; }
    .sp-nav {
        display: none;
        position: absolute;
        top: var(--sp-topbar-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--sp-surface);
        border-bottom: 1px solid var(--sp-border);
        padding: 1rem;
        gap: .25rem;
        z-index: 199;
    }
    .sp-nav.sp-nav-open { display: flex; }
    .sp-nav-link { width: 100%; }
}
