/* Gemini Personality Quiz - Style Override & Reset */

/* 1. Main Container Isolation */
#root {
    all: unset;
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 2. Universal Reset within the App */
#root *,
#root *::before,
#root *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb; /* Corresponds to Tailwind's border-gray-200 */
}

/* 3. Element-specific Resets */
#root h1, #root h2, #root p, #root button, #root img, #root div {
    font: inherit;
    line-height: inherit;
    color: inherit;
}

#root button {
    font-family: inherit;
    background-color: transparent;
    background-image: none;
    cursor: pointer;
    -webkit-appearance: button;
    text-transform: none;
    padding: 0;
}

#root button:focus {
    outline: 1px dotted;
    outline: 5px auto -webkit-focus-ring-color;
}

#root img, #root svg {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
    vertical-align: middle;
}

/* 4. Keyframe Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  '50%' { opacity: .5; }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gradient-animation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes subtle-glow {
  0% { box-shadow: 0 0 1rem rgba(99, 102, 241, 0.4); } /* indigo-500 */
  50% { box-shadow: 0 0 1.5rem rgba(165, 180, 252, 0.6); } /* indigo-300 */
  100% { box-shadow: 0 0 1rem rgba(99, 102, 241, 0.4); }
}

/* 5. Animation Classes (prefix with #root to increase specificity) */
#root .animate-spin { animation: spin 1s linear infinite; }
#root .animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
#root .animate-fade-in { animation: fade-in 0.5s ease-out forwards; }
#root .animate-gradient { background-size: 200% 200%; animation: gradient-animation 15s ease infinite; }
#root .animate-subtle-glow { animation: subtle-glow 4s ease-in-out infinite; }

/* 6. Base Typography & Color Enforcement */
#root {
    color: #d1d5db; /* Default to text-gray-300 */
    line-height: 1.6;
}

/* Utility classes that might be needed by the JS templates */
#root .text-transparent { color: transparent !important; }
#root .bg-clip-text { -webkit-background-clip: text !important; background-clip: text !important; }
#root .min-h-screen { min-height: 100vh; }
#root .bg-gray-900 { background-color: #111827 !important; }
#root .text-gray-100 { color: #f3f4f6; }
#root .flex { display: flex !important; }
#root .flex-col { flex-direction: column !important; }
#root .items-center { align-items: center !important; }
#root .justify-center { justify-content: center !important; }
#root .p-4 { padding: 1rem; }
#root .font-sans { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
#root .selection\:bg-indigo-500\/50 *::selection { background-color: rgba(99, 102, 241, 0.5); }
#root .absolute { position: absolute !important; }
#root .inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
#root .bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)) !important; }
#root .from-indigo-900\/70 { --tw-gradient-from: rgba(30, 27, 75, 0.7); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(30, 27, 75, 0)); }
#root .via-gray-900 { --tw-gradient-stops: var(--tw-gradient-from), #111827, var(--tw-gradient-to, rgba(17, 24, 39, 0)); }
#root .to-purple-900\/70 { --tw-gradient-to: rgba(55, 30, 91, 0.7); }
#root .w-full { width: 100%; }
#root .max-w-2xl { max-width: 42rem; }
#root .mx-auto { margin-left: auto; margin-right: auto; }
#root .bottom-4 { bottom: 1rem; }
#root .text-center { text-align: center; }
#root .text-gray-500 { color: #6b7280; }
#root .text-sm { font-size: 0.875rem; }
#root .text-lg { font-size: 1.125rem; }
#root .text-xl { font-size: 1.25rem; }
#root .text-2xl { font-size: 1.5rem; }
#root .text-3xl { font-size: 1.875rem; }
#root .text-4xl { font-size: 2.25rem; }
#root .md\:text-5xl { font-size: 3rem; }
#root .font-bold { font-weight: 700; }
#root .font-extrabold { font-weight: 800; }
#root .font-medium { font-weight: 500; }
#root .font-semibold { font-weight: 600; }
#root .mb-2 { margin-bottom: 0.5rem; }
#root .mb-4 { margin-bottom: 1rem; }
#root .mb-6 { margin-bottom: 1.5rem; }
#root .mb-8 { margin-bottom: 2rem; }
#root .p-8 { padding: 2rem; }
#root .px-8 { padding-left: 2rem; padding-right: 2rem; }
#root .px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
#root .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
#root .py-4 { padding-top: 1rem; padding-bottom: 1rem; }
#root .bg-gray-800\/50 { background-color: rgba(31, 41, 55, 0.5) !important; }
#root .backdrop-blur-sm { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
#root .rounded-2xl { border-radius: 1rem; }
#root .rounded-3xl { border-radius: 1.5rem; }
#root .rounded-full { border-radius: 9999px; }
#root .rounded-xl { border-radius: 0.75rem; }
#root .shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); }
#root .shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
#root .border { border-width: 1px; }
#root .border-gray-700 { border-color: #374151; }
#root .from-purple-400 { --tw-gradient-from: #c084fc; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(192, 132, 252, 0)); }
#root .to-indigo-400 { --tw-gradient-to: #818cf8; }
#root .max-w-lg { max-width: 32rem; }
#root .text-gray-300 { color: #d1d5db; }
#root .inline-flex { display: inline-flex !important; }
#root .gap-3 { gap: 0.75rem; }
#root .bg-indigo-600 { background-color: #4f46e5 !important; }
#root .text-white { color: #ffffff; }
#root .hover\:bg-indigo-500:hover { background-color: #6366f1 !important; }
#root .transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
#root .duration-300 { transition-duration: 300ms; }
#root .duration-500 { transition-duration: 500ms; }
#root .transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); }
#root .hover\:scale-105:hover { --tw-scale-x: 1.05; --tw-scale-y: 1.05; transform: scale(1.05); }
#root .active\:scale-95:active { --tw-scale-x: .95; --tw-scale-y: .95; transform: scale(.95); }
#root .hover\:shadow-indigo-500\/50:hover { box-shadow: 0 10px 15px -3px rgba(99,102,241,0.5), 0 4px 6px -2px rgba(99,102,241,0.5); }
#root .focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
#root .focus\:ring-4:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); }
#root .focus\:ring-indigo-500\/50:focus { --tw-ring-color: rgba(99, 102, 241, 0.5); }
#root .w-5 { width: 1.25rem; height: 1.25rem; }
#root .h-5 { height: 1.25rem; }
#root .group:hover .group-hover\:translate-x-1 { --tw-translate-x: 0.25rem; transform: translateX(0.25rem); }
#root .group:hover .group-hover\:rotate-180 { --tw-rotate: 180deg; transform: rotate(180deg); }
#root .relative { position: relative !important; }
#root .w-24 { width: 6rem; height: 6rem; }
#root .h-24 { height: 6rem; }
#root .border-4 { border-width: 4px; }
#root .border-t-4 { border-top-width: 4px; }
#root .border-gray-600 { border-color: #4b5563; }
#root .border-t-indigo-500 { border-top-color: #6366f1; }
#root .w-10 { width: 2.5rem; height: 2.5rem; }
#root .h-10 { height: 2.5rem; }
#root .text-indigo-400 { color: #818cf8; }
#root .h-7 { height: 1.75rem; }
#root .justify-between { justify-content: space-between !important; }
#root .bg-gray-700 { background-color: #374151 !important; }
#root .h-2\.5 { height: 0.625rem !important; }
#root .from-purple-500 { --tw-gradient-from: #a855f7; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(168, 85, 247, 0)); }
#root .to-indigo-500 { --tw-gradient-to: #6366f1; }
#root .grid { display: grid !important; }
#root .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
#root .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#root .gap-4 { gap: 1rem; }
#root .bg-gray-700\/60 { background-color: rgba(55, 65, 81, 0.6) !important; }
#root .border-gray-600 { border-color: #4b5563; }
#root .text-left { text-align: left; }
#root .text-gray-200 { color: #e5e7eb; }
#root .hover\:-translate-y-1:hover { --tw-translate-y: -0.25rem; transform: translateY(-0.25rem); }
#root .hover\:border-indigo-500:hover { border-color: #6366f1; }
#root .hover\:bg-indigo-600\/30:hover { background-color: rgba(79, 70, 229, 0.3) !important; }
#root .focus\:ring-2:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); }
#root .focus\:ring-offset-2:focus { --tw-ring-offset-width: 2px; }
#root .focus\:ring-offset-gray-900:focus { --tw-ring-offset-color: #111827; }
#root .focus\:ring-indigo-400:focus { --tw-ring-color: #818cf8; }
#root .text-indigo-300 { color: #a5b4fc; }
#root .aspect-square { aspect-ratio: 1/1; }
#root .max-w-md { max-width: 28rem; }
#root .overflow-hidden { overflow: hidden; }
#root .object-cover { object-fit: cover !important; width: 100% !important; height: 100% !important; }
#root .space-y-4 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(1rem * var(--tw-space-y-reverse)); }
#root .max-w-xl { max-width: 36rem; }
#root .leading-relaxed { line-height: 1.625; }
#root .bg-red-500\/50 { background-color: rgba(239, 68, 68, 0.5) !important; }
#root .text-indigo-600 { color: #4f46e5; }
#root .hover\:bg-gray-200:hover { background-color: #e5e7eb !important; }

/* For JS dynamic templates */
#root .group .group-hover\:translate-x-1 { transition-property: transform; }
#root .group .group-hover\:rotate-180 { transition-property: transform; }
#root svg, #root img {
    display: inline-block; /* Fix for some theme conflicts */
    vertical-align: middle;
}
#root button svg {
    pointer-events: none; /* Prevent SVG inside button from capturing click */
}
