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

body {
    font-family: 'Cairo', sans-serif;
    background-color: #F8FAFC;
    color: #1E293B;
    padding: 1rem;
    min-height: 100vh;
}

@media (min-width: 768px) {
    body {
        padding: 2rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.max-w-6xl {
    max-width: 72rem;
}

.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-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-10 {
    margin-top: 2.5rem;
}

.mt-20 {
    margin-top: 5rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.p-12 {
    padding: 3rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-5 {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.pt-12 {
    padding-top: 3rem;
}

.pb-12 {
    padding-bottom: 3rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

/* Grid */
.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));
}

@media (min-width: 1024px) {
    .lg\:grid-cols-12 {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .lg\:col-span-5 {
        grid-column: span 5 / span 5;
    }

    .lg\:col-span-7 {
        grid-column: span 7 / span 7;
    }
}

.items-start {
    align-items: flex-start;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

/* Flex */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.inline-flex {
    display: inline-flex;
}

/* Text */
.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

@media (min-width: 768px) {
    .md\:text-5xl {
        font-size: 3rem;
        line-height: 1;
    }
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.font-black {
    font-weight: 900;
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

.italic {
    font-style: italic;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.tracking-widest {
    letter-spacing: 0.1em;
}

.leading-relaxed {
    line-height: 1.625;
}

/* Colors */
.text-indigo-600 {
    color: #4F46E5;
}

.text-indigo-500 {
    color: #6366F1;
}

.text-amber-500 {
    color: #F59E0B;
}

.text-emerald-500 {
    color: #10B981;
}

.text-emerald-600 {
    color: #059669;
}

.text-emerald-700 {
    color: #047857;
}

.text-slate-200 {
    color: #E2E8F0;
}

.text-slate-300 {
    color: #CBD5E1;
}

.text-slate-400 {
    color: #94A3B8;
}

.text-slate-500 {
    color: #64748B;
}

.text-slate-600 {
    color: #475569;
}

.text-slate-800 {
    color: #1E293B;
}

.text-white {
    color: #FFFFFF;
}

.bg-white {
    background-color: #FFFFFF;
}

.bg-slate-50 {
    background-color: #F8FAFC;
}

.bg-slate-900 {
    background-color: #0F172A;
}

.bg-black {
    background-color: #000000;
}

.bg-indigo-50 {
    background-color: #EEF2FF;
}

.bg-indigo-600 {
    background-color: #4F46E5;
}

.bg-emerald-50 {
    background-color: #ECFDF5;
}

/* Borders */
.border {
    border-width: 1px;
}

.border-2 {
    border-width: 2px;
}

.border-t {
    border-top-width: 1px;
}

.border-dashed {
    border-style: dashed;
}

.border-slate-100 {
    border-color: #F1F5F9;
}

.border-slate-200 {
    border-color: #E2E8F0;
}

.border-indigo-50 {
    border-color: #EEF2FF;
}

.border-indigo-100 {
    border-color: #E0E7FF;
}

.border-emerald-200 {
    border-color: #A7F3D0;
}

/* Border Radius */
.rounded-2xl {
    border-radius: 1rem;
}

.rounded-3xl {
    border-radius: 1.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* Shadows */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.shadow-indigo-100 {
    --tw-shadow-color: #E0E7FF;
    --tw-shadow: var(--tw-shadow-colored);
}

/* Transitions */
.transition-all {
    transition-property: all;
    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-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-500 {
    transition-duration: 500ms;
}

/* Hover Effects */
.hover\:bg-slate-50:hover {
    background-color: #F8FAFC;
}

.hover\:bg-slate-200:hover {
    background-color: #E2E8F0;
}

.hover\:bg-black:hover {
    background-color: #000000;
}

.hover\:bg-indigo-700:hover {
    background-color: #4338CA;
}

.hover\:border-indigo-200:hover {
    border-color: #C7D2FE;
}

.hover\:text-indigo-300:hover {
    color: #A5B4FC;
}

/* Active State */
.active\:scale-95:active {
    transform: scale(0.95);
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

/* Outline */
.outline-none {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* Misc */
.h-full {
    height: 100%;
}

.min-h-\[500px\] {
    min-height: 500px;
}

.max-h-\[850px\] {
    max-height: 850px;
}

.w-full {
    width: 100%;
}

.max-w-sm {
    max-width: 24rem;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-10 {
    z-index: 10;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-y-auto {
    overflow-y: auto;
}

.overflow-x-auto {
    overflow-x: auto;
}

/* Custom Components */
.aspect-square {
    aspect-ratio: 1 / 1;
}

.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.group:hover .group-hover\:text-indigo-300 {
    color: #A5B4FC;
}

.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

.opacity-0 {
    opacity: 0;
}

/* Image Gallery */
.image-container {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #F1F5F9;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-container .delete-btn {
    position: absolute;
    inset: 0;
    background-color: rgba(239, 68, 68, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}

.image-container:hover .delete-btn {
    opacity: 1;
}

.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #E2E8F0;
    border-radius: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.upload-box:hover {
    background-color: #EEF2FF;
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Result Box */
.result-box {
    background-color: #FFFFFF;
    border-radius: 3rem;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    border: 1px solid #F1F5F9;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 850px;
}

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

.result-content {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.code-preview {
    background-color: #0F172A;
    color: #10B981;
    border-radius: 1.5rem;
    padding: 2rem;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    line-height: 1.5;
    overflow-x: auto;
    border-top: 4px solid #10B981;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Buttons */
button {
    border: none;
    cursor: pointer;
}

button:disabled {
    background-color: #94A3B8 !important;
    cursor: not-allowed;
}

.action-btn {
    padding: 0.75rem;
    background-color: #F1F5F9;
    border-radius: 1rem;
    transition: background-color 0.2s;
}

.action-btn:hover {
    background-color: #E2E8F0;
}

.primary-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #4F46E5;
    color: white;
    border-radius: 1rem;
    font-weight: 900;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    transition: background-color 0.2s;
}

.primary-btn:hover {
    background-color: #4338CA;
}

/* Select Inputs */
select {
    width: 100%;
    padding: 0.75rem;
    background-color: #F8FAFC;
    border-radius: 1rem;
    border: none;
    font-weight: 700;
    outline: none;
    font-size: 0.875rem;
    font-family: 'Cairo', sans-serif;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

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

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Info Box */
.info-box {
    background-color: #EEF2FF;
    padding: 1.5rem;
    border-radius: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #E0E7FF;
}

.info-box h4 {
    font-weight: 900;
    color: #4F46E5;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.info-box p {
    font-weight: 700;
    font-size: 1.125rem;
}

/* Blur Effect */
.blur-\[50px\] {
    filter: blur(50px);
}

.scale-150 {
    transform: scale(1.5);
}

.scale-110 {
    transform: scale(1.1);
}

/* Status Indicator */
.status-dot {
    width: 0.75rem;
    height: 0.75rem;
    background-color: #10B981;
    border-radius: 9999px;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
