/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #F8F8F8;
    color: #333;
    line-height: 1.5;
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
    color: inherit;
}

button, input, textarea {
    font-family: inherit;
    font-size: 100%;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* Variables */
:root {
    --color-festive-start: #E60012;
    --color-festive-end: #B8000D;
    --color-red-50: #FEF2F2;
    --color-red-100: #FEE2E2;
    --color-red-200: #FECACA;
    --color-red-400: #F87171;
    --color-red-500: #EF4444;
    --color-red-600: #DC2626;
    --color-green-50: #F0FDF4;
    --color-green-100: #DCFCE7;
    --color-green-200: #BBF7D0;
    --color-green-500: #22C55E;
    --color-green-600: #16A34A;
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-gray-900: #111827;
    --color-white: #FFFFFF;
}

/* Custom Component Classes */
.bg-festive {
    background: linear-gradient(135deg, var(--color-festive-start) 0%, var(--color-festive-end) 100%);
}

.text-festive {
    color: var(--color-festive-start);
}

.card-shadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.recommend-icon {
    background: linear-gradient(135deg, var(--color-festive-start) 0%, var(--color-festive-end) 100%);
    box-shadow: 0 2px 4px rgba(230, 0, 18, 0.3);
}

.safe-area-pb {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Utility Classes (Tailwind-like) */

/* Layout */
.container { width: 100%; margin-right: auto; margin-left: auto; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.hidden { display: none; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.grow { flex-grow: 1; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-\[60\] { z-index: 60; } /* Escaped for CSS */

/* Spacing */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.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 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.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-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pb-12 { padding-bottom: 3rem; }
.pb-20 { padding-bottom: 5rem; }
.pb-24 { padding-bottom: 6rem; }
.pl-1 { padding-left: 0.25rem; }
.pl-3 { padding-left: 0.75rem; }
.pl-7 { padding-left: 1.75rem; }
.pl-8 { padding-left: 2rem; }
.pr-6 { padding-right: 1.5rem; }

.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-5 { margin-top: 1.25rem; margin-bottom: 1.25rem; }

.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-2\.5 { margin-top: 0.625rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-10 { margin-top: 2.5rem; }

.mb-0\.5 { margin-bottom: 0.125rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-auto { margin-left: auto; }
.-ml-2 { margin-left: -0.5rem; }

.mr-1 { margin-right: 0.25rem; }
.mr-1\.5 { margin-right: 0.375rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-2\.5 { margin-right: 0.625rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }

.space-y-0\.5 > * + * { margin-top: 0.125rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-1\.5 > * + * { margin-top: 0.375rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-x-1 > * + * { margin-left: 0.25rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }

.gap-2 { gap: 0.5rem; }

/* Sizing */
.w-full { width: 100%; }
.w-1 { width: 0.25rem; }
.w-1\.5 { width: 0.375rem; }
.w-3 { width: 0.75rem; }
.w-3\.5 { width: 0.875rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-7 { width: 1.75rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-4xl { max-width: 56rem; }

.h-full { height: 100%; }
.h-1 { height: 0.25rem; }
.h-1\.5 { height: 0.375rem; }
.h-3 { height: 0.75rem; }
.h-3\.5 { height: 0.875rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-7 { height: 1.75rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.min-h-screen { min-height: 100vh; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-\[10px\] { font-size: 10px; line-height: 14px; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }
.leading-5 { line-height: 1.25rem; }
.leading-7 { line-height: 1.75rem; }

.uppercase { text-transform: uppercase; }
.whitespace-nowrap { white-space: nowrap; }
.break-words { overflow-wrap: break-word; }
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Colors */
.text-white { color: var(--color-white); }
.text-white\/80 { color: rgba(255, 255, 255, 0.8); }
.text-gray-300 { color: var(--color-gray-300); }
.text-gray-400 { color: var(--color-gray-400); }
.text-gray-500 { color: var(--color-gray-500); }
.text-gray-600 { color: var(--color-gray-600); }
.text-gray-700 { color: var(--color-gray-700); }
.text-gray-800 { color: var(--color-gray-800); }
.text-gray-900 { color: var(--color-gray-900); }
.text-red-400 { color: var(--color-red-400); }
.text-red-500 { color: var(--color-red-500); }
.text-red-600 { color: var(--color-red-600); }
.text-green-500 { color: var(--color-green-500); }
.text-green-600 { color: var(--color-green-600); }
.text-green-700 { color: var(--color-green-700); }
.text-blue-500 { color: #3B82F6; }
.text-blue-600 { color: var(--color-blue-600, #2563EB); }

.bg-white { background-color: var(--color-white); }
.bg-white\/20 { background-color: rgba(255, 255, 255, 0.2); }
.bg-black\/80 { background-color: rgba(0, 0, 0, 0.8); }
.bg-gray-50 { background-color: var(--color-gray-50); }
.bg-gray-100 { background-color: var(--color-gray-100); }
.bg-red-50 { background-color: var(--color-red-50); }
.bg-red-50\/50 { background-color: rgba(254, 242, 242, 0.5); }
.bg-red-100 { background-color: var(--color-red-100); }
.bg-red-200 { background-color: var(--color-red-200); }
.bg-red-400 { background-color: var(--color-red-400); }
.bg-red-500 { background-color: var(--color-red-500); }
.bg-green-100 { background-color: var(--color-green-100); }
.bg-green-500 { background-color: var(--color-green-500); }
.bg-green-600 { background-color: var(--color-green-600); }
.bg-blue-50 { background-color: #EFF6FF; }
.bg-blue-600 { background-color: var(--color-blue-600, #2563EB); }

/* Gradients */
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.from-red-50 { --tw-gradient-from: var(--color-red-50); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(254, 242, 242, 0)); }
.from-red-500 { --tw-gradient-from: var(--color-red-500); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(239, 68, 68, 0)); }
.from-red-600 { --tw-gradient-from: var(--color-red-600); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(220, 38, 38, 0)); }
.to-red-600 { --tw-gradient-to: var(--color-red-600); }
.to-red-800 { --tw-gradient-to: #991B1B; }
.to-orange-50 { --tw-gradient-to: #FFF7ED; }

/* Borders & Radius */
.border { border-width: 1px; border-style: solid; }
.border-dashed { border-style: dashed; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.border-gray-50 { border-color: var(--color-gray-50); }
.border-gray-100 { border-color: var(--color-gray-100); }
.border-gray-200 { border-color: var(--color-gray-200); }
.border-gray-300 { border-color: var(--color-gray-300); }
.border-red-50\/50 { border-color: rgba(254, 242, 242, 0.5); }
.border-red-100 { border-color: var(--color-red-100); }
.border-red-200 { border-color: var(--color-red-200); }
.border-red-500 { border-color: var(--color-red-500); }
.border-green-200 { border-color: var(--color-green-200); }
.border-transparent { border-color: transparent; }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Effects */
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

.shadow-red-200 { --tw-shadow-color: var(--color-red-200); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -2px var(--tw-shadow-color); }
.shadow-red-500\/30 { --tw-shadow-color: rgba(239, 68, 68, 0.3); box-shadow: 0 10px 15px -3px var(--tw-shadow-color); }
.shadow-red-500\/40 { --tw-shadow-color: rgba(239, 68, 68, 0.4); box-shadow: 0 10px 15px -3px var(--tw-shadow-color); }
.shadow-green-200 { --tw-shadow-color: var(--color-green-200); box-shadow: 0 10px 15px -3px var(--tw-shadow-color); }

.opacity-10 { opacity: 0.1; }
.opacity-50 { opacity: 0.5; }
.opacity-90 { opacity: 0.9; }

.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur-md { backdrop-filter: blur(12px); }

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

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

.active\:scale-90:active { transform: scale(0.9); }
.active\:scale-95:active { transform: scale(0.95); }
.active\:scale-\[0\.98\]:active { transform: scale(0.98); }
.active\:scale-\[0\.99\]:active { transform: scale(0.99); }
.active\:opacity-70:active { opacity: 0.7; }
.hover\:bg-white\/30:hover { background-color: rgba(255, 255, 255, 0.3); }
.hover\:text-blue-800:hover { color: #1e40af; }
.hover\:text-gray-600:hover { color: var(--color-gray-600); }
.hover\:text-red-700:hover { color: #b91c1c; }
.hover\:bg-blue-100:hover { background-color: #DBEAFE; }
.hover\:bg-red-100:hover { background-color: var(--color-red-100); }
.hover\:bg-green-600:hover { background-color: var(--color-green-600); }
.hover\:bg-green-700:hover { background-color: #15803d; }

/* Table */
.table-auto { table-layout: auto; }
.border-collapse { border-collapse: collapse; }
.divide-y > * + * { border-top-width: 1px; border-top-color: var(--color-gray-100); }

/* Form */
.outline-none { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-1:focus { box-shadow: 0 0 0 1px var(--color-red-500); }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px var(--color-red-500); }
.focus\:border-red-500:focus { border-color: var(--color-red-500); }

/* Specific Helpers */
.align-middle { vertical-align: middle; }

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bg-pattern-cubes {
    background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
}
