/* Luminara Sandbox Styles */

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

html {
	scroll-behavior: smooth;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	min-height: 100vh;
	padding: 2rem 1rem;
	color: #2d3748;
}

.container {
	max-width: 1100px;
	margin: 0 auto;
	background: white;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	overflow: hidden;
}

.header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 2rem;
	text-align: center;
}

.header h1 {
	font-size: 2.5rem;
	margin-bottom: 0.5rem;
	font-weight: 700;
}

.header .emoji {
	font-size: 3rem;
	display: block;
	margin-bottom: 1rem;
}

.header p {
	font-size: 1.1rem;
	opacity: 0.95;
	line-height: 1.6;
	max-width: 800px;
	margin: 0 auto;
}

.philosophy {
	background: #f7fafc;
	padding: 2rem;
	border-bottom: 1px solid #e2e8f0;
}

.philosophy h2 {
	color: #667eea;
	font-size: 1.5rem;
	margin-bottom: 1rem;
}

.philosophy p {
	color: #4a5568;
	line-height: 1.8;
	margin-bottom: 0.75rem;
}

.features-list {
	background: #f7fafc;
	padding: 2rem;
	border-bottom: 1px solid #e2e8f0;
}

.features-list h2 {
	color: #667eea;
	font-size: 1.8rem;
	margin-bottom: 1.5rem;
	text-align: center;
}

.feature-category {
	margin-bottom: 2rem;
}

.feature-category:last-child {
	margin-bottom: 0;
}

.feature-category h3 {
	color: #4a5568;
	font-size: 1.2rem;
	margin-bottom: 0.75rem;
	font-weight: 600;
}

.feature-category ul {
	list-style: none;
	padding-left: 0;
}

.feature-category ul li {
	color: #4a5568;
	line-height: 1.8;
	margin-bottom: 0.5rem;
	padding-left: 1.5rem;
	position: relative;
}

.feature-category ul li:before {
	content: "→";
	position: absolute;
	left: 0;
	color: #667eea;
	font-weight: bold;
}

.feature-category ul li code {
	background: #edf2f7;
	padding: 0.2rem 0.4rem;
	border-radius: 3px;
	font-size: 0.9em;
	color: #667eea;
}

.feature-link, .link {
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.2s ease, text-decoration 0.2s ease;
}

.feature-link:hover,.link:hover {
	color: #667eea;
	text-decoration: underline;
}

.feature-link strong, .link strong {
	font-weight: 600;
}

.links {
	display: flex;
	gap: 1rem;
	padding: 2rem;
	flex-wrap: wrap;
	justify-content: center;
	background: white;
	border-bottom: 1px solid #e2e8f0;
}

.link-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	text-decoration: none;
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.95rem;
	transition: transform 0.2s, box-shadow 0.2s;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.link-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

.link-btn:active {
	transform: translateY(0);
}

.content {
	padding: 2rem;
}

.global-controls {
	display: flex;
	gap: 1rem;
	margin-bottom: 2rem;
	flex-wrap: wrap;
}

.btn {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	cursor: pointer;
	font-size: 1rem;
	font-weight: 600;
	transition: transform 0.2s, box-shadow 0.2s;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

.btn:active {
	transform: translateY(0);
}

.btn-small {
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
}

.btn-docs {
	background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
	color: white;
	border: none;
	padding: 0.5rem 1rem;
	border-radius: 8px;
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 600;
	transition: all 0.2s;
	box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.btn-docs:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(72, 187, 120, 0.6);
	background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.btn-docs:active {
	transform: translateY(0);
}

.btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.btn-stop {
	background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
	box-shadow: 0 4px 12px rgba(252, 129, 129, 0.4);
}

.btn-stop:hover {
	box-shadow: 0 6px 16px rgba(252, 129, 129, 0.6);
}

/* Verbose Toggle Styles */
.verbose-toggle {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	cursor: pointer;
	user-select: none;
	padding: 0.5rem;
	border-radius: 8px;
	transition: background-color 0.2s;
}

.verbose-toggle:hover {
	background: rgba(102, 126, 234, 0.1);
}

.verbose-toggle input[type="checkbox"] {
	display: none;
}

.toggle-slider {
	position: relative;
	width: 48px;
	height: 24px;
	background: #e2e8f0;
	border-radius: 12px;
	transition: background-color 0.3s ease;
	cursor: pointer;
}

.toggle-slider::before {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	background: white;
	border-radius: 50%;
	transition: transform 0.3s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.verbose-toggle input[type="checkbox"]:checked + .toggle-slider {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.verbose-toggle input[type="checkbox"]:checked + .toggle-slider::before {
	transform: translateX(24px);
}

.toggle-label {
	font-weight: 500;
	color: #4a5568;
	font-size: 0.9rem;
}

.verbose-toggle input[type="checkbox"]:checked ~ .toggle-label {
	color: #667eea;
	font-weight: 600;
}

.feature-section {
	margin-bottom: 2rem;
	border: 2px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
}

.feature-header {
	background: #f7fafc;
	padding: 1rem 1.5rem;
	border-bottom: 2px solid #e2e8f0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.feature-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #2d3748;
}

.examples-grid {
	padding: 1.5rem;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1.5rem;
}

.example-card {
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
	background: #ffffff;
}

.example-header {
	background: #edf2f7;
	padding: 0.75rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.example-title {
	font-weight: 600;
	color: #2d3748;
	font-size: 0.95rem;
	width: 100%;
}

.example-output {
	padding: 1rem;
	min-height: 120px;
	max-height: 300px;
	overflow-y: auto;
	font-family: 'Courier New', monospace;
	font-size: 0.85rem;
	background: #1a202c;
	color: #a0aec0;
	line-height: 1.5;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.example-output.running {
	color: #63b3ed;
}

.example-output.success {
	color: #68d391;
}

.example-output.error {
	color: #fc8181;
}

.footer {
	text-align: center;
	padding: 1.5rem;
	color: #718096;
	border-top: 1px solid #e2e8f0;
	font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
	body {
		padding: 1rem 0.5rem;
	}

	.header h1 {
		font-size: 2rem;
	}

	.header .emoji {
		font-size: 2rem;
	}

	.examples-grid {
		grid-template-columns: 1fr;
		padding: 1rem;
	}

	.global-controls {
		flex-direction: column;
	}

	.btn {
		width: 100%;
	}

	.content {
		padding: 1rem;
	}

	.philosophy {
		padding: 1.5rem 1rem;
	}
}

/* Modal Styles */
.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	z-index: 1000;
	opacity: 0;
	transition: opacity 0.3s ease;
	backdrop-filter: blur(4px);
}

.modal.show {
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 1;
}

.modal-content {
	background: white;
	border-radius: 12px;
	max-width: 800px;
	width: 90%;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	transform: scale(0.9);
	transition: transform 0.3s ease;
}

.modal.show .modal-content {
	transform: scale(1);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem;
	border-bottom: 1px solid #e2e8f0;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border-radius: 12px 12px 0 0;
}

.modal-header h3 {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 600;
}

.modal-close {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: white;
	font-size: 2rem;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
	line-height: 1;
	padding: 0;
}

.modal-close:hover {
	background: rgba(255, 255, 255, 0.3);
}

.modal-body {
	flex: 1;
	overflow-y: auto;
	padding: 1.5rem;
}

.modal-body pre {
	margin: 0;
	background: #1e293b;
	border-radius: 8px;
	padding: 1.5rem;
	overflow-x: auto;
}

.modal-body code {
	font-family: 'Fira Code', 'Courier New', monospace;
	font-size: 0.9rem;
	line-height: 1.6;
	color: #e2e8f0;
	display: block;
}

.modal-footer {
	padding: 1.5rem;
	border-top: 1px solid #e2e8f0;
	display: flex;
	justify-content: flex-end;
	gap: 1rem;
}

.btn-primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Code button in example card */
.example-code-btn {
	background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
	color: white;
	border: none;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.75rem;
	font-weight: 600;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	box-shadow: 0 2px 4px rgba(66, 153, 225, 0.3);
}

.example-code-btn:hover {
	background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(66, 153, 225, 0.4);
}

.example-docs-btn {
	background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
	color: white;
	border: none;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.75rem;
	font-weight: 600;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	box-shadow: 0 2px 4px rgba(72, 187, 120, 0.3);
}

.example-docs-btn:hover {
	background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(72, 187, 120, 0.4);
}

@media (max-width: 768px) {
	.modal-content {
		width: 95%;
		max-height: 90vh;
	}

	.modal-header {
		padding: 1rem;
	}

	.modal-header h3 {
		font-size: 1.2rem;
	}

	.modal-body {
		padding: 1rem;
	}

	.modal-footer {
		padding: 1rem;
	}

	.modal-body pre {
		padding: 1rem;
	}

	.modal-body code {
		font-size: 0.8rem;
	}
}

/* Scroll to Top Button */
.scroll-to-top {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	width: 3.5rem;
	height: 3.5rem;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
	transition: all 0.3s ease;
	opacity: 0;
	visibility: hidden;
	z-index: 1000;
}

.scroll-to-top.visible {
	opacity: 1;
	visibility: visible;
}

.scroll-to-top:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 20px rgba(102, 126, 234, 0.6);
	background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.scroll-to-top:active {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Scroll to Bottom Button */
.scroll-to-bottom {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	width: 3.5rem;
	height: 3.5rem;
	background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
	color: white;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	box-shadow: 0 4px 12px rgba(118, 75, 162, 0.4);
	transition: all 0.3s ease;
	opacity: 0;
	visibility: hidden;
	z-index: 1000;
}

.scroll-to-bottom.visible {
	opacity: 1;
	visibility: visible;
}

.scroll-to-bottom:hover {
	transform: translateY(4px);
	box-shadow: 0 8px 20px rgba(118, 75, 162, 0.6);
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.scroll-to-bottom:active {
	transform: translateY(2px);
	box-shadow: 0 4px 12px rgba(118, 75, 162, 0.4);
}

/* Sticky Navigation Dropdown */
.sticky-nav {
	position: fixed;
	top: -100px;
	left: 0;
	right: 0;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	z-index: 999;
	transition: top 0.3s ease;
	padding: 1rem 0;
}

.sticky-nav.visible {
	top: 0;
}

.sticky-nav-container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 2rem;
	display: flex;
	align-items: center;
	gap: 1rem;
}

.sticky-nav-label {
	color: white;
	font-weight: 600;
	font-size: 1rem;
	white-space: nowrap;
}

.sticky-nav-dropdown {
	flex: 1;
	max-width: 600px;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 8px;
	background: white;
	color: #2d3748;
	cursor: pointer;
	transition: all 0.2s ease;
	outline: none;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.sticky-nav-dropdown:hover {
	border-color: rgba(255, 255, 255, 0.6);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sticky-nav-dropdown:focus {
	border-color: white;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.sticky-nav-dropdown option {
	padding: 0.5rem;
}

.sticky-nav-dropdown optgroup {
	font-weight: 600;
	color: #667eea;
	font-size: 0.95rem;
}

@media (max-width: 768px) {
	.sticky-nav-container {
		flex-direction: column;
		gap: 0.5rem;
		padding: 0 1rem;
	}
	
	.sticky-nav-dropdown {
		max-width: 100%;
		width: 100%;
	}
}

@media (max-width: 768px) {
	.scroll-to-top {
		width: 3rem;
		height: 3rem;
		bottom: 1.5rem;
		right: 1.5rem;
		font-size: 1.2rem;
	}

	.scroll-to-bottom {
		width: 3rem;
		height: 3rem;
		bottom: 1.5rem;
		right: 1.5rem;
		font-size: 1.2rem;
	}
}
