@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Bengali:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

#custom-builder-wrapper {
    font-family: 'Noto Serif Bengali', sans-serif;
    color: #1f2937;
    width: 100%;
    max-width: 80rem;
    margin: 0.5rem auto;
}

#custom-builder-wrapper .glass-panel { background-color: #ffffff; border: 1px solid rgba(226, 232, 240, 0.5); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02); border-radius: 0.75rem; }
.dark #custom-builder-wrapper .glass-panel { background-color: #1e293b; border-color: rgba(51, 65, 85, 0.4); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); }

#custom-builder-wrapper .input-field { background-color: #f8fafc; border: 1px solid #cbd5e1; color: #0f172a; transition: all 0.3s ease; }
.dark #custom-builder-wrapper .input-field { background-color: #0f172a; border-color: #4b5563; color: #f8fafc; }
#custom-builder-wrapper .input-field:focus { background-color: #ffffff; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); outline: none; }
.dark #custom-builder-wrapper .input-field:focus { background-color: #1e293b; }

#workspace-container { background-image: radial-gradient(#cbd5e1 1px, transparent 1px); background-size: 20px 20px; transition: background-color 0.3s ease; }
.dark #workspace-container { background-image: radial-gradient(#334155 1px, transparent 1px); }

#workspace-container:fullscreen { background-color: #f8fafc; border: none !important; border-radius: 0 !important; }
.dark #workspace-container:fullscreen { background-color: #0f172a; }

.math-notebook { background-image: linear-gradient(#e2e8f0 1px, transparent 1px); background-size: 100% 2.2rem; background-position: 0 2.1rem; line-height: 2.2rem; padding-top: 0.5rem; }
.dark .math-notebook { background-image: linear-gradient(#334155 1px, transparent 1px); }

.tool-btn { transition: all 0.2s; }
.tool-btn.active { background-color: #4f46e5; color: white; border-color: #4f46e5; }
.dark .tool-btn.active { background-color: #6366f1; border-color: #6366f1; }

.cursor-draw { cursor: crosshair; }
.cursor-move { cursor: move; }
.cursor-curve { cursor: ns-resize; }
.cursor-pan { cursor: grab !important; }
.cursor-pan:active { cursor: grabbing !important; }
.cursor-pointer-exact { cursor: pointer !important; }

.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 20px; }
.dark .custom-scrollbar::-webkit-scrollbar-thumb { background-color: #475569; }

.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.fade-in-up { animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.typing-cursor::after { content: '|'; animation: blink 1s step-end infinite; color: #4f46e5; font-weight: bold; }
@keyframes blink { 50% { opacity: 0; } }

.clearfix::after { content: ""; clear: both; display: table; }

input[type=range] { -webkit-appearance: none; background: transparent; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background: #4f46e5; cursor: pointer; margin-top: -6px; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 4px; cursor: pointer; background: #cbd5e1; border-radius: 2px; }
.dark input[type=range]::-webkit-slider-runnable-track { background: #475569; }

/* Tailwind-like utilities used in the template */
.w-full { width: 100%; }
.flex { display: flex; }
.hidden { display: none; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.ml-auto { margin-left: auto; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-b { border-bottom-width: 1px; }
.border-l-2 { border-left-width: 2px; }
.border-dashed { border-style: dashed; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }
.relative { position: relative; }
.absolute { position: absolute; }
.shrink-0 { flex-shrink: 0; }
.opacity-50 { opacity: 0.5; }
.pointer-events-none { pointer-events: none; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-pointer { cursor: pointer; }
.touch-none { touch-action: none; }
.transition-all { transition: all 0.15s ease; }
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.shadow-md { box-shadow: 0 4px 6px rgba(0,0,0,0.07); }
.shadow-xl { box-shadow: 0 20px 25px rgba(0,0,0,0.1); }
.shadow-inner { box-shadow: inset 0 2px 4px rgba(0,0,0,0.06); }
.backdrop-blur-md { backdrop-filter: blur(12px); }
.break-all { word-break: break-all; }
.whitespace-nowrap { white-space: nowrap; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }
.block { display: block; }
.inline { display: inline; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.flex-1 { flex: 1 1 0%; }
.min-h-screen { min-height: 100vh; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.inset-0 { inset: 0; }

/* Colors */
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-white { color: #ffffff; }
.text-primary { color: #4f46e5; }
.text-emerald-400 { color: #34d399; }
.text-emerald-500 { color: #10b981; }
.text-emerald-600 { color: #059669; }
.text-emerald-700 { color: #047857; }
.text-red-400 { color: #f87171; }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-indigo-300 { color: #a5b4fc; }
.text-indigo-400 { color: #818cf8; }
.text-indigo-500 { color: #6366f1; }
.text-indigo-600 { color: #4f46e5; }
.text-indigo-700 { color: #4338ca; }
.text-orange-400 { color: #fb923c; }
.text-orange-500 { color: #f97316; }
.text-orange-600 { color: #ea580c; }
.text-orange-700 { color: #c2410c; }
.text-blue-400 { color: #60a5fa; }
.text-blue-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }
.text-yellow-500 { color: #eab308; }

.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-indigo-50 { background-color: #eef2ff; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-500 { background-color: #10b981; }
.bg-red-50 { background-color: #fef2f2; }
.bg-orange-50 { background-color: #fff7ed; }
.bg-primary { background-color: #4f46e5; }

.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-indigo-100 { border-color: #e0e7ff; }
.border-indigo-200 { border-color: #c7d2fe; }
.border-indigo-400 { border-color: #818cf8; }
.border-emerald-200 { border-color: #a7f3d0; }
.border-red-100 { border-color: #fee2e2; }
.border-red-200 { border-color: #fecaca; }
.border-orange-200 { border-color: #fed7aa; }
.border-primary { border-color: #4f46e5; }

.dark .text-gray-200 { color: #e5e7eb; }
.dark .text-gray-300 { color: #d1d5db; }
.dark .text-gray-400 { color: #9ca3af; }
.dark .text-gray-500 { color: #6b7280; }
.dark .text-white { color: #ffffff; }
.dark .bg-slate-800 { background-color: #1e293b; }
.dark .bg-slate-900 { background-color: #0f172a; }
.dark .border-gray-700 { border-color: #374151; }
.dark .border-gray-800 { border-color: #1f2937; }
.dark .border-indigo-600 { border-color: #4f46e5; }

@media print {
    body { visibility: hidden; background-color: #fff !important; margin: 0; padding: 0; }
    #custom-builder-wrapper { margin: 0; padding: 0; box-shadow: none; }
    #print-container { display: block !important; visibility: visible; position: absolute; left: 0; top: 0; width: 100%; background-color: #fff !important; }
    .no-print { display: none !important; }
    .print-step-card { display: flex !important; flex-direction: row-reverse !important; align-items: stretch !important; justify-content: space-between !important; border: 1px solid #cbd5e1 !important; border-radius: 8px !important; padding: 16px !important; margin-bottom: 20px !important; background: #fff !important; box-shadow: none !important; break-inside: avoid; page-break-inside: avoid; }
    .step-text-content { flex: 0 0 60% !important; border-right: 1.5px solid #cbd5e1 !important; padding-right: 20px !important; display: block !important; }
    @page { margin: 8mm; }
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}
