/* ===================================================
   RESET & BASE STYLES
=================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Reset list styles */
ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Remove default button/input outlines and borders */
button, 
input[type="button"],
input[type="submit"],
input[type="reset"] {
    border: none;
    outline: none;
    /* Don't reset background - let classes handle it */
}

button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Remove default input borders - will be added back via classes */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea {
    outline: none;
}

/* Remove autofill background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px white inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* ===================================================
   TAILWIND REPLACEMENT - UTILITY CLASSES
=================================================== */

/* Background Gradients */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-gray-50 {
    --tw-gradient-from: #f9fafb;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(249, 250, 251, 0));
}

.to-gray-100 {
    --tw-gradient-to: #f3f4f6;
}

.from-red-600 {
    --tw-gradient-from: #dc2626;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(220, 38, 38, 0));
}

.to-blue-600 {
    --tw-gradient-to: #2563eb;
}

.from-green-600 {
    --tw-gradient-from: #16a34a;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(22, 163, 74, 0));
}

.to-teal-600 {
    --tw-gradient-to: #0d9488;
}

.from-purple-600 {
    --tw-gradient-from: #9333ea;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(147, 51, 234, 0));
}

.from-purple-500 {
    --tw-gradient-from: #a855f7;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(168, 85, 247, 0));
}

.to-pink-500 {
    --tw-gradient-to: #ec4899;
}

.from-blue-600 {
    --tw-gradient-from: #2563eb;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(37, 99, 235, 0));
}

.to-blue-700 {
    --tw-gradient-to: #1d4ed8;
}

.from-yellow-500 {
    --tw-gradient-from: #eab308;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(234, 179, 8, 0));
}

.to-orange-500 {
    --tw-gradient-to: #f97316;
}

.from-green-700 {
    --tw-gradient-from: #15803d;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(21, 128, 61, 0));
}

.to-teal-700 {
    --tw-gradient-to: #0f766e;
}

.from-purple-700 {
    --tw-gradient-from: #7e22ce;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(126, 34, 206, 0));
}

.from-purple-600 {
    --tw-gradient-from: #9333ea;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(147, 51, 234, 0));
}

.to-pink-600 {
    --tw-gradient-to: #db2777;
}

.from-blue-700 {
    --tw-gradient-from: #1d4ed8;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(29, 78, 216, 0));
}

.to-blue-800 {
    --tw-gradient-to: #1e40af;
}

.from-yellow-600 {
    --tw-gradient-from: #ca8a04;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(202, 138, 4, 0));
}

.to-orange-600 {
    --tw-gradient-to: #ea580c;
}

/* Background Clip Text */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

.text-transparent {
    color: transparent;
}

/* Min Height */
.min-h-screen {
    min-height: 100vh;
}

/* Background Colors */
.bg-white {
    background-color: #ffffff;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.bg-gray-200 {
    background-color: #e5e7eb;
}

.bg-gray-300 {
    background-color: #d1d5db;
}

.bg-gray-400 {
    background-color: #9ca3af;
}

.bg-gray-500 {
    background-color: #6b7280;
}

.bg-gray-600 {
    background-color: #4b5563;
}

.bg-blue-500 {
    background-color: #3b82f6;
}

.bg-blue-600 {
    background-color: #2563eb;
}

.bg-green-500 {
    background-color: #22c55e;
}

.bg-green-600 {
    background-color: #16a34a;
}

.bg-yellow-500 {
    background-color: #eab308;
}

.bg-orange-500 {
    background-color: #f97316;
}

.bg-red-500 {
    background-color: #ef4444;
}

.bg-red-600 {
    background-color: #dc2626;
}

/* Hover Background Colors */
.hover\:bg-gray-50:hover {
    background-color: #f9fafb;
}

.hover\:bg-gray-100:hover {
    background-color: #f3f4f6;
}

.hover\:bg-gray-200:hover {
    background-color: #e5e7eb;
}

.hover\:bg-gray-400:hover {
    background-color: #9ca3af;
}

.hover\:bg-gray-500:hover {
    background-color: #6b7280;
}

.hover\:bg-gray-600:hover {
    background-color: #4b5563;
}

.hover\:bg-blue-600:hover {
    background-color: #2563eb;
}

.hover\:bg-blue-700:hover {
    background-color: #1d4ed8;
}

.hover\:bg-green-600:hover {
    background-color: #16a34a;
}

.hover\:bg-green-600:hover {
    background-color: #16a34a;
}

.hover\:bg-yellow-600:hover {
    background-color: #ca8a04;
}

.hover\:bg-orange-600:hover {
    background-color: #ea580c;
}

.hover\:bg-red-600:hover {
    background-color: #dc2626;
}

/* Hover Gradient Backgrounds */
.hover\:from-green-700:hover {
    --tw-gradient-from: #15803d;
}

.hover\:to-teal-700:hover {
    --tw-gradient-to: #0f766e;
}

.hover\:from-purple-700:hover {
    --tw-gradient-from: #7e22ce;
}

.hover\:to-blue-700:hover {
    --tw-gradient-to: #1d4ed8;
}

.hover\:from-purple-600:hover {
    --tw-gradient-from: #9333ea;
}

.hover\:to-pink-600:hover {
    --tw-gradient-to: #db2777;
}

.hover\:from-blue-700:hover {
    --tw-gradient-from: #1d4ed8;
}

.hover\:to-blue-800:hover {
    --tw-gradient-to: #1e40af;
}

.hover\:from-yellow-600:hover {
    --tw-gradient-from: #ca8a04;
}

.hover\:to-orange-600:hover {
    --tw-gradient-to: #ea580c;
}

/* Text Colors */
.text-white {
    color: #ffffff;
}

.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-blue-600 {
    color: #2563eb;
}

.text-red-500 {
    color: #ef4444;
}

.text-red-600 {
    color: #dc2626;
}

.text-green-600 {
    color: #16a34a;
}

/* Hover Text Colors */
.hover\:text-blue-600:hover {
    color: #2563eb;
}

.hover\:text-red-600:hover {
    color: #dc2626;
}

/* Shadows */
.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);
}

/* Borders */
.border {
    border-width: 1px;
    border-style: solid;
}

.border-2 {
    border-width: 2px;
    border-style: solid;
}

.border-b {
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

.border-b-2 {
    border-bottom-width: 2px;
    border-bottom-style: solid;
}

.border-t {
    border-top-width: 1px;
    border-top-style: solid;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.border-transparent {
    border-color: transparent;
}

/* Rounded Corners */
.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;
}

/* Padding */
.p-0 {
    padding: 0;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-5 {
    padding: 1.25rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-0 {
    padding-left: 0;
    padding-right: 0;
}

.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-5 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-2\.5 {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Margin */
.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mx-2 {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.mx-4 {
    margin-left: 1rem;
    margin-right: 1rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Width */
.w-5 {
    width: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.w-8 {
    width: 2rem;
}

.w-full {
    width: 100%;
}

/* Height */
.h-5 {
    height: 1.25rem;
}

.h-6 {
    height: 1.5rem;
}

.h-8 {
    height: 2rem;
}

.h-full {
    height: 100%;
}

/* Max Width */
.max-w-md {
    max-width: 28rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-7xl {
    max-width: 80rem;
}

/* Flex */
.flex {
    display: flex;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 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));
}

/* Position */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.sticky {
    position: sticky;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.top-0 {
    top: 0;
}

.top-20 {
    top: 5rem;
}

/* Display */
.hidden {
    display: none;
}

.block {
    display: block;
}

.inline {
    display: inline;
}

/* Overflow */
.overflow-hidden {
    overflow: hidden;
}

.overflow-y-auto {
    overflow-y: auto;
}

/* Z-Index */
.z-50 {
    z-index: 50;
}

/* Aspect Ratio */
.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Font Size */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.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;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-5xl {
    font-size: 3rem;
    line-height: 1;
}

/* Font Weight */
.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* Text Align */
.text-center {
    text-align: center;
}

/* Whitespace */
.whitespace-nowrap {
    white-space: nowrap;
}

/* Space Between */
.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

/* Transition */
.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-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

/* Default button styles - keep minimal reset */
button {
    cursor: pointer;
    /* border and outline will be removed above */
}

button:focus {
    outline: none;
}

button::-moz-focus-inner {
    border: 0;
}

/* Default link styles */
a {
    text-decoration: none;
}

a:focus {
    outline: none;
}

/* Outline */
.focus\:outline-none:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.focus\:border-blue-500:focus {
    border-color: #3b82f6;
}

/* ===================================================
   ADDITIONAL UTILITY CLASSES (from JavaScript)
=================================================== */

/* Text Colors - Additional */
.text-amber-600 {
    color: #d97706;
}

.text-amber-700 {
    color: #b45309;
}

.text-blue-700 {
    color: #1d4ed8;
}

.text-indigo-200 {
    color: #c7d2fe;
}

.text-orange-600 {
    color: #ea580c;
}

/* Background Colors - Additional */
.bg-amber-50 {
    background-color: #fffbeb;
}

.bg-amber-200 {
    background-color: #fde68a;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-blue-100 {
    background-color: #dbeafe;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.bg-indigo-200 {
    background-color: #c7d2fe;
}

.bg-orange-100 {
    background-color: #ffedd5;
}

.bg-red-100 {
    background-color: #fee2e2;
}

/* Hover Background Colors - Additional */
.hover\:bg-orange-100:hover {
    background-color: #ffedd5;
}

.hover\:bg-red-100:hover {
    background-color: #fee2e2;
}

.hover\:bg-blue-600:hover {
    background-color: #2563eb;
}

.hover\:text-white:hover {
    color: #ffffff;
}

.hover\:text-orange-600:hover {
    color: #ea580c;
}

.hover\:text-red-600:hover {
    color: #dc2626;
}

/* Border Colors - Additional */
.border-amber-200 {
    border-color: #fde68a;
}

.border-blue-200 {
    border-color: #bfdbfe;
}

.border-blue-300 {
    border-color: #93c5fd;
}

.border-indigo-200 {
    border-color: #c7d2fe;
}

/* Hover Border Colors */
.hover\:border-blue-300:hover {
    border-color: #93c5fd;
}

/* Hover Shadow */
.hover\:shadow-md:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Width - Additional */
.w-4 {
    width: 1rem;
}

.w-12 {
    width: 3rem;
}

.w-16 {
    width: 4rem;
}

/* Height - Additional */
.h-4 {
    height: 1rem;
}

/* Max Width/Height */
.max-w-\[16\%\] {
    max-width: 16%;
}

.max-h-\[16\%\] {
    max-height: 16%;
}

/* Padding - Additional */
.p-3 {
    padding: 0.75rem;
}

.py-0\.5 {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Margin - Additional */
.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* Text Size - Additional */
.text-\[10px\] {
    font-size: 10px;
}

/* Flex - Additional */
.flex-col {
    flex-direction: column;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.flex-grow {
    flex-grow: 1;
}

/* Line Clamp */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Text Decoration */
.line-through {
    text-decoration: line-through;
}

.italic {
    font-style: italic;
}

/* Opacity */
.opacity-50 {
    opacity: 0.5;
}

/* Pseudo-class utilities */
.last\:border-b-0:last-child {
    border-bottom-width: 0;
}

/* Group utilities */
.group:hover .group-hover\:text-blue-600 {
    color: #2563eb;
}

/* Transition Colors */
.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Duration */
.duration-300 {
    transition-duration: 300ms;
}

/* Rounded - Additional */
.rounded-md {
    border-radius: 0.375rem;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Peer utilities (for checkbox toggle) */
.peer:focus ~ .peer-focus\:outline-none {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.peer:checked ~ .peer-checked\:after\:translate-x-6::after {
    transform: translateX(1.5rem);
}

.peer:checked ~ .peer-checked\:after\:border-white::after {
    border-color: #ffffff;
}

.peer:checked ~ .peer-checked\:bg-blue-600 {
    background-color: #2563eb;
}

/* After pseudo-element for toggle switch */
.peer ~ div::after {
    content: '';
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    height: 1.25rem;
    width: 1.25rem;
    transition: all 0.2s;
}

.peer:checked ~ div::after {
    transform: translateX(1.5rem);
    border-color: #ffffff;
}

/* Custom class for remove button */
.remove-option-btn {
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    transition: all 0.3s;
}

.remove-option-btn:hover {
    background-color: #dc2626;
}

/* Custom class for secret prize button */
.secret-prize-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    transition: all 0.3s;
}

/* ===================================================
   MISSING CLASSES - COMPLETE SET
=================================================== */

/* Accent Colors */
.accent-blue-600 {
    accent-color: #2563eb;
}

.accent-orange-600 {
    accent-color: #ea580c;
}

/* Animations */
.animate-bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* Appearance */
.appearance-none {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Background Colors - Missing */
.bg-amber-500 {
    background-color: #f59e0b;
}

.bg-black {
    background-color: #000000;
}

.bg-indigo-100 {
    background-color: #e0e7ff;
}

/* Background Opacity */
.bg-opacity-75 {
    background-color: rgba(0, 0, 0, 0.75);
}

/* Gradient From - Missing */
.from-amber-50 {
    --tw-gradient-from: #fffbeb;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 251, 235, 0));
}

.from-blue-50 {
    --tw-gradient-from: #eff6ff;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(239, 246, 255, 0));
}

.from-red-500 {
    --tw-gradient-from: #ef4444;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(239, 68, 68, 0));
}

/* Gradient To - Missing */
.to-indigo-50 {
    --tw-gradient-to: #eef2ff;
}

.to-orange-50 {
    --tw-gradient-to: #fff7ed;
}

.to-red-600 {
    --tw-gradient-to: #dc2626;
}

/* Border Colors - Missing */
.border-amber-300 {
    border-color: #fcd34d;
}

.border-t {
    border-top-width: 1px;
}

/* Text Colors - Missing */
.text-amber-800 {
    color: #92400e;
}

.text-blue-800 {
    color: #1e40af;
}

.text-gray-900 {
    color: #111827;
}

.text-indigo-700 {
    color: #4338ca;
}

.text-orange-800 {
    color: #9a3412;
}

.text-purple-700 {
    color: #7e22ce;
}

/* Hover Backgrounds - Missing */
.hover\:bg-amber-600:hover {
    background-color: #d97706;
}

.hover\:bg-indigo-200:hover {
    background-color: #c7d2fe;
}

/* Hover Gradients - Missing */
.hover\:from-amber-100:hover {
    --tw-gradient-from: #fef3c7;
}

.hover\:from-red-600:hover {
    --tw-gradient-from: #dc2626;
}

.hover\:to-orange-100:hover {
    --tw-gradient-to: #ffedd5;
}

.hover\:to-red-700:hover {
    --tw-gradient-to: #b91c1c;
}

/* Max Height - Missing */
.max-h-64 {
    max-height: 16rem;
}

.max-h-96 {
    max-height: 24rem;
}

.max-h-\[450px\] {
    max-height: 450px;
}

.max-h-\[500px\] {
    max-height: 500px;
}

/* Padding - Missing */
.p-2\.5 {
    padding: 0.625rem;
}

.p-8 {
    padding: 2rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Height - Missing */
.h-2 {
    height: 0.5rem;
}

.h-4 {
    height: 1rem;
}

/* Margin - Missing */
.mt-3 {
    margin-top: 0.75rem;
}

/* Space - Missing */
.space-y-1 > * + * {
    margin-top: 0.25rem;
}

/* Outline */
.outline-none {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* Transition - Missing */
.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Font Weight - Missing */
.font-extrabold {
    font-weight: 800;
}

.font-medium {
    font-weight: 500;
}

/* ===================================================
   RESPONSIVE UTILITIES
=================================================== */

/* Small devices (sm) - 640px and up */
@media (min-width: 640px) {
    .sm\:flex-nowrap {
        flex-wrap: nowrap;
    }
    
    .sm\:flex-grow {
        flex-grow: 1;
    }
    
    .sm\:w-auto {
        width: auto;
    }
}

/* Medium devices (md) - 768px and up */
@media (min-width: 768px) {
    .md\:inline {
        display: inline;
    }
    
    .md\:inline-block {
        display: inline-block;
    }
    
    .md\:hidden {
        display: none;
    }
    
    .md\:px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .md\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .md\:p-0 {
        padding: 0;
    }
    
    .md\:w-8 {
        width: 2rem;
    }
    
    .md\:h-8 {
        height: 2rem;
    }
}

/* Large devices (lg) - 1024px and up */
@media (min-width: 1024px) {
    .lg\:col-span-1 {
        grid-column: span 1 / span 1;
    }
    
    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }
    
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ===================================================
   CUSTOM SCROLLBAR
=================================================== */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb, #1e40af);
}

/* ===================================================
   WHEEL CONTAINER
=================================================== */
#wheelContainer {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1;
}

#wheelCanvas {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1;
    display: block;
    transform-origin: center center;
    will-change: transform;
    backface-visibility: hidden;
    z-index: 1;
    image-rendering: auto;
    transform: translateZ(0);
}

/* ===================================================
   POINTER
=================================================== */
.pointer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%); 
    z-index: 10;
    pointer-events: none;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 35px solid #ef4444;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.5));
    transform-origin: 50% 0%; /* Đặt điểm xoay ở phần to (đầu trên) */
}

.pointer-tip {
    display: none;
}

@media (min-width: 768px) {
    .pointer {
        border-left: 20px solid transparent;
        border-right: 20px solid transparent;
        border-top: 50px solid #ef4444;
    }
}

@media (min-width: 1024px) {
    .pointer {
        border-left: 22px solid transparent;
        border-right: 22px solid transparent;
        border-top: 55px solid #ef4444;
    }
}

.pointer.shake {
    animation: pointerShake 0.25s ease-in-out;
}

/* Animation lắc liên tục khi đang quay */
.pointer.spinning {
    animation: pointerSwing 0.15s ease-in-out infinite;
}

@keyframes pointerShake {
    0%   { transform: translateX(-50%) rotate(0deg); }
    30%  { transform: translateX(-50%) rotate(-6deg); }
    60%  { transform: translateX(-50%) rotate(6deg); }
    100% { transform: translateX(-50%) rotate(0deg); }
}

@keyframes pointerSwing {
    0%   { transform: translateX(-50%) rotate(-5deg); }
    50%  { transform: translateX(-50%) rotate(5deg); }
    100% { transform: translateX(-50%) rotate(-5deg); }
}

/* ===================================================
   CENTER LOGO
=================================================== */
#wheelContainer > div {
    z-index: 50 !important;
}

#wheelContainer img {
    position: relative;
    z-index: 50;
}

/* ===================================================
   SPIN BUTTON
=================================================== */
.spin-btn {
    position: relative;
    z-index: 5000;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    font-weight: 700;
    padding: 1rem 3rem;
    margin-bottom: 2rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(22, 163, 74, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.spin-btn:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    box-shadow: 0 15px 35px rgba(22, 163, 74, 0.5);
    transform: translateY(-2px);
}

.spin-btn:active {
    transform: translateY(0) scale(0.98);
}

.spin-btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(134, 239, 172, 0.5), 0 15px 35px rgba(22, 163, 74, 0.5);
}

@media (min-width: 768px) {
    .spin-btn:hover::after {
        content: 'Có thể bấm Space để quay';
        position: absolute;
        bottom: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.9);
        color: white;
        padding: 8px 16px;
        border-radius: 8px;
        font-size: 0.875rem;
        font-weight: 500;
        white-space: nowrap;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        animation: tooltipFadeIn 0.2s ease-out;
        pointer-events: none;
        z-index: 101;
    }

    .spin-btn:hover::before {
        content: '';
        position: absolute;
        bottom: calc(100% + 2px);
        left: 50%;
        transform: translateX(-50%);
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 8px solid rgba(0, 0, 0, 0.9);
        animation: tooltipFadeIn 0.2s ease-out;
        pointer-events: none;
        z-index: 101;
    }
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===================================================
   FULLSCREEN MODES
=================================================== */
.ios-fullscreen-active,
.fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 100000 !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
    border-radius: 0px !important;
    touch-action: none;
}

.ios-fullscreen-active #wheelContainer,
.fullscreen-mode #wheelContainer {
    max-width: 90vmin !important;
    max-height: 90vmin !important;
    width: 90vmin !important;
    height: 90vmin !important;
    z-index: 100001 !important;
}

/* Hide header in fullscreen */
.ios-fullscreen-active ~ header,
.fullscreen-mode ~ header,
body:has(.ios-fullscreen-active) header,
body:has(.fullscreen-mode) header,
:fullscreen header,
:-webkit-full-screen header {
    display: none !important;
}

/* Mobile Fullscreen */
@media (max-width: 767px) {
    .ios-fullscreen-active #wheelContainer,
    .fullscreen-mode #wheelContainer {
        max-width: 99vmin !important;
        max-height: 99vmin !important;
        width: 99vmin !important;
        height: 99vmin !important;
    }

    .ios-fullscreen-active #spinBtn,
    .fullscreen-mode #spinBtn {
        position: fixed !important;
        bottom: 60px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 100003 !important;
        white-space: nowrap !important;
        padding: 0.8rem 2rem !important;
        font-size: clamp(1rem, 3.5vw, 1.5rem) !important;
    }
}

/* Tablet Fullscreen */
@media (min-width: 768px) and (max-width: 1023px) {
    .ios-fullscreen-active #wheelContainer,
    .fullscreen-mode #wheelContainer {
        max-width: 92vmin !important;
        max-height: 92vmin !important;
        width: 92vmin !important;
        height: 92vmin !important;
    }

    .ios-fullscreen-active #spinBtn,
    .fullscreen-mode #spinBtn {
        position: fixed !important;
        bottom: 30px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 100003 !important;
        white-space: nowrap !important;
    }
}

/* Desktop Fullscreen */
@media (min-width: 1024px) {
    .ios-fullscreen-active #wheelContainer,
    .fullscreen-mode #wheelContainer {
        max-width: 90vmin !important;
        max-height: 90vmin !important;
        width: 90vmin !important;
        height: 90vmin !important;
    }

    .ios-fullscreen-active #spinBtn,
    .fullscreen-mode #spinBtn {
        position: fixed !important;
        right: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        font-size: 2.2rem !important;
        padding: 1.6rem 2rem !important;
        z-index: 100003 !important;
        white-space: nowrap !important;
    }
}

/* ===================================================
   RESULT POPUP
=================================================== */
#resultPopup {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 200000 !important;
}

#resultPopup.show-popup {
    display: flex;
}


#resultPopup > div {
    animation: popupBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popupBounce {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===================================================
   ANIMATIONS
=================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(400px); opacity: 0; }
}

.show-popup {
    animation: fadeIn 0.3s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* ===================================================
   PROBABILITY CONTROLS
=================================================== */
#probabilityControls > div {
    transition: all 0.2s ease;
}

#probabilityControls > div:hover {
    background-color: #ddd;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

/* ===================================================
   TAB SYSTEM
=================================================== */
.tab-btn {
    color: #6b7280;
    position: relative;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb !important;
    background: linear-gradient(to bottom, transparent 0%, #eff6ff 100%);
}

.tab-btn:hover {
    color: #3b82f6;
}

.tab-content {
    display: none;
    animation: tabFadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Saved Lists Cards in Tab */
#savedListsGrid > div {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

#savedListsGrid > div:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

#savedListsGrid h3 {
    font-size: 0.875rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

#savedListsGrid > div:hover h3 {
    color: #2563eb;
}

#savedListsGrid p {
    font-size: 0.75rem;
    color: #6b7280;
}

#savedListsGrid button {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
}

/* Empty message styling */
#emptySavedMessage {
    display: block;
}

#savedListsGrid:not(:empty) ~ #emptySavedMessage {
    display: none;
}

#savedListsGrid:empty {
    display: none;
}

/* Options Count Badge */
#optionsCount {
    transition: all 0.2s ease;
}

/* ===================================================
   RESPONSIVE ADJUSTMENTS
=================================================== */
@media (max-width: 640px) {
    .spin-btn {
        padding: 0.875rem 2rem;
        margin-bottom: 2rem;
        font-size: 1.25rem;
    }
    
    .tab-btn span {
        font-size: 1rem;
    }
    
    .tab-btn svg {
        width: 1rem;
        height: 1rem;
    }
}

@media (max-width: 1024px) {
    header h1 {
        font-size: 1.5rem;
    }
}

/* ===================================================
   HEADER Z-INDEX
=================================================== */
header {
    z-index: 50;
}

/* ===================================================
   BUTTONS - NORMAL & FULLSCREEN POSITIONING
=================================================== */

/* Normal mode - buttons in header */
#soundToggleBtn,
#fullscreenBtn {
    position: relative;
    z-index: 100;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* CRITICAL FIX: Buttons visibility when moved to body by JavaScript */
body > #soundToggleBtn,
body > #fullscreenBtn {
    position: fixed !important;
    z-index: 2147483647 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

body > #soundToggleBtn {
    top: 1rem !important;
    left: 1rem !important;
}

body > #fullscreenBtn {
    top: 1rem !important;
    right: 1rem !important;
}

/* Mobile - hide button text when in body */
@media (max-width: 767px) {
    body > #soundToggleBtn span,
    body > #fullscreenBtn span {
        display: none !important;
    }
}

/* ===================================================
   RANGE SLIDER STYLING
=================================================== */
/* Webkit (Chrome, Safari, Edge) */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: #3b82f68c;
    height: 8px;
    cursor: pointer;
}

/* Track */
input[type="range"]::-webkit-slider-track {
    background: linear-gradient(to right, #3b82f6 0%, #2563eb 100%);
    border-radius: 10px;
    border: 1px solid #dbeafe;
}

input[type="range"]::-moz-range-track {
    background: linear-gradient(to right, #3b82f6 0%, #2563eb 100%);
    height: 8px;
    border-radius: 10px;
    border: 1px solid #dbeafe;
}

/* Thumb */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

/* Hover effects */
input[type="range"]:hover::-webkit-slider-thumb {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.4);
    transform: scale(1.1);
}

input[type="range"]:hover::-moz-range-thumb {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.4);
    transform: scale(1.1);
}

/* Active/Focus states */
input[type="range"]:active::-webkit-slider-thumb {
    background: #dbeafe;
    border-color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.5);
    transform: scale(1.15);
}

input[type="range"]:active::-moz-range-thumb {
    background: #dbeafe;
    border-color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.5);
    transform: scale(1.15);
}

input[type="range"]:focus {
    outline: none;
}

input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 2px 6px rgba(59, 130, 246, 0.3);
}

input[type="range"]:focus::-moz-range-thumb {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* Fullscreen wheel card */
#wheelCard:fullscreen {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

#wheelCard:fullscreen * {
    font-size: 14px; 
}

#wheelCard:fullscreen #wheelContainer {
    transform: scale(1.2);
}

#soundToggleBtn, #fullscreenBtn {
    transition: all 0.3s ease;
    position: relative;
}

/* Đảm bảo sidebar toggle button cũng có position relative cho tooltip */
#sidebarToggleBtn {
    position: relative;
}

.btn-gradient {
    background: linear-gradient(to right, #dc2626, #2563eb);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-gradient:hover {
    background: linear-gradient(to right, #b91c1c, #1d4ed8);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .btn-gradient {
        padding: 0.5rem 1rem;
    }
}


/* Tooltip CHỈ HIỆN KHI DÙNG CHUỘT (PC / Laptop) */
@media (hover: hover) and (pointer: fine) {
    #soundToggleBtn[title]:hover::after,
    #fullscreenBtn[title]:hover::after,
    #sidebarToggleBtn[title]:hover::after {
        content: attr(title);
        position: absolute;
        top: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.9);
        color: white;
        padding: 8px 12px;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 500;
        white-space: nowrap;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        animation: tooltipFadeInDown 0.2s ease-out;
        pointer-events: none;
        z-index: 1000;
    }

    #soundToggleBtn[title]:hover::before,
    #fullscreenBtn[title]:hover::before,
    #sidebarToggleBtn[title]:hover::before {
        content: '';
        position: absolute;
        top: calc(100% + 2px);
        left: 50%;
        transform: translateX(-50%);
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-bottom: 6px solid rgba(0, 0, 0, 0.9);
        animation: tooltipFadeInDown 0.2s ease-out;
        pointer-events: none;
        z-index: 1000;
    }
}


@keyframes tooltipFadeInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===================================================
   DISABLED STATE KHI ĐANG QUAY
=================================================== */
.disabled-while-spinning {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: auto !important;
}

.disabled-while-spinning:hover {
    cursor: not-allowed !important;
}

/* Input fields disabled */
#optionInput.disabled-while-spinning {
    background-color: #f3f4f6;
    color: #9ca3af;
}

/* Buttons disabled - giữ nguyên màu nhưng mờ đi */
button.disabled-while-spinning {
    filter: grayscale(30%);
}

/* List items disabled */
#optionsList li.disabled-while-spinning {
    opacity: 0.6;
}

#optionsList li.disabled-while-spinning button {
    cursor: not-allowed !important;
}


#secretValuePopup {
z-index: 99999;
}



.btn-load-default {
    flex: 1;

    /* Gradient nền */
    background: linear-gradient(to right, #22c55e, #059669); /* green-500 → emerald-600 */

    color: #ffffff;
    padding: 0.625rem 0.75rem; /* px-3 py-2.5 */
    border-radius: 0.5rem;     /* rounded-lg */
    border: none;

    font-size: 0.875rem;       /* text-sm */
    font-weight: 600;          /* font-semibold */

    box-shadow: 0 1px 2px rgba(0,0,0,0.08); /* shadow-sm */
    cursor: pointer;

    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

/* Hover */
.btn-load-default:hover {
    background: linear-gradient(to right, #16a34a, #047857); /* green-600 → emerald-700 */
}

/* Active (bấm xuống cho có cảm giác thật tay hơn) */
.btn-load-default:active {
    transform: scale(0.98);
}

/* Focus (đẹp & thân thiện bàn phím) */
.btn-load-default:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
}
