/* =========================================================
   PNSQC 2026 CONFERENCE APP - APPLE iOS & GOOGLE MATERIAL 3
   Pacific Northwest Software Quality Conference
   ========================================================= */

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

:root {
	color-scheme: light dark;
	
	/* Core Brand Tokens (PNSQC Pacific Northwest Spruce & Ocean) */
	--pnsqc-primary: #0284c7;
	--pnsqc-emerald: #059669;
	--pnsqc-purple: #7c3aed;
	--pnsqc-amber: #d97706;
	--pnsqc-dark: #0f172a;

	/* Apple iOS Mode Defaults */
	--apple-bg: #f2f2f7;
	--apple-card: rgba(255, 255, 255, 0.88);
	--apple-card-solid: #ffffff;
	--apple-border: rgba(60, 60, 67, 0.12);
	--apple-fg: #000000;
	--apple-secondary: #8e8e93;
	--apple-blue: #007aff;
	--apple-green: #34c759;
	--apple-orange: #ff9500;
	--apple-red: #ff3b30;
	--apple-glass: rgba(255, 255, 255, 0.75);
	--apple-bar: rgba(246, 246, 246, 0.85);

	/* Google Android Material 3 Defaults */
	--md3-primary: #00658f;
	--md3-on-primary: #ffffff;
	--md3-primary-container: #c7e7ff;
	--md3-on-primary-container: #001e2e;
	--md3-secondary: #4f606e;
	--md3-secondary-container: #d2e4f5;
	--md3-surface: #f8f9fa;
	--md3-surface-container: #f0f4f8;
	--md3-surface-high: #e7eef4;
	--md3-outline: #72777f;
	--md3-outline-variant: #c2c7cf;
	--md3-on-surface: #191c1e;
	--md3-on-surface-variant: #42474e;
	--md3-tertiary: #63597c;
	--md3-tertiary-container: #e9ddff;

	/* Active Theme variables (switched dynamically) */
	--bg: #f4f6f9;
	--fg: #0f172a;
	--muted: #64748b;
	--border: #e2e8f0;
	--accent: #0284c7;
	--radius: 14px;
	--space: 1rem;
	--font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--font-mono: "JetBrains Mono", monospace;
}

[data-theme="dark"] {
	--apple-bg: #000000;
	--apple-card: rgba(28, 28, 30, 0.85);
	--apple-card-solid: #1c1c1e;
	--apple-border: rgba(255, 255, 255, 0.14);
	--apple-fg: #ffffff;
	--apple-secondary: #98989d;
	--apple-blue: #0a84ff;
	--apple-green: #30d158;
	--apple-glass: rgba(30, 30, 30, 0.75);
	--apple-bar: rgba(20, 20, 20, 0.85);

	--md3-primary: #83cfff;
	--md3-on-primary: #00344c;
	--md3-primary-container: #004c6d;
	--md3-on-primary-container: #c7e7ff;
	--md3-surface: #101417;
	--md3-surface-container: #191c20;
	--md3-surface-high: #23272b;
	--md3-outline: #8c9199;
	--md3-outline-variant: #42474e;
	--md3-on-surface: #e1e2e5;
	--md3-on-surface-variant: #c2c7cf;
	--md3-tertiary: #cebfe4;

	--bg: #090d16;
	--fg: #f1f5f9;
	--muted: #94a3b8;
	--border: #1e293b;
	--accent: #38bdf8;
}

* {
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

html, body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	font-family: var(--font);
	background: #0b1120;
	color: #e2e8f0;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* Master Space / App Layout */
.app-viewport {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	background: radial-gradient(circle at 50% 0%, #1e293b 0%, #0a0f1d 100%);
	align-items: center;
	padding: 0.75rem 0.5rem 2rem;
}

/* Top Universal Bar (Platform / OS Switcher) */
.universal-bar {
	width: 100%;
	max-width: 960px;
	margin: 0 auto 0.75rem;
	background: rgba(15, 23, 42, 0.85);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 18px;
	padding: 0.5rem 0.85rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	z-index: 100;
}

.brand-pill {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.brand-logo-icon {
	width: 32px;
	height: 32px;
	background: linear-gradient(135deg, #0284c7, #059669);
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 800;
	font-size: 0.95rem;
	letter-spacing: -0.05em;
	box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.brand-title {
	font-weight: 700;
	font-size: 0.95rem;
	color: #f8fafc;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.brand-tag {
	font-size: 0.7rem;
	padding: 0.15rem 0.45rem;
	background: rgba(56, 189, 248, 0.15);
	color: #38bdf8;
	border-radius: 999px;
	font-weight: 600;
}

.platform-switch-group {
	display: flex;
	align-items: center;
	background: rgba(30, 41, 59, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 999px;
	padding: 3px;
	gap: 2px;
}

.platform-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 600;
	color: #94a3b8;
	background: transparent;
	border: none;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.platform-btn:hover {
	color: #f8fafc;
}

.platform-btn.active-apple {
	background: #ffffff;
	color: #000000;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.platform-btn.active-google {
	background: #00658f;
	color: #ffffff;
	box-shadow: 0 2px 8px rgba(0, 101, 143, 0.4);
}

.platform-btn.active-web {
	background: #334155;
	color: #ffffff;
}

.tool-controls {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.icon-btn {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #cbd5e1;
	border-radius: 10px;
	padding: 0.35rem 0.6rem;
	font-size: 0.8rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 500;
	transition: background 0.15s;
}

.icon-btn:hover {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

/* Device Frame Simulation Container */
.device-wrapper {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 0.5rem;
}

/* iPhone 16 Pro Mockup Frame */
.device-frame-apple {
	width: 100%;
	max-width: 416px;
	height: 870px;
	background: var(--apple-bg);
	color: var(--apple-fg);
	border-radius: 52px;
	border: 11px solid #2b2b2e;
	box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.65), 0 0 0 2px rgba(255, 255, 255, 0.12), inset 0 0 0 2px rgba(0, 0, 0, 0.8);
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", sans-serif;
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Google Pixel 9 Pro Material 3 Mockup Frame */
.device-frame-google {
	width: 100%;
	max-width: 420px;
	height: 870px;
	background: var(--md3-surface);
	color: var(--md3-on-surface);
	border-radius: 44px;
	border: 10px solid #1a1e24;
	box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.65), 0 0 0 2px rgba(255, 255, 255, 0.08), inset 0 0 0 2px rgba(0, 0, 0, 0.8);
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	font-family: "Google Sans", "Roboto", system-ui, sans-serif;
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Responsive / Tablet / Desktop Mode */
.device-frame-web {
	width: 100%;
	max-width: 960px;
	min-height: 820px;
	background: #0f172a;
	color: #f1f5f9;
	border-radius: 20px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* Apple Status Bar & Dynamic Island */
.ios-status-bar {
	height: 48px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 1.5rem;
	font-size: 0.85rem;
	font-weight: 600;
	position: relative;
	z-index: 50;
}

.dynamic-island {
	position: absolute;
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
	width: 124px;
	height: 34px;
	background: #000000;
	border-radius: 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 10px;
	color: #ffffff;
	font-size: 0.72rem;
	transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
	z-index: 60;
}

.dynamic-island.expanded {
	width: 320px;
	height: 80px;
	border-radius: 26px;
	padding: 12px 16px;
	flex-direction: column;
	align-items: stretch;
	justify-content: space-between;
}

.dynamic-island-wave {
	display: flex;
	align-items: center;
	gap: 2px;
}

.dynamic-island-wave span {
	display: block;
	width: 3px;
	height: 10px;
	background: #34c759;
	border-radius: 2px;
	animation: island-pulse 1.2s ease-in-out infinite alternate;
}

.dynamic-island-wave span:nth-child(2) { height: 16px; animation-delay: 0.2s; }
.dynamic-island-wave span:nth-child(3) { height: 8px; animation-delay: 0.4s; }

@keyframes island-pulse {
	0% { transform: scaleY(0.4); }
	100% { transform: scaleY(1.2); }
}

/* Google Android Status Bar */
.android-status-bar {
	height: 38px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 1.25rem;
	font-size: 0.8rem;
	font-weight: 500;
	position: relative;
	z-index: 50;
	color: var(--md3-on-surface);
}

.android-camera-punchhole {
	position: absolute;
	top: 8px;
	left: 50%;
	transform: translateX(-50%);
	width: 12px;
	height: 12px;
	background: #000;
	border-radius: 50%;
}

/* Scrollable Main Screen Body */
.screen-scroll-body {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 0.5rem 1rem 5.5rem;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
}

/* iOS Navigation Header */
.ios-nav-header {
	padding: 0.5rem 0 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.ios-large-title {
	font-size: 1.85rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--apple-fg);
	margin: 0;
	line-height: 1.15;
}

.ios-subtitle {
	font-size: 0.85rem;
	color: var(--apple-secondary);
	margin: 0;
	font-weight: 500;
}

/* iOS Segmented Control (Picker) */
.ios-segmented-control {
	display: flex;
	background: rgba(118, 118, 128, 0.14);
	border-radius: 9px;
	padding: 2px;
	margin: 0.75rem 0 1rem;
	gap: 2px;
}

.ios-segment-tab {
	flex: 1;
	text-align: center;
	padding: 0.4rem 0.25rem;
	font-size: 0.8rem;
	font-weight: 600;
	border-radius: 7px;
	border: none;
	background: transparent;
	color: var(--apple-fg);
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ios-segment-tab.active {
	background: var(--apple-card-solid);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Apple Inset Grouped Card */
.ios-card {
	background: var(--apple-card);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid var(--apple-border);
	border-radius: 16px;
	padding: 1rem;
	margin-bottom: 0.85rem;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ios-card:active {
	transform: scale(0.99);
}

/* Google Material 3 App Bar */
.md3-app-bar {
	padding: 0.75rem 0.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.md3-headline {
	font-size: 1.45rem;
	font-weight: 700;
	margin: 0;
	color: var(--md3-on-surface);
	letter-spacing: -0.01em;
}

/* Google Material 3 Filter Chips */
.md3-chips-scroll {
	display: flex;
	gap: 0.5rem;
	overflow-x: auto;
	padding: 0.25rem 0 0.85rem;
	scrollbar-width: none;
}

.md3-chips-scroll::-webkit-scrollbar {
	display: none;
}

.md3-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.85rem;
	border-radius: 8px;
	font-size: 0.825rem;
	font-weight: 600;
	border: 1px solid var(--md3-outline-variant);
	background: transparent;
	color: var(--md3-on-surface-variant);
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.2s;
}

.md3-chip.active {
	background: var(--md3-secondary-container);
	color: var(--md3-on-primary-container);
	border-color: transparent;
}

/* Google Material 3 Elevated Card */
.md3-card {
	background: var(--md3-surface-container);
	border-radius: 20px;
	padding: 1.1rem;
	margin-bottom: 0.85rem;
	border: 1px solid rgba(0, 0, 0, 0.04);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	transition: transform 0.2s, box-shadow 0.2s;
}

/* iOS Bottom Tab Bar */
.ios-tab-bar {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 68px;
	background: var(--apple-bar);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border-top: 1px solid var(--apple-border);
	display: flex;
	align-items: center;
	justify-content: space-around;
	padding-bottom: 12px;
	z-index: 80;
}

.ios-tab-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	background: transparent;
	border: none;
	cursor: pointer;
	color: var(--apple-secondary);
	font-size: 0.65rem;
	font-weight: 600;
	padding: 4px 10px;
	transition: color 0.15s;
}

.ios-tab-item.active {
	color: var(--apple-blue);
}

.ios-home-indicator {
	position: absolute;
	bottom: 6px;
	left: 50%;
	transform: translateX(-50%);
	width: 134px;
	height: 5px;
	background: var(--apple-fg);
	opacity: 0.3;
	border-radius: 3px;
	pointer-events: none;
	z-index: 90;
}

/* Google Material 3 Bottom Navigation Bar */
.md3-nav-bar {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 72px;
	background: var(--md3-surface-container);
	display: flex;
	align-items: center;
	justify-content: space-around;
	padding-bottom: 8px;
	border-top: 1px solid var(--md3-outline-variant);
	z-index: 80;
}

.md3-nav-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	background: transparent;
	border: none;
	cursor: pointer;
	color: var(--md3-on-surface-variant);
	font-size: 0.7rem;
	font-weight: 600;
	padding: 4px 6px;
}

.md3-pill-icon {
	padding: 3px 18px;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.md3-nav-item.active .md3-pill-icon {
	background: var(--md3-secondary-container);
	color: var(--md3-on-primary-container);
}

.md3-nav-item.active {
	color: var(--md3-on-surface);
}

.android-gesture-bar {
	position: absolute;
	bottom: 4px;
	left: 50%;
	transform: translateX(-50%);
	width: 80px;
	height: 4px;
	background: var(--md3-on-surface);
	opacity: 0.35;
	border-radius: 2px;
	pointer-events: none;
	z-index: 90;
}

/* Session Item Cards */
.session-card {
	position: relative;
	overflow: hidden;
}

.session-header-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.4rem;
}

.track-badge {
	font-size: 0.72rem;
	font-weight: 700;
	padding: 0.2rem 0.55rem;
	border-radius: 6px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.session-title {
	font-size: 0.98rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 0.25rem 0 0.45rem;
}

.session-meta-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.65rem;
	font-size: 0.78rem;
	opacity: 0.8;
	margin-bottom: 0.6rem;
}

.speaker-micro-badge {
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.speaker-avatar-micro {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	object-fit: cover;
}

/* Wallet Pass / Badge Styles */
.wallet-pass-card {
	background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
	color: #ffffff;
	border-radius: 24px;
	padding: 1.5rem;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
	position: relative;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.15);
}

.wallet-pass-card::before {
	content: "";
	position: absolute;
	top: -50px;
	right: -50px;
	width: 140px;
	height: 140px;
	background: radial-gradient(circle, rgba(2, 132, 199, 0.35) 0%, transparent 70%);
	pointer-events: none;
}

.wallet-apple-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
	padding-bottom: 0.85rem;
	margin-bottom: 1rem;
}

.qr-code-box {
	background: #ffffff;
	padding: 0.75rem;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
}

/* Interactive Floating FAB for Q&A (Google) */
.md3-fab {
	position: absolute;
	bottom: 84px;
	right: 18px;
	background: var(--md3-primary-container);
	color: var(--md3-on-primary-container);
	border: none;
	border-radius: 16px;
	padding: 0.85rem 1.15rem;
	font-weight: 700;
	font-size: 0.85rem;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	z-index: 70;
	transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.md3-fab:hover {
	transform: scale(1.04);
}

/* Modal / Bottom Sheet */
.modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	display: flex;
	align-items: flex-end;
	z-index: 120;
}

.bottom-sheet {
	width: 100%;
	background: var(--apple-card-solid);
	color: var(--apple-fg);
	border-radius: 28px 28px 0 0;
	padding: 1.25rem 1.25rem 2rem;
	max-height: 85%;
	overflow-y: auto;
	box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
	animation: slide-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-up {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}

.sheet-handle {
	width: 36px;
	height: 4px;
	background: rgba(120, 120, 128, 0.3);
	border-radius: 2px;
	margin: 0 auto 0.85rem;
}

/* Live Poll Progress Bars */
.poll-option-btn {
	width: 100%;
	text-align: left;
	padding: 0.85rem 1rem;
	border-radius: 12px;
	border: 1px solid var(--border);
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	margin-bottom: 0.65rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.poll-option-fill {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	background: rgba(2, 132, 199, 0.18);
	z-index: 1;
	transition: width 0.4s ease;
}

.poll-option-content {
	position: relative;
	z-index: 2;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 600;
	font-size: 0.88rem;
}

/* Custom Checkbox / Heart Bookmarking */
.bookmark-btn {
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 6px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	transition: transform 0.15s, color 0.15s;
}

.bookmark-btn:hover {
	transform: scale(1.15);
}

.bookmark-btn.saved {
	color: #ef4444;
}

/* Maturity Assessment Quiz Card */
.maturity-card {
	border-left: 4px solid var(--pnsqc-primary);
	padding: 1rem;
	background: rgba(2, 132, 199, 0.06);
	border-radius: 12px;
	margin-bottom: 1rem;
}

/* Responsive Utilities */
@media (max-width: 480px) {
	.device-frame-apple, .device-frame-google {
		border-radius: 0;
		border: none;
		height: 100vh;
		max-width: 100%;
		box-shadow: none;
	}
	.universal-bar {
		border-radius: 12px;
	}
}
