/* furniai-public.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

#furniai-app-container {
	display: flex;
	min-height: 800px;
	background: #0b0c10;
	color: #e0e6ed;
	font-family: 'Inter', sans-serif;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.05);
	margin: 2rem 0;
}

#furniai-app-container * {
	box-sizing: border-box;
}

.furniai-sidebar {
	width: 280px;
	background: rgba(22, 24, 30, 0.8);
	backdrop-filter: blur(20px);
	border-right: 1px solid rgba(255, 255, 255, 0.05);
	padding: 2rem;
	display: flex;
	flex-direction: column;
}

.furniai-logo {
	font-size: 24px;
	font-weight: 700;
	margin-bottom: 2rem;
	letter-spacing: -0.5px;
	color: #fff;
}

.furniai-logo span {
	color: #3b82f6;
}

.furniai-credits-box {
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
	border: 1px solid rgba(59, 130, 246, 0.2);
	border-radius: 12px;
	padding: 1.2rem;
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 2.5rem;
}

.furniai-credits-box .icon {
	font-size: 24px;
}

.furniai-credits-box .text {
	display: block;
	font-size: 12px;
	color: #94a3b8;
	margin-bottom: 4px;
}

.furniai-credits-box strong {
	font-size: 20px;
	color: #fff;
}

.furniai-nav {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.furniai-nav-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	color: #94a3b8;
	text-decoration: none;
	border-radius: 10px;
	transition: all 0.3s ease;
	font-weight: 500;
}

.furniai-nav-item:hover {
	background: rgba(255, 255, 255, 0.03);
	color: #fff;
}

.furniai-nav-item.active {
	background: #3b82f6;
	color: #fff;
	box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.furniai-main-content {
	flex: 1;
	padding: 2.5rem 3rem;
	overflow-y: auto;
	background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.05), transparent 40%);
}

.furniai-header h1 {
	font-size: 32px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 0.5rem 0;
	letter-spacing: -1px;
}

.furniai-header p {
	color: #94a3b8;
	font-size: 16px;
	margin: 0 0 2.5rem 0;
}

.furniai-workspace {
	display: flex;
	gap: 2rem;
	margin-bottom: 3rem;
}

.furniai-input-panel, .furniai-output-panel {
	flex: 1;
	background: rgba(22, 24, 30, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-radius: 16px;
	padding: 2rem;
	backdrop-filter: blur(10px);
}

.furniai-output-panel {
	display: flex;
	flex-direction: column;
}

.furniai-form-group {
	margin-bottom: 1.5rem;
}

.furniai-form-group label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: #cbd5e1;
	margin-bottom: 0.5rem;
}

.furniai-form-group input, 
.furniai-form-group textarea, 
.furniai-form-group select {
	width: 100%;
	background: rgba(15, 15, 17, 0.8);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	padding: 12px 16px;
	color: #fff;
	font-family: inherit;
	transition: all 0.3s;
}

.furniai-form-group input:focus, 
.furniai-form-group textarea:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.furniai-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 14px;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	font-size: 16px;
	cursor: pointer;
	transition: all 0.3s;
	font-family: inherit;
}

.furniai-btn-primary {
	background: linear-gradient(135deg, #3b82f6, #2563eb);
	color: white;
	box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.furniai-btn-primary:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

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

.furniai-cost-info {
	text-align: center;
	font-size: 13px;
	color: #94a3b8;
	margin-top: 1rem;
}

.furniai-result-area {
	flex: 1;
	background: rgba(15, 15, 17, 0.8);
	border-radius: 12px;
	border: 1px dashed rgba(255, 255, 255, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	min-height: 300px;
	position: relative;
}

.furniai-result-area img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.furniai-result-area model-viewer {
	width: 100%;
	height: 100%;
}

.furniai-placeholder {
	text-align: center;
	color: #64748b;
}

.furniai-placeholder .icon {
	font-size: 32px;
	margin-bottom: 10px;
	display: block;
}

.furniai-gallery-section h3 {
	margin-bottom: 1.5rem;
	color: #fff;
}

.furniai-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
}

.furniai-gallery-item {
	aspect-ratio: 1;
	background: rgba(22, 24, 30, 0.6);
	border-radius: 12px;
	overflow: hidden;
	position: relative;
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.furniai-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.furniai-gallery-item:hover img {
	transform: scale(1.05);
}

/* Loader */
.furniai-loader {
	border: 3px solid rgba(255,255,255,0.3);
	border-radius: 50%;
	border-top: 3px solid #fff;
	width: 20px;
	height: 20px;
	animation: spin 1s linear infinite;
	margin-left: 10px;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.furniai-message {
	margin-top: 15px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.6;
	display: none;
	animation: furniai-slide-in 0.3s ease;
}

@keyframes furniai-slide-in {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: translateY(0); }
}

.furniai-msg-inner {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
}

.furniai-msg-text {
	flex: 1;
}

.furniai-err-para {
	margin: 0 0 8px 0;
}

.furniai-err-para:last-child {
	margin-bottom: 0;
}

.furniai-msg-close {
	flex-shrink: 0;
	background: none;
	border: none;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	opacity: 0.7;
	transition: opacity 0.2s;
	align-self: flex-start;
	margin-top: -2px;
}

.furniai-msg-close:hover {
	opacity: 1;
}

.furniai-message.error {
	background: rgba(239, 68, 68, 0.08);
	border: 1px solid rgba(239, 68, 68, 0.3);
}

.furniai-message.error .furniai-msg-text,
.furniai-message.error .furniai-msg-close {
	color: #fca5a5;
}

.furniai-message.success {
	background: rgba(34, 197, 94, 0.08);
	border: 1px solid rgba(34, 197, 94, 0.3);
}

.furniai-message.success .furniai-msg-text,
.furniai-message.success .furniai-msg-close {
	color: #86efac;
}

.furniai-fullscreen {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	margin: 0 !important;
	border-radius: 0 !important;
	z-index: 999999 !important;
	box-shadow: none !important;
}

#furniai-close-app {
	position: absolute;
	top: 20px;
	right: 20px;
	background: rgba(255,255,255,0.1);
	border: none;
	color: #fff;
	font-size: 24px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	z-index: 10;
	transition: background 0.3s;
}

#furniai-close-app:hover {
	background: rgba(255,255,255,0.2);
}

.furniai-upload-box {
	border: 2px dashed rgba(255,255,255,0.2);
	border-radius: 12px;
	padding: 20px;
	text-align: center;
	cursor: pointer;
	position: relative;
	background: rgba(15,15,17,0.5);
	transition: all 0.3s;
}

.furniai-upload-box:hover {
	border-color: #3b82f6;
	background: rgba(15,15,17,0.8);
}

.furniai-upload-box img {
	max-width: 100%;
	max-height: 200px;
	border-radius: 8px;
	margin-bottom: 10px;
}

.furniai-gallery-btn {
	display: block;
	width: 100%;
	padding: 8px;
	margin-top: 10px;
	background: rgba(59, 130, 246, 0.2);
	color: #3b82f6;
	border: 1px solid rgba(59, 130, 246, 0.3);
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
}

.furniai-gallery-btn:hover {
	background: rgba(59, 130, 246, 0.3);
}

/* Modal styles */
.furniai-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0,0,0,0.8);
	z-index: 1000000;
	backdrop-filter: blur(5px);
}

.furniai-modal-content {
	background: #16181e;
	width: 80%;
	max-width: 800px;
	margin: 50px auto;
	border-radius: 16px;
	border: 1px solid rgba(255,255,255,0.1);
	display: flex;
	flex-direction: column;
	max-height: 80vh;
}

.furniai-modal-header {
	padding: 20px;
	border-bottom: 1px solid rgba(255,255,255,0.05);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.furniai-modal-header h2 {
	margin: 0;
	color: #fff;
	font-size: 20px;
}

.furniai-modal-close {
	font-size: 28px;
	cursor: pointer;
	color: #94a3b8;
}

.furniai-modal-close:hover {
	color: #fff;
}

.furniai-modal-body {
	padding: 20px;
	overflow-y: auto;
}

.furniai-media-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 15px;
}

.furniai-media-item {
	aspect-ratio: 1;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	border: 2px solid transparent;
	transition: all 0.2s;
}

.furniai-media-item:hover {
	border-color: rgba(59, 130, 246, 0.5);
}

.furniai-media-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ============================================================
 * 3D Viewer & Download Panel
 * ========================================================== */
.furniai-3d-viewer-wrap {
	width: 100%;
	padding: 12px;
}

.furniai-mv-hint {
	text-align: center;
	font-size: 12px;
	color: #64748b;
	margin: 10px 0 16px;
	letter-spacing: 0.5px;
}

.furniai-mv-overlay {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,0.6);
	border-radius: 10px;
}

.furniai-mv-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid rgba(59,130,246,0.3);
	border-top-color: #3b82f6;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

.furniai-download-panel {
	background: rgba(15,15,17,0.7);
	border: 1px solid rgba(255,255,255,0.07);
	border-radius: 12px;
	padding: 16px;
	margin-top: 4px;
}

.furniai-dl-title {
	font-size: 13px;
	color: #94a3b8;
	margin: 0 0 12px 0;
	font-weight: 500;
}

.furniai-dl-btns {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.furniai-dl-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-width: 72px;
	padding: 10px 14px;
	background: rgba(30,32,40,0.9);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.25s;
	text-decoration: none;
	font-family: inherit;
}

.furniai-dl-btn:hover:not(:disabled) {
	background: rgba(59,130,246,0.15);
	border-color: rgba(59,130,246,0.4);
	transform: translateY(-2px);
}

.furniai-dl-btn:disabled {
	opacity: 0.6;
	cursor: wait;
}

.furniai-dl-glb {
	background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(37,99,235,0.1));
	border-color: rgba(59,130,246,0.35);
}

.furniai-dl-btn .dl-icon {
	font-size: 20px;
	line-height: 1;
}

.furniai-dl-btn .dl-label {
	font-size: 13px;
	font-weight: 700;
	color: #e2e8f0;
}

.furniai-dl-btn .dl-sub {
	font-size: 10px;
	color: #64748b;
	white-space: nowrap;
}

