:root {
	--bg-primary: #0a0d14;
	--bg-secondary: #101622;
	--bg-card: #151d2e;
	--bg-card-hover: #1c273e;
	--bg-glass: rgba(16, 22, 34, 0.85);
	--border-color: #223048;
	--border-highlight: #334d75;
	
	--accent-cyan: #00f2fe;
	--accent-blue: #4facfe;
	--accent-emerald: #10b981;
	--accent-purple: #8b5cf6;
	--accent-amber: #f59e0b;
	--accent-rose: #f43f5e;
	
	--fg-primary: #f8fafc;
	--fg-secondary: #94a3b8;
	--fg-muted: #64748b;
	
	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace;
	
	--radius-sm: 6px;
	--radius-md: 12px;
	--radius-lg: 18px;
	--radius-full: 9999px;
	
	--shadow-glow: 0 0 25px rgba(0, 242, 254, 0.2);
	--shadow-emerald: 0 0 25px rgba(16, 185, 129, 0.2);
	--shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

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

body {
	background-color: var(--bg-primary);
	color: var(--fg-primary);
	font-family: var(--font-sans);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
	background-image: 
		radial-gradient(circle at 15% 15%, rgba(0, 242, 254, 0.05) 0%, transparent 40%),
		radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.05) 0%, transparent 40%);
	background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}
::-webkit-scrollbar-track {
	background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
	background: var(--border-color);
	border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
	background: var(--border-highlight);
}

/* App Container */
.app-shell {
	max-width: 1440px;
	margin: 0 auto;
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
	min-height: 100vh;
}

/* Header */
.app-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1.25rem;
	padding: 1.25rem 1.75rem;
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card);
	backdrop-filter: blur(12px);
}

.brand-section {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.brand-icon {
	width: 46px;
	height: 46px;
	background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
	border-radius: var(--radius-md);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #030a16;
	font-size: 1.5rem;
	box-shadow: 0 0 20px rgba(0, 242, 254, 0.35);
}

.brand-title {
	font-size: 1.4rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	background: linear-gradient(90deg, #ffffff, #a5f3fc);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.brand-subtitle {
	font-size: 0.8rem;
	color: var(--fg-secondary);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.badge-tag {
	font-size: 0.7rem;
	padding: 0.15rem 0.5rem;
	border-radius: var(--radius-full);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.badge-emerald {
	background: rgba(16, 185, 129, 0.15);
	color: var(--accent-emerald);
	border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-cyan {
	background: rgba(0, 242, 254, 0.15);
	color: var(--accent-cyan);
	border: 1px solid rgba(0, 242, 254, 0.3);
}

.badge-purple {
	background: rgba(139, 92, 246, 0.15);
	color: var(--accent-purple);
	border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-amber {
	background: rgba(245, 158, 11, 0.15);
	color: var(--accent-amber);
	border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Nav Tabs */
.nav-tabs {
	display: flex;
	gap: 0.5rem;
	background: var(--bg-secondary);
	padding: 0.35rem;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-color);
	flex-wrap: wrap;
}

.nav-tab-btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 1rem;
	border: none;
	background: transparent;
	color: var(--fg-secondary);
	font-size: 0.875rem;
	font-weight: 600;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: all 0.2s ease;
}

.nav-tab-btn:hover {
	color: var(--fg-primary);
	background: rgba(255, 255, 255, 0.04);
}

.nav-tab-btn.active {
	background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(79, 172, 254, 0.15));
	color: var(--accent-cyan);
	border: 1px solid rgba(0, 242, 254, 0.3);
	box-shadow: 0 2px 10px rgba(0, 242, 254, 0.15);
}

/* Main Grid Layout */
.layout-grid {
	display: grid;
	grid-template-columns: 360px 1fr;
	gap: 1.75rem;
}

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

/* Mobile Simulator Container */
.phone-mockup-wrapper {
	position: sticky;
	top: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.phone-frame {
	background: #000000;
	border-radius: 40px;
	padding: 12px;
	box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 0 1px #2a384e;
	position: relative;
	overflow: hidden;
}

.phone-screen {
	background: #0b101b;
	border-radius: 30px;
	overflow: hidden;
	height: 680px;
	display: flex;
	flex-direction: column;
	position: relative;
	border: 1px solid #1e293b;
}

.phone-status-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 1.25rem;
	font-size: 0.75rem;
	color: #94a3b8;
	font-weight: 600;
	background: rgba(11, 16, 27, 0.95);
}

.phone-content {
	flex: 1;
	overflow-y: auto;
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

/* VPN Master Switch */
.vpn-hero-card {
	background: linear-gradient(180deg, #131d2e 0%, #0c121d 100%);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	padding: 1.5rem 1rem;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	overflow: hidden;
}

.vpn-hero-card::before {
	content: "";
	position: absolute;
	top: -50px;
	left: 50%;
	transform: translateX(-50%);
	width: 140px;
	height: 140px;
	background: radial-gradient(circle, rgba(0, 242, 254, 0.25) 0%, transparent 70%);
	pointer-events: none;
}

.vpn-toggle-btn {
	width: 110px;
	height: 110px;
	border-radius: 50%;
	border: 4px solid var(--border-color);
	background: #111a28;
	color: #64748b;
	font-size: 2.25rem;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	margin-bottom: 0.75rem;
}

.vpn-toggle-btn.active {
	border-color: var(--accent-emerald);
	background: linear-gradient(135deg, #064e3b, #047857);
	color: #ffffff;
	box-shadow: 0 0 35px rgba(16, 185, 129, 0.4);
	animation: pulse-ring 2.5s infinite;
}

@keyframes pulse-ring {
	0% {
		box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
	}
	70% {
		box-shadow: 0 0 0 16px rgba(16, 185, 129, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
	}
}

.vpn-status-text {
	font-size: 1.1rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.vpn-status-active {
	color: var(--accent-emerald);
}

.vpn-status-inactive {
	color: var(--fg-muted);
}

/* Telemetry Gauges */
.savings-metric-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	width: 100%;
}

.metric-pill {
	background: #0e1524;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 0.75rem;
	text-align: center;
}

.metric-pill-label {
	font-size: 0.7rem;
	color: var(--fg-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.2rem;
}

.metric-pill-value {
	font-size: 1.15rem;
	font-weight: 800;
	font-family: var(--font-mono);
}

/* Mode Selection Pills */
.mode-selector-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.mode-option-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 0.9rem;
	background: #0e1626;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: all 0.2s ease;
}

.mode-option-card:hover {
	border-color: var(--border-highlight);
	background: #141f34;
}

.mode-option-card.selected {
	border-color: var(--accent-cyan);
	background: linear-gradient(90deg, rgba(0, 242, 254, 0.08), rgba(79, 172, 254, 0.03));
}

.mode-info-title {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--fg-primary);
}

.mode-info-desc {
	font-size: 0.7rem;
	color: var(--fg-secondary);
}

/* Studio & Content Area */
.studio-main {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.card-panel {
	background: var(--bg-card);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-lg);
	padding: 1.5rem;
	box-shadow: var(--shadow-card);
}

.panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 1.25rem;
	padding-bottom: 0.85rem;
	border-bottom: 1px solid var(--border-color);
}

.panel-title {
	font-size: 1.15rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--fg-primary);
}

/* Code Viewer */
.code-viewer-container {
	position: relative;
	background: #080c14;
	border: 1px solid #1a2436;
	border-radius: var(--radius-md);
	overflow: hidden;
}

.code-header-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #0f1726;
	padding: 0.6rem 1rem;
	border-bottom: 1px solid #1e2c42;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	color: var(--fg-secondary);
}

.code-snippet-pre {
	margin: 0;
	padding: 1.25rem;
	overflow-x: auto;
	font-family: var(--font-mono);
	font-size: 0.85rem;
	line-height: 1.6;
	color: #e2e8f0;
	background: transparent;
}

.code-copy-btn {
	background: #1c273e;
	border: 1px solid #2e4062;
	color: var(--accent-cyan);
	padding: 0.35rem 0.75rem;
	border-radius: var(--radius-sm);
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.4rem;
	transition: all 0.2s;
}

.code-copy-btn:hover {
	background: var(--accent-cyan);
	color: #030a16;
}

/* Live Traffic Stream Table */
.live-stream-feed {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	max-height: 380px;
	overflow-y: auto;
}

.traffic-packet-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 1rem;
	background: #0d1422;
	border: 1px solid #1c283d;
	border-radius: var(--radius-md);
	font-size: 0.85rem;
	transition: all 0.2s ease;
}

.traffic-packet-row:hover {
	background: #131c2f;
	border-color: #2b3e5e;
}

.packet-app-tag {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 600;
}

.app-circle-icon {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8rem;
	font-weight: bold;
}

/* Interactive Testing Labs */
.lab-split-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
}

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

.lab-input-area, .lab-output-area {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.lab-textarea {
	width: 100%;
	height: 180px;
	background: #090e17;
	border: 1px solid #1e2c44;
	border-radius: var(--radius-md);
	padding: 0.85rem;
	color: #e2e8f0;
	font-family: var(--font-mono);
	font-size: 0.8rem;
	resize: vertical;
	outline: none;
}

.lab-textarea:focus {
	border-color: var(--accent-cyan);
}

.action-btn-primary {
	background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
	color: #030a16;
	font-weight: 700;
	padding: 0.65rem 1.25rem;
	border-radius: var(--radius-md);
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	transition: all 0.2s;
	font-size: 0.9rem;
}

.action-btn-primary:hover {
	filter: brightness(1.1);
	box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.action-btn-secondary {
	background: #192336;
	color: var(--fg-primary);
	font-weight: 600;
	padding: 0.65rem 1.25rem;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-color);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	transition: all 0.2s;
	font-size: 0.85rem;
}

.action-btn-secondary:hover {
	background: #22314a;
	border-color: var(--border-highlight);
}

/* Highlights in Kotlin syntax */
.kw { color: #f43f5e; font-weight: bold; } /* keyword */
.kt { color: #38bdf8; font-weight: bold; } /* type */
.fn { color: #a78bfa; } /* function */
.str { color: #34d399; } /* string */
.num { color: #fbbf24; } /* number */
.cm { color: #64748b; font-style: italic; } /* comment */
.ann { color: #fb7185; } /* annotation */

/* Feature Grid */
.feature-cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1rem;
}

.feature-box {
	background: #0d1523;
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 1.2rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.feature-box-icon {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	margin-bottom: 0.25rem;
}

.feature-box-title {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--fg-primary);
}

.feature-box-desc {
	font-size: 0.8rem;
	color: var(--fg-secondary);
	line-height: 1.45;
}

/* Footer */
.app-footer {
	text-align: center;
	padding: 1.5rem 0;
	border-top: 1px solid var(--border-color);
	color: var(--fg-muted);
	font-size: 0.85rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
}
