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

body {
	font-family: 'Georgia', 'Times New Roman', serif;
	background: #f8f9fa;
	color: #212529;
	line-height: 1.6;
}

.header {
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
	color: white;
	padding: 2rem 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 2rem;
}

.company-name {
	font-size: 2.5rem;
	font-weight: 300;
	letter-spacing: 1px;
	margin-bottom: 0.5rem;
}

.tagline {
	font-size: 1.1rem;
	color: #cbd5e1;
	font-style: italic;
	font-weight: 300;
}

.admin-bar {
	background: white;
	border-bottom: 1px solid #e2e8f0;
	padding: 1rem 0;
}

.admin-content {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 2rem;
	display: flex;
	gap: 1rem;
	align-items: center;
	flex-wrap: wrap;
}

.admin-label {
	font-size: 0.875rem;
	color: #64748b;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
	font-weight: 500;
}

.btn {
	padding: 0.625rem 1.25rem;
	border: none;
	border-radius: 4px;
	font-size: 0.875rem;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
	cursor: pointer;
	transition: all 0.2s;
	font-weight: 500;
}

.btn-primary {
	background: #16213e;
	color: white;
}

.btn-primary:hover {
	background: #0f172a;
}

.btn-secondary {
	background: #64748b;
	color: white;
}

.btn-secondary:hover {
	background: #475569;
}

.btn-danger {
	background: #dc2626;
	color: white;
}

.btn-danger:hover {
	background: #b91c1c;
}

.btn-edit {
	background: #ca8a04;
	color: white;
}

.btn-edit:hover {
	background: #a16207;
}

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

select {
	padding: 0.625rem;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	background: white;
	color: #1e293b;
	font-size: 0.875rem;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
	cursor: pointer;
}

.status {
	max-width: 1400px;
	margin: 1rem auto;
	padding: 1rem 2rem;
	border-radius: 4px;
	display: none;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 0.875rem;
}

.status.show {
	display: block;
}

.status.success {
	background: #dcfce7;
	color: #166534;
	border: 1px solid #86efac;
}

.status.error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}

.status.info {
	background: #dbeafe;
	color: #1e40af;
	border: 1px solid #93c5fd;
}

.container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 2rem;
}

.properties-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
}

.properties-title {
	font-size: 1.75rem;
	font-weight: 400;
	color: #1e293b;
}

.properties-count {
	font-size: 0.875rem;
	color: #64748b;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.properties-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
	gap: 2rem;
}

.property-card {
	background: white;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
	transition: all 0.3s;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.property-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.property-image {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	background: #f1f5f9;
}

.property-content {
	padding: 1.5rem;
}

.property-name {
	font-size: 1.5rem;
	font-weight: 400;
	color: #1e293b;
	margin-bottom: 0.25rem;
}

.property-planet {
	font-size: 0.875rem;
	color: #64748b;
	margin-bottom: 1rem;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.property-tagline {
	font-size: 0.9375rem;
	color: #475569;
	margin-bottom: 1.25rem;
	line-height: 1.5;
	font-style: italic;
}

.property-details {
	background: #f8fafc;
	padding: 1rem;
	border-radius: 4px;
	margin-bottom: 1rem;
}

.detail-row {
	display: flex;
	justify-content: space-between;
	padding: 0.375rem 0;
	font-size: 0.875rem;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
	border-bottom: 1px solid #e2e8f0;
}

.detail-row:last-child {
	border-bottom: none;
}

.detail-label {
	color: #64748b;
	font-weight: 500;
}

.detail-value {
	color: #1e293b;
	text-align: right;
}

.property-actions {
	display: flex;
	gap: 0.5rem;
}

.loading {
	text-align: center;
	color: #64748b;
	padding: 4rem 2rem;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.footer {
	background: #1a1a2e;
	color: #cbd5e1;
	padding: 2rem;
	margin-top: 4rem;
	text-align: center;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 0.875rem;
}

.footer-demo-note {
	color: #94a3b8;
	font-style: italic;
	margin-top: 0.5rem;
}

/* Detail Page */
.detail-page {
	background: white;
	min-height: calc(100vh - 200px);
}

.detail-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem;
}

.detail-nav {
	margin-bottom: 2rem;
}

.back-link {
	color: #475569;
	text-decoration: none;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 0.9375rem;
	transition: color 0.2s;
}

.back-link:hover {
	color: #1e293b;
}

.detail-content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: start;
}

@media (max-width: 768px) {
	.detail-content {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
}

.detail-image-section {
	position: sticky;
	top: 2rem;
}

.detail-image {
	width: 100%;
	height: auto;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.detail-image-caption {
	margin-top: 0.75rem;
	font-size: 0.875rem;
	color: #64748b;
	font-style: italic;
	text-align: center;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.detail-info-section {
	padding: 1rem 0;
}

.detail-title {
	font-size: 2.5rem;
	font-weight: 400;
	color: #1e293b;
	margin-bottom: 0.5rem;
}

.detail-subtitle {
	font-size: 1.125rem;
	color: #64748b;
	margin-bottom: 2rem;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.detail-tagline {
	font-size: 1.125rem;
	color: #475569;
	line-height: 1.6;
	font-style: italic;
	margin-bottom: 2.5rem;
	padding: 1.5rem;
	background: #f8fafc;
	border-left: 4px solid #16213e;
	border-radius: 4px;
}

.detail-specs {
	margin-bottom: 2.5rem;
}

.detail-specs h2 {
	font-size: 1.5rem;
	font-weight: 400;
	color: #1e293b;
	margin-bottom: 1.5rem;
}

.detail-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.detail-list-item {
	display: grid;
	grid-template-columns: 150px 1fr;
	gap: 2rem;
	padding: 1rem;
	background: #f8fafc;
	border-radius: 4px;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.detail-list-item dt {
	font-weight: 500;
	color: #64748b;
	font-size: 0.9375rem;
}

.detail-list-item dd {
	color: #1e293b;
	font-size: 1rem;
}

.detail-actions {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.detail-actions .btn {
	text-decoration: none;
	display: inline-block;
}

/* Modal */
.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1000;
	align-items: center;
	justify-content: center;
}

.modal.show {
	display: flex;
}

.modal-content {
	background: white;
	border-radius: 8px;
	max-width: 600px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
	padding: 1.5rem;
	border-bottom: 1px solid #e2e8f0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.modal-title {
	font-size: 1.5rem;
	font-weight: 400;
	color: #1e293b;
}

.modal-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	color: #64748b;
	cursor: pointer;
	padding: 0;
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: background 0.2s;
}

.modal-close:hover {
	background: #f1f5f9;
}

.modal-body {
	padding: 1.5rem;
}

.form-group {
	margin-bottom: 1.25rem;
}

.form-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	color: #1e293b;
	margin-bottom: 0.5rem;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.form-input,
.form-textarea {
	width: 100%;
	padding: 0.625rem;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	font-size: 0.9375rem;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
	transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
	outline: none;
	border-color: #16213e;
}

.form-textarea {
	font-family: 'Georgia', 'Times New Roman', serif;
	resize: vertical;
	min-height: 80px;
}

.form-helper {
	font-size: 0.8125rem;
	color: #64748b;
	margin-top: 0.25rem;
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

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

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

/* ============================================================
   Presentation Page
   ============================================================ */

.pres-body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background: #ffffff;
	color: #1e293b;
	min-height: 100vh;
}

.pres-header {
	background: #1e293b;
	border-bottom: 1px solid #334155;
	padding: 1.25rem 2rem;
}

.pres-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 1rem;
}

.pres-cf-logo {
	font-size: 1.75rem;
	color: #f6821f;
}

.pres-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: #f1f5f9;
	margin: 0;
}

.pres-subtitle {
	font-size: 0.8rem;
	color: #94a3b8;
	margin: 0;
}

.pres-content {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2.5rem 2rem;
}

.pres-section {
	margin-bottom: 4rem;
	padding-bottom: 4rem;
	border-bottom: 1px solid #e2e8f0;
}

.pres-section:last-child {
	border-bottom: none;
}

.pres-section-title {
	font-size: 1.375rem;
	font-weight: 600;
	color: #0f172a;
	margin-bottom: 1.25rem;
}

.pres-section-title code {
	font-size: 1.2rem;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	padding: 0.1em 0.35em;
	border-radius: 3px;
	color: #0369a1;
}

.pres-static-code {
	background: #1e293b;
	border-radius: 6px;
	padding: 1rem 1.25rem;
	font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
	font-size: 0.875rem;
	color: #e2e8f0;
	line-height: 1.6;
	white-space: pre;
	overflow-x: auto;
	margin: 0;
}

/* URL REPL */
.pres-url-repl {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	align-items: start;
}

.pres-url-editor {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.pres-label {
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #94a3b8;
}

.pres-url-input {
	width: 100%;
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 0.625rem 0.875rem;
	font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
	font-size: 0.8rem;
	color: #1e293b;
	resize: vertical;
	line-height: 1.5;
}

.pres-url-input:focus {
	outline: none;
	border-color: #3b82f6;
	background: #fff;
}

.pres-url-single {
	resize: none;
}

.pres-run-btn {
	align-self: flex-start;
	background: #f6821f;
	color: white;
	border: none;
	border-radius: 4px;
	padding: 0.5rem 1.25rem;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s;
	margin-top: 0.25rem;
}

.pres-run-btn:hover {
	background: #e06b10;
}

/* Image canvas — shows image at natural pixel size, shrinks to fit if too large */
.pres-img-canvas {
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	min-height: 200px;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	padding: 1rem;
	overflow: hidden;
}

.pres-image-natural {
	/* Natural size, but shrink to fit the canvas — never scale up */
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 500px;
	object-fit: contain;
	display: block;
	border-radius: 2px;
}

/* Code REPL */
.pres-repl {
	display: grid;
	grid-template-columns: 3fr 2fr;
	gap: 1.5rem;
	align-items: start;
}

.pres-repl-left {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.pres-code-editor {
	width: 100%;
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 1rem;
	font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
	font-size: 0.875rem;
	color: #1e293b;
	line-height: 1.6;
	resize: vertical;
	tab-size: 2;
}

.pres-code-editor:focus {
	outline: none;
	border-color: #3b82f6;
}

.pres-repl-right {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	min-height: 160px;
	padding: 1rem;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	overflow: auto;
}

.pres-repl-right .pres-image-natural {
	/* still natural size within the output panel */
}

.pres-placeholder {
	color: #94a3b8;
	font-size: 0.875rem;
	align-self: center;
	margin: auto;
}

.pres-running {
	color: #64748b;
	font-size: 0.875rem;
	font-style: italic;
	margin: auto;
	align-self: center;
}

.pres-success {
	color: #16a34a;
	font-size: 0.875rem;
	font-weight: 500;
	margin: auto;
	align-self: center;
}

.pres-output-json {
	font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
	font-size: 0.8rem;
	color: #0369a1;
	line-height: 1.6;
	white-space: pre-wrap;
	word-break: break-word;
	margin: 0;
}

.pres-output-error {
	font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
	font-size: 0.8rem;
	color: #dc2626;
	line-height: 1.6;
	white-space: pre-wrap;
	margin: 0;
}

/* Reveal section */
.pres-section-reveal {
	text-align: center;
	padding-top: 2rem;
}

.pres-reveal-btn {
	display: inline-block;
	margin-top: 1rem;
	background: #f6821f;
	color: white;
	text-decoration: none;
	padding: 1rem 2.5rem;
	border-radius: 6px;
	font-size: 1.125rem;
	font-weight: 600;
	transition: background 0.15s;
}

.pres-reveal-btn:hover {
	background: #e06b10;
}
