body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1e293b; 
}
::-webkit-scrollbar-thumb {
    background: #475569; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b; 
}

/* Background Animation */
.bg-gradient-animate {
    background: linear-gradient(-45deg, #0f172a, #1e1b4b, #312e81, #0f172a);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glassmorphism */
.glass-panel {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Input Range Styling */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent; 
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    margin-top: -6px; 
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #334155;
    border-radius: 2px;
}

/* Grid Overlay Animation */
.grid-line {
    stroke: #f43f5e;
    stroke-width: 2;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: dash 1s ease-out forwards;
}
@keyframes dash {
    to { stroke-dashoffset: 0; }
}

/* Loader */
.loader {
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top: 3px solid #6366f1;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.preview-container {
    transition: all 0.3s ease;
}
.preview-container:hover {
    transform: scale(1.02);
}

/* Replace Tailwind utility classes */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 2.5rem 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.relative { position: relative; }
.absolute { position: absolute; }
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-6xl { max-width: 72rem; }
.max-w-full { max-width: 100%; }
.max-h-\[70vh\] { max-height: 70vh; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-6 { margin-top: 1.5rem; }
.mr-2 { margin-right: 0.5rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.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; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.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-4 { border-width: 4px; }
.border-dashed { border-style: dashed; }
.border-slate-600 { border-color: #475569; }
.border-slate-700 { border-color: #334155; }
.border-indigo-500 { border-color: #6366f1; }
.border-green-500 { border-color: #22c55e; }
.border-l-4 { border-left-width: 4px; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-900\/50 { background-color: rgba(15, 23, 42, 0.5); }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-green-600 { background-color: #16a34a; }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-indigo-600 { --tw-gradient-from: #4f46e5; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(79, 70, 229, 0)); }
.to-purple-600 { --tw-gradient-to: #9333ea; }
.text-white { color: #fff; }
input[type="number"], input[type="text"] {
    color: #fff !important;
}
.bg-transparent { background-color: transparent; }
.focus\:outline-none:focus { outline: none; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-indigo-400 { color: #818cf8; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.bg-clip-text { -webkit-background-clip: text; background-clip: text; }
.text-transparent { color: transparent; }
.from-indigo-400 { --tw-gradient-from: #818cf8; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(129, 140, 248, 0)); }
.to-cyan-400 { --tw-gradient-to: #22d3ee; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.shadow-indigo-500\/30 { box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.3); }
.shadow-green-500\/20 { box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2); }
.transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.hover\:border-indigo-500:hover { border-color: #6366f1; }
.hover\:bg-slate-700:hover { background-color: #334155; }
.hover\:bg-indigo-500:hover { background-color: #6366f1; }
.hover\:bg-purple-500:hover { background-color: #a855f7; }
.hover\:bg-green-500:hover { background-color: #22c55e; }
.hover\:text-indigo-400:hover { color: #818cf8; }
.hover\:text-slate-200:hover { color: #e2e8f0; }
.hover\:-translate-y-0\.5:hover { transform: translateY(-0.125rem); }
.group:hover .group-hover\:text-indigo-400 { color: #818cf8; }
.group:hover .group-hover\:text-slate-200 { color: #e2e8f0; }
.cursor-pointer { cursor: pointer; }
.pointer-events-none { pointer-events: none; }
.opacity-0 { opacity: 0; }
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.w-5 { width: 1.25rem; }
.w-8 { width: 2rem; }
.h-5 { height: 1.25rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.w-10 { width: 2.5rem; }
.w-20 { width: 5rem; }
.h-20 { height: 5rem; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.h-2\.5 { height: 0.625rem; }
.rounded-full { border-radius: 9999px; }
.bg-indigo-500 { background-color: #6366f1; }
.bg-slate-700 { background-color: #334155; }
.border-slate-800 { border-color: #1e293b; }
.duration-300 { transition-duration: 300ms; }
.mx-auto { margin-left: auto; margin-right: auto; }
.disabled\:opacity-50:disabled { opacity: 0.5; }
.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }
.active\:translate-y-0:active { transform: translateY(0); }
@media (min-width: 768px) {
    .md\:text-base { font-size: 1rem; line-height: 1.5rem; }
    .md\:text-5xl { font-size: 3rem; line-height: 1; }
}
@media (min-width: 1024px) {
    .lg\:col-span-4 { grid-column: span 4 / span 4; }
    .lg\:col-span-8 { grid-column: span 8 / span 8; }
    .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
}
