/* WireGuard Dashboard - VPN Tunnel Theme  * Version: 0.3.0
 */
/* Copyright (C) 2024 CyberMind.fr - Gandalf  * Version: 0.3.0
 */

:root {
	--wg-bg-primary: #030712;
	--wg-bg-secondary: #0f172a;
	--wg-bg-tertiary: #1e293b;
	--wg-bg-card: linear-gradient(180deg, #0f172a 0%, #030712 100%);
	--wg-border: #334155;
	--wg-border-light: #475569;
	
	--wg-text-primary: #f8fafc;
	--wg-text-secondary: #94a3b8;
	--wg-text-muted: #64748b;
	
	--wg-accent-cyan: #06b6d4;
	--wg-accent-cyan-light: #22d3ee;
	--wg-accent-cyan-glow: rgba(6, 182, 212, 0.4);
	--wg-accent-blue: #0ea5e9;
	--wg-accent-indigo: #6366f1;
	--wg-accent-green: #10b981;
	--wg-accent-yellow: #f59e0b;
	--wg-accent-red: #ef4444;
	--wg-accent-purple: #a855f7;
	
	--wg-tunnel-gradient: linear-gradient(135deg, #06b6d4, #0ea5e9, #6366f1);
	
	--wg-font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
	--wg-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	
	--wg-radius: 8px;
	--wg-radius-lg: 12px;
	--wg-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
	--wg-shadow-glow: 0 0 30px var(--wg-accent-cyan-glow);
}

/* Base */
.wireguard-dashboard {
	font-family: var(--wg-font-sans);
	background: var(--wg-bg-primary);
	color: var(--wg-text-primary);
	min-height: 100vh;
	padding: 16px;
}

.wireguard-dashboard * {
	box-sizing: border-box;
}

/* Header */
.wg-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 0 20px;
	border-bottom: 1px solid var(--wg-border);
	margin-bottom: 20px;
}

.wg-logo {
	display: flex;
	align-items: center;
	gap: 14px;
}

.wg-logo-icon {
	width: 46px;
	height: 46px;
	background: var(--wg-tunnel-gradient);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	box-shadow: var(--wg-shadow-glow);
	position: relative;
}

.wg-logo-icon::after {
	content: '';
	position: absolute;
	inset: -2px;
	background: var(--wg-tunnel-gradient);
	border-radius: 14px;
	z-index: -1;
	opacity: 0.4;
	filter: blur(8px);
}

.wg-logo-text {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.5px;
}

.wg-logo-text span {
	background: var(--wg-tunnel-gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.wg-header-info {
	display: flex;
	align-items: center;
	gap: 16px;
}

.wg-status-badge {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 16px;
	border-radius: 24px;
	background: rgba(6, 182, 212, 0.15);
	color: var(--wg-accent-cyan);
	border: 1px solid rgba(6, 182, 212, 0.3);
}

.wg-status-badge.offline {
	background: rgba(239, 68, 68, 0.15);
	color: var(--wg-accent-red);
	border-color: rgba(239, 68, 68, 0.3);
}

.wg-status-dot {
	width: 10px;
	height: 10px;
	background: currentColor;
	border-radius: 50%;
	animation: pulse-wg 1.5s ease-in-out infinite;
	box-shadow: 0 0 10px currentColor;
}

@keyframes pulse-wg {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.6; transform: scale(0.85); }
}

/* Quick Stats */
.wg-quick-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
	margin-bottom: 24px;
}

.wg-quick-stat {
	background: var(--wg-bg-secondary);
	border: 1px solid var(--wg-border);
	border-radius: var(--wg-radius-lg);
	padding: 20px;
	position: relative;
	overflow: hidden;
	transition: all 0.3s;
}

.wg-quick-stat::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--stat-gradient, var(--wg-tunnel-gradient));
}

.wg-quick-stat:hover {
	border-color: var(--wg-accent-cyan);
	transform: translateY(-3px);
	box-shadow: var(--wg-shadow-glow);
}

.wg-quick-stat-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.wg-quick-stat-icon {
	font-size: 22px;
}

.wg-quick-stat-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--wg-text-muted);
}

.wg-quick-stat-value {
	font-family: var(--wg-font-mono);
	font-size: 32px;
	font-weight: 700;
	line-height: 1;
	background: var(--stat-gradient, var(--wg-tunnel-gradient));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.wg-quick-stat-sub {
	font-size: 11px;
	color: var(--wg-text-muted);
	margin-top: 6px;
}

/* Card */
.wg-card {
	background: var(--wg-bg-secondary);
	border: 1px solid var(--wg-border);
	border-radius: var(--wg-radius-lg);
	overflow: hidden;
	margin-bottom: 20px;
}

.wg-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--wg-border);
	background: rgba(0, 0, 0, 0.3);
}

.wg-card-title {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 15px;
	font-weight: 600;
}

.wg-card-title-icon {
	font-size: 20px;
}

.wg-card-badge {
	font-family: var(--wg-font-mono);
	font-size: 12px;
	font-weight: 600;
	padding: 5px 12px;
	border-radius: 16px;
	background: var(--wg-tunnel-gradient);
	color: white;
}

.wg-card-body {
	padding: 20px;
}

/* Charts Grid */
.wg-charts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
	gap: 20px;
}

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

/* Interface Card */
.wg-interface-card {
	background: linear-gradient(135deg, var(--wg-bg-tertiary), var(--wg-bg-secondary));
	border: 1px solid var(--wg-border);
	border-radius: var(--wg-radius-lg);
	padding: 20px;
	position: relative;
	overflow: hidden;
}

.wg-interface-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: var(--wg-tunnel-gradient);
}

.wg-interface-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.wg-interface-name {
	display: flex;
	align-items: center;
	gap: 12px;
}

.wg-interface-icon {
	width: 44px;
	height: 44px;
	background: var(--wg-tunnel-gradient);
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
}

.wg-interface-name h3 {
	font-size: 18px;
	font-weight: 700;
	margin: 0;
}

.wg-interface-name p {
	font-size: 11px;
	color: var(--wg-text-muted);
	margin: 2px 0 0 0;
}

.wg-interface-status {
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.wg-interface-status.up {
	background: rgba(16, 185, 129, 0.15);
	color: var(--wg-accent-green);
}

.wg-interface-status.down {
	background: rgba(239, 68, 68, 0.15);
	color: var(--wg-accent-red);
}

.wg-interface-details {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.wg-interface-detail {
	padding: 12px;
	background: var(--wg-bg-primary);
	border-radius: var(--wg-radius);
}

.wg-interface-detail-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--wg-text-muted);
	margin-bottom: 4px;
}

.wg-interface-detail-value {
	font-family: var(--wg-font-mono);
	font-size: 13px;
	color: var(--wg-text-primary);
	word-break: break-all;
}

/* Peer Card */
.wg-peer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 16px;
}

.wg-peer-card {
	background: var(--wg-bg-tertiary);
	border: 1px solid var(--wg-border);
	border-radius: var(--wg-radius-lg);
	padding: 18px;
	transition: all 0.3s;
	position: relative;
}

.wg-peer-card:hover {
	border-color: var(--wg-accent-cyan);
	transform: translateY(-2px);
}

.wg-peer-card.active {
	border-color: var(--wg-accent-green);
}

.wg-peer-card.active::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--wg-accent-green);
}

.wg-peer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.wg-peer-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.wg-peer-icon {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: var(--wg-bg-secondary);
	border: 1px solid var(--wg-border);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
}

.wg-peer-card.active .wg-peer-icon {
	background: rgba(16, 185, 129, 0.15);
	border-color: var(--wg-accent-green);
}

.wg-peer-name {
	font-size: 14px;
	font-weight: 600;
	margin: 0;
}

.wg-peer-key {
	font-family: var(--wg-font-mono);
	font-size: 10px;
	color: var(--wg-text-muted);
	margin: 2px 0 0 0;
}

.wg-peer-status {
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
}

.wg-peer-status.active {
	background: rgba(16, 185, 129, 0.15);
	color: var(--wg-accent-green);
}

.wg-peer-status.idle {
	background: rgba(245, 158, 11, 0.15);
	color: var(--wg-accent-yellow);
}

.wg-peer-status.inactive {
	background: rgba(100, 116, 139, 0.15);
	color: var(--wg-text-muted);
}

.wg-peer-details {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	font-size: 12px;
}

.wg-peer-detail {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.wg-peer-detail-label {
	font-size: 9px;
	text-transform: uppercase;
	color: var(--wg-text-muted);
}

.wg-peer-detail-value {
	font-family: var(--wg-font-mono);
	font-size: 11px;
	color: var(--wg-text-secondary);
}

.wg-peer-traffic {
	display: flex;
	justify-content: space-between;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--wg-border);
}

.wg-peer-traffic-item {
	text-align: center;
}

.wg-peer-traffic-icon {
	font-size: 16px;
	margin-bottom: 4px;
}

.wg-peer-traffic-value {
	font-family: var(--wg-font-mono);
	font-size: 14px;
	font-weight: 600;
}

.wg-peer-traffic-value.rx { color: var(--wg-accent-green); }
.wg-peer-traffic-value.tx { color: var(--wg-accent-blue); }

.wg-peer-traffic-label {
	font-size: 9px;
	text-transform: uppercase;
	color: var(--wg-text-muted);
}

/* Traffic Bar */
.wg-traffic-bar {
	margin-top: 12px;
}

.wg-traffic-bar-header {
	display: flex;
	justify-content: space-between;
	margin-bottom: 6px;
	font-size: 11px;
}

.wg-traffic-bar-track {
	height: 8px;
	background: var(--wg-bg-primary);
	border-radius: 4px;
	overflow: hidden;
	display: flex;
}

.wg-traffic-bar-rx {
	height: 100%;
	background: linear-gradient(90deg, #10b981, #34d399);
	transition: width 0.5s ease;
}

.wg-traffic-bar-tx {
	height: 100%;
	background: linear-gradient(90deg, #0ea5e9, #38bdf8);
	transition: width 0.5s ease;
}

/* Table */
.wg-table-container {
	overflow-x: auto;
}

.wg-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.wg-table th {
	text-align: left;
	padding: 14px 16px;
	background: var(--wg-bg-tertiary);
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--wg-text-muted);
	border-bottom: 1px solid var(--wg-border);
}

.wg-table td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--wg-border);
}

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

.wg-table tr:hover td {
	background: rgba(6, 182, 212, 0.05);
}

.wg-table .mono {
	font-family: var(--wg-font-mono);
	font-size: 12px;
}

.wg-table .key {
	color: var(--wg-accent-cyan);
}

/* Tunnel Visualization */
.wg-tunnel-viz {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	padding: 30px;
	background: var(--wg-bg-primary);
	border-radius: var(--wg-radius);
	margin-top: 16px;
}

.wg-tunnel-node {
	text-align: center;
}

.wg-tunnel-node-icon {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--wg-bg-tertiary);
	border: 2px solid var(--wg-border);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	margin-bottom: 8px;
}

.wg-tunnel-node-label {
	font-size: 11px;
	color: var(--wg-text-secondary);
}

.wg-tunnel-line {
	flex: 1;
	height: 4px;
	background: var(--wg-tunnel-gradient);
	border-radius: 2px;
	position: relative;
	max-width: 200px;
}

.wg-tunnel-line::before {
	content: '🔒';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: var(--wg-bg-primary);
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 14px;
}

/* Handshake indicator */
.wg-handshake {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
}

.wg-handshake-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

.wg-handshake-dot.recent { background: var(--wg-accent-green); }
.wg-handshake-dot.old { background: var(--wg-accent-yellow); }
.wg-handshake-dot.none { background: var(--wg-text-muted); }

/* Config display */
.wg-config-block {
	background: var(--wg-bg-primary);
	border: 1px solid var(--wg-border);
	border-radius: var(--wg-radius);
	padding: 16px;
	font-family: var(--wg-font-mono);
	font-size: 12px;
	line-height: 1.6;
	overflow-x: auto;
}

.wg-config-section {
	color: var(--wg-accent-cyan);
	font-weight: 600;
}

.wg-config-key {
	color: var(--wg-accent-purple);
}

.wg-config-value {
	color: var(--wg-text-secondary);
}

/* Empty state */
.wg-empty {
	text-align: center;
	padding: 60px 20px;
	color: var(--wg-text-muted);
}

.wg-empty-icon {
	font-size: 64px;
	margin-bottom: 16px;
	opacity: 0.5;
}

.wg-empty-text {
	font-size: 16px;
	margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
	.wg-header {
		flex-direction: column;
		gap: 16px;
		align-items: flex-start;
	}
	
	.wg-quick-stats {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.wg-quick-stat-value {
		font-size: 24px;
	}
	
	.wg-peer-grid {
		grid-template-columns: 1fr;
	}
	
	.wg-interface-details {
		grid-template-columns: 1fr;
	}
}

/* Scrollbar */
.wireguard-dashboard ::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

.wireguard-dashboard ::-webkit-scrollbar-track {
	background: var(--wg-bg-tertiary);
}

.wireguard-dashboard ::-webkit-scrollbar-thumb {
	background: var(--wg-border);
	border-radius: 4px;
}

.wireguard-dashboard ::-webkit-scrollbar-thumb:hover {
	background: var(--wg-text-muted);
}

/* Animations */
@keyframes tunnel-flow {
	0% { background-position: 0% 50%; }
	100% { background-position: 100% 50%; }
}

.wg-tunnel-active {
	background-size: 200% 100%;
	animation: tunnel-flow 2s linear infinite;
}

/* Public key display */
.wg-pubkey {
	font-family: var(--wg-font-mono);
	font-size: 11px;
	padding: 6px 10px;
	background: var(--wg-bg-primary);
	border-radius: 6px;
	word-break: break-all;
	color: var(--wg-accent-cyan);
}

/* Button */
.wg-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid var(--wg-border);
	border-radius: var(--wg-radius);
	background: var(--wg-bg-tertiary);
	color: var(--wg-text-primary);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
}

.wg-btn:hover {
	border-color: var(--wg-accent-cyan);
}

.wg-btn-primary {
	background: var(--wg-tunnel-gradient);
	border: none;
	color: white;
}

.wg-btn-primary:hover {
	box-shadow: var(--wg-shadow-glow);
}

.wg-btn-sm {
	padding: 6px 12px;
	font-size: 12px;
}

.wg-btn-xs {
	padding: 4px 8px;
	font-size: 11px;
	gap: 4px;
}

.wg-btn-success {
	background: linear-gradient(135deg, var(--wg-accent-green), #059669);
	border: none;
	color: white;
}

.wg-btn-success:hover {
	box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.wg-btn-warning {
	background: linear-gradient(135deg, var(--wg-accent-yellow), #d97706);
	border: none;
	color: white;
}

.wg-btn-warning:hover {
	box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.wg-btn-danger {
	background: linear-gradient(135deg, var(--wg-accent-red), #dc2626);
	border: none;
	color: white;
}

.wg-btn-danger:hover {
	box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

/* Interface controls */
.wg-interface-controls {
	display: flex;
	gap: 8px;
	padding-top: 12px;
	margin-top: 12px;
	border-top: 1px solid var(--wg-border);
	justify-content: flex-end;
}

/* Peer actions */
.wg-peer-actions {
	display: flex;
	gap: 6px;
	padding-top: 10px;
	margin-top: 10px;
	border-top: 1px solid var(--wg-border);
	justify-content: center;
}

/* Auto-refresh control */
.wg-refresh-control {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
	margin-bottom: 16px;
	padding: 12px 16px;
	background: var(--wg-bg-secondary);
	border: 1px solid var(--wg-border);
	border-radius: var(--wg-radius);
}

.wg-refresh-status {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--wg-text-secondary);
}

.wg-refresh-indicator {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wg-text-muted);
}

.wg-refresh-indicator.active {
	background: var(--wg-accent-green);
	animation: pulse-wg 1.5s ease-in-out infinite;
	box-shadow: 0 0 8px var(--wg-accent-green);
}

.wg-refresh-state {
	font-weight: 600;
}

/* Value update animation */
@keyframes value-flash {
	0% { background-color: transparent; }
	50% { background-color: rgba(6, 182, 212, 0.3); }
	100% { background-color: transparent; }
}

.wg-value-updated {
	animation: value-flash 0.5s ease-out;
	border-radius: 4px;
}

/* Interface tabs */
.wg-interface-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--wg-border);
	overflow-x: auto;
}

.wg-tab {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	background: var(--wg-bg-tertiary);
	border: 1px solid var(--wg-border);
	border-radius: 8px;
	color: var(--wg-text-secondary);
	cursor: pointer;
	transition: all 0.2s;
	white-space: nowrap;
	font-size: 13px;
}

.wg-tab:hover {
	border-color: var(--wg-accent-cyan);
}

.wg-tab.active {
	background: var(--wg-tunnel-gradient);
	border-color: transparent;
	color: white;
}

.wg-tab-badge {
	background: rgba(255, 255, 255, 0.2);
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
}

/* Wizard stepper */
.wg-stepper {
	display: flex;
	justify-content: space-between;
	margin-bottom: 24px;
	padding: 0 20px;
}

.wg-stepper-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	flex: 1;
	position: relative;
}

.wg-stepper-item:not(:last-child)::after {
	content: '';
	position: absolute;
	top: 16px;
	left: calc(50% + 20px);
	width: calc(100% - 40px);
	height: 2px;
	background: var(--wg-border);
}

.wg-stepper-item.completed::after {
	background: var(--wg-accent-green);
}

.wg-stepper-circle {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--wg-bg-tertiary);
	border: 2px solid var(--wg-border);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 600;
	z-index: 1;
}

.wg-stepper-item.active .wg-stepper-circle {
	background: var(--wg-tunnel-gradient);
	border-color: transparent;
	color: white;
}

.wg-stepper-item.completed .wg-stepper-circle {
	background: var(--wg-accent-green);
	border-color: transparent;
	color: white;
}

.wg-stepper-title {
	font-size: 11px;
	color: var(--wg-text-muted);
	text-transform: uppercase;
}

.wg-stepper-item.active .wg-stepper-title,
.wg-stepper-item.completed .wg-stepper-title {
	color: var(--wg-text-primary);
}

/* Chart styles */
.wg-chart-container {
	background: var(--wg-bg-primary);
	border-radius: var(--wg-radius);
	padding: 20px;
	margin: 20px 0;
}

.wg-chart {
	width: 100%;
	height: 150px;
}

.wg-chart-title {
	font-size: 12px;
	color: var(--wg-text-muted);
	text-transform: uppercase;
	margin-bottom: 12px;
}

/* Traffic history */
.wg-traffic-history {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wg-traffic-history-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 12px;
	background: var(--wg-bg-tertiary);
	border-radius: var(--wg-radius);
}

.wg-traffic-history-time {
	font-size: 11px;
	color: var(--wg-text-muted);
	font-family: var(--wg-font-mono);
	min-width: 60px;
}

.wg-traffic-history-bar {
	flex: 1;
	height: 6px;
	background: var(--wg-bg-primary);
	border-radius: 3px;
	overflow: hidden;
}

.wg-traffic-history-fill {
	height: 100%;
	background: var(--wg-tunnel-gradient);
	transition: width 0.3s ease;
}

/* Interface list */
.wg-interface-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Form group */
.wg-form-group {
	margin: 16px 0;
}

.wg-form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	font-size: 13px;
}

.wg-form-row {
	display: flex;
	gap: 10px;
	align-items: center;
}

/* Notification badge */
.wg-notification {
	position: fixed;
	top: 20px;
	right: 20px;
	padding: 12px 20px;
	background: var(--wg-bg-secondary);
	border: 1px solid var(--wg-border);
	border-radius: var(--wg-radius);
	box-shadow: var(--wg-shadow);
	z-index: 1000;
	animation: slide-in 0.3s ease-out;
}

.wg-notification.success {
	border-color: var(--wg-accent-green);
}

.wg-notification.error {
	border-color: var(--wg-accent-red);
}

@keyframes slide-in {
	from {
		opacity: 0;
		transform: translateX(100px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Chart animations */
@keyframes wg-chart-draw {
	to {
		stroke-dashoffset: 0;
	}
}

.wg-chart-sparkline {
	overflow: visible;
}

.wg-chart-dot {
	animation: pulse-wg 2s ease-in-out infinite;
}

.wg-chart-body {
	display: flex;
	align-items: center;
	justify-content: center;
}

.wg-chart-legend {
	display: flex;
	gap: 16px;
	margin-top: 12px;
	justify-content: center;
}

.wg-chart-legend-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	color: var(--wg-text-secondary);
}

.wg-chart-legend-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

.wg-chart-legend-dot.rx {
	background: var(--wg-accent-green);
}

.wg-chart-legend-dot.tx {
	background: var(--wg-accent-blue);
}

/* ========== Wizard Styles ========== */

/* Tunnel type selection */
.wg-tunnel-types {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
	margin: 20px 0;
}

.wg-tunnel-type-card {
	background: var(--wg-bg-tertiary);
	border: 2px solid var(--wg-border);
	border-radius: var(--wg-radius-lg);
	padding: 24px;
	cursor: pointer;
	transition: all 0.3s;
	position: relative;
	overflow: hidden;
}

.wg-tunnel-type-card:hover {
	border-color: var(--wg-accent-cyan);
	transform: translateY(-2px);
}

.wg-tunnel-type-card.selected {
	border-color: var(--wg-accent-green);
	background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), transparent);
}

.wg-tunnel-type-card.selected::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: var(--wg-accent-green);
}

.wg-tunnel-type-icon {
	font-size: 40px;
	margin-bottom: 12px;
}

.wg-tunnel-type-name {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 8px;
}

.wg-tunnel-type-desc {
	font-size: 13px;
	color: var(--wg-text-secondary);
	line-height: 1.5;
}

.wg-tunnel-type-features {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 12px;
}

.wg-tunnel-type-feature {
	font-size: 10px;
	padding: 4px 8px;
	background: var(--wg-bg-primary);
	border-radius: 10px;
	color: var(--wg-text-muted);
}

/* Zone preset cards */
.wg-zone-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 14px;
	margin: 20px 0;
}

.wg-zone-card {
	background: var(--wg-bg-tertiary);
	border: 2px solid var(--wg-border);
	border-radius: var(--wg-radius-lg);
	padding: 20px;
	cursor: pointer;
	transition: all 0.3s;
	text-align: center;
}

.wg-zone-card:hover {
	border-color: var(--wg-accent-cyan);
	transform: translateY(-2px);
}

.wg-zone-card.selected {
	border-color: var(--zone-color, var(--wg-accent-green));
	background: linear-gradient(135deg, rgba(var(--zone-color-rgb, 16, 185, 129), 0.1), transparent);
}

.wg-zone-icon {
	font-size: 36px;
	margin-bottom: 10px;
}

.wg-zone-name {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
}

.wg-zone-desc {
	font-size: 11px;
	color: var(--wg-text-muted);
	line-height: 1.4;
}

/* Wizard form */
.wg-wizard-form {
	max-width: 600px;
	margin: 0 auto;
}

.wg-wizard-section {
	margin-bottom: 24px;
}

.wg-wizard-section-title {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wg-wizard-section-title::before {
	content: '';
	width: 4px;
	height: 16px;
	background: var(--wg-tunnel-gradient);
	border-radius: 2px;
}

/* Input styles */
.wg-input {
	width: 100%;
	padding: 12px 14px;
	background: var(--wg-bg-primary);
	border: 1px solid var(--wg-border);
	border-radius: var(--wg-radius);
	color: var(--wg-text-primary);
	font-family: var(--wg-font-mono);
	font-size: 13px;
	transition: all 0.2s;
}

.wg-input:focus {
	outline: none;
	border-color: var(--wg-accent-cyan);
	box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.wg-input::placeholder {
	color: var(--wg-text-muted);
}

.wg-select {
	width: 100%;
	padding: 12px 14px;
	background: var(--wg-bg-primary);
	border: 1px solid var(--wg-border);
	border-radius: var(--wg-radius);
	color: var(--wg-text-primary);
	font-size: 13px;
	cursor: pointer;
}

.wg-select:focus {
	outline: none;
	border-color: var(--wg-accent-cyan);
}

.wg-checkbox-group {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	background: var(--wg-bg-tertiary);
	border-radius: var(--wg-radius);
	cursor: pointer;
}

.wg-checkbox-group:hover {
	background: var(--wg-bg-secondary);
}

.wg-checkbox {
	width: 18px;
	height: 18px;
	accent-color: var(--wg-accent-cyan);
}

/* Peer list in wizard */
.wg-peer-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 16px 0;
}

.wg-peer-list-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: var(--wg-bg-tertiary);
	border: 1px solid var(--wg-border);
	border-radius: var(--wg-radius);
}

.wg-peer-list-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.wg-peer-list-icon {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	background: var(--wg-bg-primary);
}

.wg-peer-list-details h4 {
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 4px 0;
}

.wg-peer-list-details p {
	font-size: 11px;
	color: var(--wg-text-muted);
	margin: 0;
	font-family: var(--wg-font-mono);
}

.wg-peer-list-actions {
	display: flex;
	gap: 8px;
}

/* QR Code Modal */
.wg-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	animation: fade-in 0.2s ease-out;
}

@keyframes fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.wg-modal {
	background: var(--wg-bg-secondary);
	border: 1px solid var(--wg-border);
	border-radius: var(--wg-radius-lg);
	max-width: 500px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	animation: modal-slide 0.3s ease-out;
}

@keyframes modal-slide {
	from {
		opacity: 0;
		transform: translateY(-20px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.wg-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--wg-border);
}

.wg-modal-title {
	font-size: 16px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 10px;
}

.wg-modal-close {
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: var(--wg-text-muted);
	font-size: 24px;
	cursor: pointer;
	border-radius: 6px;
	transition: all 0.2s;
}

.wg-modal-close:hover {
	background: var(--wg-bg-tertiary);
	color: var(--wg-text-primary);
}

.wg-modal-body {
	padding: 24px;
}

.wg-modal-footer {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	padding: 16px 20px;
	border-top: 1px solid var(--wg-border);
}

/* QR Code display */
.wg-qr-container {
	text-align: center;
	margin: 20px 0;
}

.wg-qr-code {
	display: inline-block;
	padding: 16px;
	background: white;
	border-radius: var(--wg-radius-lg);
}

.wg-qr-code img,
.wg-qr-code svg {
	display: block;
	max-width: 200px;
	height: auto;
}

.wg-qr-hint {
	font-size: 12px;
	color: var(--wg-text-muted);
	margin-top: 12px;
}

/* Config preview */
.wg-config-preview {
	background: var(--wg-bg-primary);
	border: 1px solid var(--wg-border);
	border-radius: var(--wg-radius);
	padding: 16px;
	font-family: var(--wg-font-mono);
	font-size: 12px;
	line-height: 1.6;
	white-space: pre-wrap;
	word-break: break-all;
	max-height: 300px;
	overflow-y: auto;
}

/* Wizard navigation */
.wg-wizard-nav {
	display: flex;
	justify-content: space-between;
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid var(--wg-border);
}

/* Success state */
.wg-success-state {
	text-align: center;
	padding: 40px 20px;
}

.wg-success-icon {
	font-size: 64px;
	margin-bottom: 20px;
	animation: bounce-in 0.5s ease-out;
}

@keyframes bounce-in {
	0% { transform: scale(0); }
	50% { transform: scale(1.2); }
	100% { transform: scale(1); }
}

.wg-success-title {
	font-size: 24px;
	font-weight: 700;
	margin-bottom: 12px;
	color: var(--wg-accent-green);
}

.wg-success-desc {
	font-size: 14px;
	color: var(--wg-text-secondary);
	margin-bottom: 24px;
}

/* Loading state */
.wg-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
}

.wg-loading-spinner {
	width: 48px;
	height: 48px;
	border: 3px solid var(--wg-border);
	border-top-color: var(--wg-accent-cyan);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

.wg-loading-text {
	margin-top: 16px;
	font-size: 14px;
	color: var(--wg-text-secondary);
}

/* Info box */
.wg-info-box {
	display: flex;
	gap: 12px;
	padding: 14px 16px;
	background: rgba(6, 182, 212, 0.1);
	border: 1px solid rgba(6, 182, 212, 0.3);
	border-radius: var(--wg-radius);
	margin: 16px 0;
}

.wg-info-box-icon {
	font-size: 20px;
	flex-shrink: 0;
}

.wg-info-box-content {
	font-size: 13px;
	color: var(--wg-text-secondary);
	line-height: 1.5;
}

.wg-info-box.warning {
	background: rgba(245, 158, 11, 0.1);
	border-color: rgba(245, 158, 11, 0.3);
}

/* Copy button */
.wg-copy-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: var(--wg-bg-tertiary);
	border: 1px solid var(--wg-border);
	border-radius: 6px;
	color: var(--wg-text-secondary);
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s;
}

.wg-copy-btn:hover {
	border-color: var(--wg-accent-cyan);
	color: var(--wg-text-primary);
}

.wg-copy-btn.copied {
	border-color: var(--wg-accent-green);
	color: var(--wg-accent-green);
}

/* Endpoint detection */
.wg-endpoint-detect {
	display: flex;
	gap: 10px;
	align-items: center;
}

.wg-endpoint-detect .wg-input {
	flex: 1;
}

.wg-endpoint-status {
	font-size: 11px;
	color: var(--wg-text-muted);
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
}
