:root {
    --primary: #1296db;
    --secondary: #0A4DA2;
    --accent: #00B8D9;
    --background-light: #f5f7f8;
    --dark: #0F172A;
    --dark-gray: #1E293B;
    --light-gray: #F8FAFC;
    --medium-gray: #64748B;
}

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

html {
    scroll-behavior: smooth;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape on iOS */
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--dark);
    background-color: white;
    line-height: 1.6; /* Increased for better readability */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* Base Elements Reset (Mimic Tailwind Preflight) */
a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
}

img, video {
    max-width: 100%;
    height: auto;
}

button, [type='button'], [type='reset'], [type='submit'] {
    -webkit-appearance: button;
    background-color: transparent;
    background-image: none;
}

ul, ol {
    list-style: none;
}


/* Base Utilities */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.grid { display: grid; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.min-h-screen { min-height: 100vh; }
.overflow-hidden { overflow: hidden; }

/* Spacing & Sizing */
.container { width: 100%; margin-right: auto; margin-left: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

/* Padding */
.p-0\.5 { padding: 0.125rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.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; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-12 { padding-left: 3rem; padding-right: 3rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.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-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-7 { padding-top: 1.75rem; padding-bottom: 1.75rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.pt-4 { padding-top: 1rem; }
.pt-8 { padding-top: 2rem; }
.pt-32 { padding-top: 8rem; }
.pb-20 { padding-bottom: 5rem; }
.pb-24 { padding-bottom: 6rem; }
.pl-6 { padding-left: 1.5rem; }
.pl-12 { padding-left: 3rem; }
.pr-12 { padding-right: 3rem; }

/* Margin */
.m-4 { margin: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-16 { margin-top: 4rem; }
.mt-20 { margin-top: 5rem; }
.mt-auto { margin-top: auto; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-4 { margin-left: 1rem; }
.ml-64 { margin-left: 16rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-4 { margin-right: 1rem; }

/* Gap */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-x-10 > * + * { margin-left: 2.5rem; }
.space-x-12 > * + * { margin-left: 3rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.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-y-8 > * + * { margin-top: 2rem; }
.space-y-16 > * + * { margin-top: 4rem; }

/* Width & Height */
.w-1 { width: 0.25rem; }
.w-2 { width: 0.5rem; }
.w-3 { width: 0.75rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-64 { width: 16rem; }
.h-1 { height: 0.25rem; }
.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-7 { height: 1.75rem; }
.h-8 { height: 2rem; }
.h-9 { height: 2.25rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-24 { height: 6rem; }
.h-full { height: 100%; }
.max-w-xs { max-width: 20rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }
.w-1\/2 { width: 50%; }
.w-1\/3 { width: 33.333333%; }
.w-1\/4 { width: 25%; }
.w-1\/5 { width: 20%; }
.w-2\/3 { width: 66.666667%; }
.h-1\/3 { height: 33.333333%; }
.h-1\/4 { height: 25%; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Colors */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-white { color: white; }
.text-white\/90 { color: rgba(255, 255, 255, 0.9); }
.text-dark { color: var(--dark); }
.text-dark-gray { color: var(--dark-gray); }
.text-medium-gray { color: var(--medium-gray); }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-red-500 { color: #ef4444; }
.text-green-500 { color: #22c55e; }
.text-purple-500 { color: #a855f7; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-900 { color: #0f172a; }
.text-blue-700 { color: #1d4ed8; }

.bg-primary { background-color: var(--primary); }
.bg-primary\/5 { background-color: rgba(53, 158, 255, 0.05); }
.bg-primary\/10 { background-color: rgba(53, 158, 255, 0.1); }
.bg-primary\/20 { background-color: rgba(53, 158, 255, 0.2); }
.bg-primary\/30 { background-color: rgba(53, 158, 255, 0.3); }
.bg-primary\/40 { background-color: rgba(53, 158, 255, 0.4); }
.bg-primary\/50 { background-color: rgba(53, 158, 255, 0.5); }
.bg-primary\/60 { background-color: rgba(53, 158, 255, 0.6); }
.bg-primary\/70 { background-color: rgba(53, 158, 255, 0.7); }
.bg-primary\/80 { background-color: rgba(53, 158, 255, 0.8); }
.bg-primary\/90 { background-color: rgba(53, 158, 255, 0.9); }
.bg-secondary { background-color: var(--secondary); }
.bg-accent\/5 { background-color: rgba(0, 184, 217, 0.05); }
.bg-accent\/10 { background-color: rgba(0, 184, 217, 0.1); }
.bg-white { background-color: white; }
.bg-white\/50 { background-color: rgba(255, 255, 255, 0.5); }
.bg-white\/95 { background-color: rgba(255, 255, 255, 0.95); }
.bg-light-gray { background-color: var(--light-gray); }
.bg-background-light { background-color: var(--background-light); }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-red-50 { background-color: #fef2f2; }
.bg-red-500 { background-color: #ef4444; }
.bg-red-600 { background-color: #dc2626; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-green-500 { background-color: #22c55e; }
.bg-yellow-50 { background-color: #fefce8; }
.bg-yellow-500 { background-color: #eab308; }
.bg-purple-500 { background-color: #a855f7; }
.bg-orange-500 { background-color: #f97316; }
.bg-transparent { background-color: transparent; }
.bg-black\/50 { background-color: rgba(0, 0, 0, 0.5); }

/* Gradients */
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--tw-gradient-stops)); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.from-primary { --tw-gradient-from: var(--primary); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(53, 158, 255, 0)); }
.from-primary\/5 { --tw-gradient-from: rgba(53, 158, 255, 0.05); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(53, 158, 255, 0)); }
.from-primary\/10 { --tw-gradient-from: rgba(53, 158, 255, 0.1); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(53, 158, 255, 0)); }
.from-primary\/20 { --tw-gradient-from: rgba(53, 158, 255, 0.2); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(53, 158, 255, 0)); }
.from-light-gray { --tw-gradient-from: var(--light-gray); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(248, 250, 252, 0)); }
.from-green-50 { --tw-gradient-from: #f0fdf4; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(240, 253, 244, 0)); }
.from-purple-50 { --tw-gradient-from: #faf5ff; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(250, 245, 255, 0)); }
.from-orange-50 { --tw-gradient-from: #fff7ed; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 247, 237, 0)); }
.via-white { --tw-gradient-via: white; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to, rgba(255, 255, 255, 0)); }
.to-accent { --tw-gradient-to: var(--accent); }
.to-accent\/10 { --tw-gradient-to: rgba(0, 184, 217, 0.1); }
.to-white { --tw-gradient-to: white; }
.to-primary\/5 { --tw-gradient-to: rgba(53, 158, 255, 0.05); }
.to-transparent { --tw-gradient-to: transparent; }

/* Typography */
.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-[24px] { font-size: 24px; }
.text-[28px] { font-size: 28px; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-wider { letter-spacing: 0.05em; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.whitespace-nowrap { white-space: nowrap; }
.hover\:underline:hover { text-decoration: underline; }

/* Borders & Rounded */
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-4 { border-width: 4px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-l { border-left-width: 1px; }
.border-l-4 { border-left-width: 4px; }
.border-r-4 { border-right-width: 4px; }
.border-dashed { border-style: dashed; }
.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-gray-800 { border-color: #1f2937; }
.border-primary { border-color: var(--primary); }
.border-primary\/20 { border-color: rgba(53, 158, 255, 0.2); }
.border-slate-200 { border-color: #e2e8f0; }
.border-red-100 { border-color: #fee2e2; }
.border-blue-100 { border-color: #dbeafe; }
.border-yellow-100 { border-color: #fef9c3; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.rounded-l-none { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.rounded-r-none { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* Language Switcher Specific */
.lang-btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.lang-btn:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; }

/* Effects - Advanced & Concise 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.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02); }
.shadow-elevation-1 { box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03); }
.shadow-elevation-2 { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04); }
.shadow-elevation-3 { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06); }
.blur-3xl { filter: blur(64px); }
.backdrop-blur-sm { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* Transitions - Smooth & Natural */
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 300ms; }
.transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 300ms; }
.transition-shadow { transition-property: box-shadow; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 300ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 300ms; }
.duration-300 { transition-duration: 300ms; }

/* Positioning */
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.left-1\/2 { left: 50%; }
.top-1\/2 { top: 50%; }
.-translate-x-1\/2 { transform: translateX(-50%); }
.-translate-y-1\/2 { transform: translateY(-50%); }
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.-z-10 { z-index: -10; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.sticky { position: sticky; }

/* Misc */
.cursor-pointer { cursor: pointer; }
.outline-none { outline: 2px solid transparent; outline-offset: 2px; }
.flex-1 { flex: 1 1 0%; }
.flex-none { flex: none; }
.shrink-0 { flex-shrink: 0; }
.order-1 { order: 1; }
.order-2 { order: 2; }
.ring-4 { box-shadow: 0 0 0 4px var(--tw-ring-color); }
.ring-primary\/20 { --tw-ring-color: rgba(53, 158, 255, 0.2); }
.ring-2 { box-shadow: 0 0 0 2px var(--tw-ring-color); }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px var(--tw-ring-color); }
.focus\:ring-primary\/20:focus { --tw-ring-color: rgba(53, 158, 255, 0.2); }
.focus\:ring-primary\/50:focus { --tw-ring-color: rgba(53, 158, 255, 0.5); }
.focus\:border-primary:focus { border-color: var(--primary); }

/* Hover States */
.hover\:text-primary:hover { color: var(--primary); }
.hover\:text-dark:hover { color: var(--dark); }
.hover\:bg-secondary:hover { background-color: var(--secondary); }
.hover\:bg-primary\/5:hover { background-color: rgba(53, 158, 255, 0.05); }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-gray-200:hover { background-color: #e5e7eb; }
.hover\:bg-red-600:hover { background-color: #dc2626; }
.hover\:bg-red-50:hover { background-color: #fef2f2; }
.hover\:shadow-elevation-2:hover { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07); }
.hover\:shadow-elevation-3:hover { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.07); }
.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); }
.hover\:-translate-y-1:hover { transform: translateY(-0.25rem); }
.hover\:border-primary:hover { border-color: var(--primary); }

/* Media Queries */
@media (min-width: 768px) {
    .md\:block { display: block; }
    .md\:hidden { display: none !important; }
    .md\:flex { display: flex; }
    .md\:flex-row { flex-direction: row; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:h-20 { height: 5rem; }
    .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
    .md\:text-5xl { font-size: 3rem; line-height: 1; }
    .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
    .md\:gap-8 { gap: 2rem; }
    .md\:mb-0 { margin-bottom: 0; }
    .md\:ml-0 { margin-left: 0; }
    .md\:mr-2 { margin-right: 0.5rem; }
    .md\:w-1\/2 { width: 50%; }
    .md\:w-1\/3 { width: 33.333333%; }
    .md\:w-2\/3 { width: 66.666667%; }
    .md\:w-1\/5 { width: 20%; }
    .md\:pl-12 { padding-left: 3rem; }
    .md\:pr-12 { padding-right: 3rem; }
    .md\:px-12 { padding-left: 3rem; padding-right: 3rem; }
    .md\:py-32 { padding-top: 8rem; padding-bottom: 8rem; }
    .md\:pt-48 { padding-top: 12rem; }
    .md\:pb-40 { padding-bottom: 10rem; }
    .md\:text-right { text-align: right; }
    .md\:justify-end { justify-content: flex-end; }
    .md\:order-1 { order: 1; }
    .md\:order-2 { order: 2; }
}

@media (min-width: 1024px) {
    .lg\:flex { display: flex; }
    .lg\:hidden { display: none !important; }
    .lg\:text-7xl { font-size: 4.5rem; line-height: 1; }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
    .xl\:flex { display: flex; }
    .xl\:hidden { display: none !important; }
}

/* Snap scroll utilities (for app.html) */
.snap-x { scroll-snap-type: x mandatory; }
.snap-mandatory { scroll-snap-type: x mandatory; }
.snap-center { scroll-snap-align: center; }
.overflow-x-auto { overflow-x: auto; }
.scroll-smooth { scroll-behavior: smooth; }

/* Custom Components extracted from HTML styles */
.section-padding { padding-top: 5rem; padding-bottom: 5rem; }
@media (min-width: 768px) { .section-padding { padding-top: 8rem; padding-bottom: 8rem; } }

.container-custom { width: 100%; margin-right: auto; margin-left: auto; padding-left: 1.5rem; padding-right: 1.5rem; }
@media (min-width: 768px) { .container-custom { padding-left: 3rem; padding-right: 3rem; max-width: 1280px; } }

.card-hover { transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.card-hover:hover { box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.08); transform: translateY(-4px); }

.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(53, 158, 255, 0.2);
}
.btn-primary:hover {
    background-color: var(--secondary);
    box-shadow: 0 8px 15px rgba(53, 158, 255, 0.3);
    transform: translateY(-1px);
}

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
    display: inline-block;
}
.btn-outline:hover {
    background-color: rgba(53, 158, 255, 0.05);
    box-shadow: 0 4px 10px rgba(53, 158, 255, 0.1);
}

.btn-secondary {
    background-color: white;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-block;
}
.btn-secondary:hover {
    background-color: rgba(53, 158, 255, 0.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-block;
}
.btn-danger:hover { background-color: #dc2626; }

.bg-gradient-primary { background-image: linear-gradient(to right, var(--primary), var(--accent)); }
.text-gradient { background-clip: text; -webkit-background-clip: text; color: transparent; background-image: linear-gradient(to right, var(--primary), var(--accent)); }

.nav-link { position: relative; color: var(--dark-gray); transition: color 0.3s; }
.nav-link:hover { color: var(--primary); }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--primary); transition: width 0.3s; }
.nav-link:hover::after { width: 100%; }

.lang-switcher { display: flex; align-items: center; background-color: #f3f4f6; border-radius: 9999px; padding: 0.125rem; }
.lang-btn { font-size: 0.875rem; font-weight: 500; padding: 0.25rem 0.75rem; border-radius: 9999px; transition: all 0.3s; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lang-btn:active { transform: scale(0.95); }
.lang-btn.bg-primary { background-color: var(--primary); color: white; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
#logoText {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.25rem 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.25rem;
    border-radius: 0.625rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
#logoText:active { background-color: rgba(18, 150, 219, 0.08); transform: scale(0.98); }
#menuBtn { width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; display: inline-flex; align-items: center; justify-content: center; border: none; outline: none; -webkit-tap-highlight-color: transparent; }
#menuBtn:focus { outline: none; }
#menuBtn:active { transform: scale(0.98); background-color: rgba(18, 150, 219, 0.08); }

footer.bg-dark {
    background: linear-gradient(180deg, #0b1220 0%, #080d17 100%);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}
footer.bg-dark .text-gray-400 { color: #94a3b8; }
footer.bg-dark .text-gray-500 { color: #64748b; }
footer.bg-dark .border-gray-800 { border-color: rgba(148, 163, 184, 0.25); }

@media (max-width: 1279px) {
    #mobileMenu .lang-switcher {
        margin-top: 0.25rem;
        margin-left: auto;
        padding: 0.125rem;
        border-top-width: 0 !important;
        background-color: #f3f4f6;
        border-radius: 9999px;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        width: max-content;
    }
    #mobileMenu .lang-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: auto;
        padding: 0.25rem 0.75rem;
        font-size: 0.875rem;
        font-weight: 500;
        border-radius: 9999px;
    }
    #mobileMenu .lang-btn-mobile:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
    #mobileMenu .lang-btn-mobile:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; }
}

@media (min-width: 1280px) {
    .xl\:flex { display: flex; }
    .xl\:hidden { display: none !important; }
}

@media (max-width: 767px) {
    .container-custom { padding-left: 1rem; padding-right: 1rem; }
    .section-padding { padding-top: 3.5rem; padding-bottom: 3.5rem; }
    .pt-32 { padding-top: 6rem; }
    .pb-24 { padding-bottom: 4rem; }
    .text-4xl { font-size: 2rem; line-height: 2.25rem; }
    .text-3xl { font-size: 1.625rem; line-height: 2rem; }
    .p-8 { padding: 1.5rem; }
    .p-10 { padding: 1.5rem; }
    
    /* 强制修复表单容器宽度和内边距 */
    #contactForm-container { 
        padding: 1rem !important; /* 进一步减小内边距 */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden; /* 裁剪溢出内容 */
    }

    /* 强制修复输入框宽度计算 */
    #contactForm .form-input { 
        width: 100% !important;
        display: block !important;
        max-width: 100% !important; 
        box-sizing: border-box !important;
        min-width: 0; 
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }

    /* 修复 Select 在移动端的默认样式问题 */
    select.form-input {
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
        background-position: right 0.75rem center;
        background-repeat: no-repeat;
        background-size: 1.25em 1.25em;
        padding-right: 2.5rem !important;
    }
    
    .w-24 { width: 5rem; }
    .h-24 { height: 5rem; }
    .gap-12 { gap: 2rem; }
    .mb-16 { margin-bottom: 2.5rem; }
    header nav { height: 3.75rem; }
    #logoText { font-size: 1.35rem; line-height: 1.75rem; }
    #menuBtn { width: 2.375rem; height: 2.375rem; }
    #mobileMenu {
        top: 100%;
        left: 0;
        border-top: 1px solid #f1f5f9;
        border-bottom-left-radius: 1rem;
        border-bottom-right-radius: 1rem;
        background-color: rgba(255, 255, 255, 0.98);
        max-height: calc(100vh - 3.75rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    #mobileMenu .container-custom { padding-top: 0.75rem; padding-bottom: 1rem; }
    #mobileMenu a {
        min-height: 44px;
        display: flex;
        align-items: center;
        border-radius: 0.625rem;
        padding: 0.7rem 0.75rem;
    }
    #mobileMenu a:active { background-color: rgba(18, 150, 219, 0.08); }
    #submitBtn {
        width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 1279px) {
    #mobileMenu .container-custom {
        max-width: 44rem;
        margin-left: auto;
        margin-right: auto;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

@media (max-width: 430px) {
    #logoText { font-size: 1.25rem; }
    #menuBtn { width: 2.25rem; height: 2.25rem; }
    #mobileMenu { max-height: calc(100vh - 3.5rem); }
    #mobileMenu a { padding: 0.65rem 0.65rem; font-size: 0.95rem; }
    #hero h1 { font-size: 1.75rem; line-height: 2.2rem; }
    #hero p.text-xl { font-size: 1rem; line-height: 1.6rem; margin-bottom: 2rem; }
    #hero .grid { gap: 1rem; }
    #hero .grid a { padding: 1.125rem 1rem; }
    #hero .grid a h3 { font-size: 1.0625rem; line-height: 1.5rem; }
    #hero .grid a p { font-size: 0.9rem; }
    #hero .mt-20 { margin-top: 2.5rem; }
    #hero .flex.flex-wrap { gap: 0.625rem; }
    #hero .flex.flex-wrap > div { padding: 0.5rem 0.75rem; }
    #hero .flex.flex-wrap span { font-size: 0.8125rem; }

    #platform h2 { margin-bottom: 2rem; }
    #platform .aspect-square { padding: 1.25rem; max-width: 18.5rem; margin-left: auto; margin-right: auto; }
    #platform .w-24.h-24 { width: 4rem; height: 4rem; margin-bottom: 1rem; }
    #platform .w-12.h-12 { width: 2rem; height: 2rem; }
    #platform h3.text-2xl { font-size: 1.25rem; line-height: 1.75rem; margin-bottom: 0.75rem; }
    #platform p.text-medium-gray { font-size: 0.95rem; line-height: 1.6rem; }
    #platform ul.space-y-2 span { font-size: 0.9rem; line-height: 1.5rem; }
    #platform .gap-8 { gap: 1.5rem; }

    footer.bg-dark { padding-top: 3rem; padding-bottom: 3rem; }
    footer .grid { gap: 2rem; margin-bottom: 2rem; }
    footer h4 { margin-bottom: 0.875rem; }
    footer ul.space-y-4 > * + * { margin-top: 0.625rem; }
    footer .border-t { padding-top: 1rem; }
    footer .space-x-6 { gap: 1rem; }
    footer .space-x-6 > * + * { margin-left: 0; }
}

@media (max-width: 390px) {
    #logoText { font-size: 1.18rem; }
    #mobileMenu a { font-size: 0.9rem; min-height: 42px; }
    #hero h1 { font-size: 1.6rem; line-height: 2rem; }
    #hero p.text-xl { font-size: 0.95rem; line-height: 1.5rem; }
    #hero .grid a { padding: 1rem 0.9rem; }
    #hero .flex.flex-wrap span { font-size: 0.76rem; }
    #hero .flex.flex-wrap > div { padding: 0.45rem 0.65rem; }

    #platform .aspect-square { max-width: 17.2rem; }
    #platform .w-10.h-12 { width: 2rem; height: 2.5rem; }
    #platform .h-6.w-6 { width: 1.125rem; height: 1.125rem; }
    #platform .w-8.h-20 { height: 4.25rem; }

    footer p.text-gray-500 { font-size: 0.8rem; text-align: center; }
    footer a.text-xs { font-size: 0.72rem; }
}

@media (max-width: 360px) {
    .container-custom { padding-left: 0.75rem; padding-right: 0.75rem; }
    #logoText { font-size: 1.1rem; }
    #menuBtn { width: 2.125rem; height: 2.125rem; }
    #mobileMenu a { font-size: 0.86rem; padding: 0.6rem 0.55rem; }
    #mobileMenu .lang-btn { font-size: 0.76rem; padding: 0.5rem 0; }
    #hero { padding-top: 5.25rem; }
    #hero h1 { font-size: 1.48rem; line-height: 1.9rem; }
    #hero p.text-xl { font-size: 0.9rem; line-height: 1.45rem; }
    #hero .grid a h3 { font-size: 1rem; }
    #hero .grid a p { font-size: 0.84rem; }

    #platform h3.text-2xl { font-size: 1.14rem; line-height: 1.55rem; }
    #platform ul.space-y-2 span { font-size: 0.84rem; line-height: 1.4rem; }
    #platform .aspect-square { max-width: 16rem; padding: 1rem; }
    #platform .w-24.h-24 { width: 3.5rem; height: 3.5rem; }
    #platform .w-2 { width: 0.4rem; }
    #platform .gap-3 { gap: 0.5rem; }

    footer .text-2xl { font-size: 1.25rem; line-height: 1.7rem; }
    footer .space-x-4 > * + * { margin-left: 0.5rem; }
}

/* Admin Specific */
.sidebar-item { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-radius: 0.75rem; color: var(--dark); transition: all 0.3s; width: 100%; text-align: left; }
.sidebar-item:hover:not(.active) { background-color: #f9fafb; color: var(--primary); }
.sidebar-item.active { background-color: rgba(53, 158, 255, 0.1); color: var(--primary); border-right: 4px solid var(--primary); }
.sidebar-child { display: flex; align-items: center; padding: 0.5rem 1rem; border-radius: 0.5rem; color: var(--dark-gray); transition: all 0.3s; font-size: 0.875rem; }
.sidebar-child:hover { color: var(--primary); }

.stat-card { background-color: white; border-radius: 1rem; padding: 1.5rem; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); border: 1px solid #f3f4f6; transition: box-shadow 0.3s; }
.stat-card:hover { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }

.message-card { background-color: white; border-radius: 0.75rem; padding: 1.25rem; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); border: 1px solid #f3f4f6; transition: all 0.3s; cursor: pointer; }
.message-card:hover { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.message-card.unread { border-left: 4px solid var(--primary); background-color: rgba(53, 158, 255, 0.05); }

.input-field { width: 100%; padding: 0.75rem 1rem; border-radius: 0.5rem; border: 1px solid #e5e7eb; outline: none; transition: all 0.3s; }
.input-field:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(53, 158, 255, 0.2); }

.tab-btn { padding: 0.625rem 1.25rem; border-radius: 0.5rem; font-weight: 500; transition: all 0.3s; }
.tab-active { background-color: var(--primary); color: white; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.tab-inactive { background-color: white; color: var(--medium-gray); border: 1px solid #e5e7eb; }
.tab-inactive:hover { background-color: #f9fafb; }

.fade-in { animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.pulse-dot { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* App.html specific */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* Contact Form Enhancement */
#contactForm-container {
    background-color: #fcfdff;
    border: 1px solid #f0f3f7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), 0 8px 24px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

#contactForm-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), 0 12px 32px rgba(0, 0, 0, 0.04);
}

#contactForm .form-input {
    background-color: #fcfdff;
    border: 1px solid #e6eaf1;
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
    width: 100%;
    transition: all 0.25s ease-in-out;
    font-size: 1rem;
    color: var(--dark-gray);
}
#contactForm textarea.form-input {
    resize: vertical;
    max-width: 100%;
}

#contactForm { min-width: 0; }
#contactForm > div { min-width: 0; }
#contactForm .custom-select { position: relative; }
#contactForm .custom-select-trigger {
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding-right: 2.5rem;
}
#contactForm .custom-select-trigger::after {
    content: '';
    position: absolute;
    right: 1rem;
    width: 1.25rem;
    height: 1.25rem;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1.25em 1.25em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}
#contactForm .custom-select-panel {
    position: absolute;
    top: calc(100% + 0.375rem);
    left: 0;
    right: 0;
    z-index: 40;
    background-color: #fff;
    border: 1px solid #e6eaf1;
    border-radius: 0.625rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    max-height: 14rem;
    overflow-y: auto;
}
#contactForm .custom-select-option {
    width: 100%;
    border: 0;
    background-color: #fff;
    color: var(--dark-gray);
    text-align: left;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    line-height: 1.4;
    cursor: pointer;
}
#contactForm .custom-select-option:hover { background-color: #f8fafc; }
#contactForm .custom-select-option.is-active {
    background-color: rgba(18, 150, 219, 0.1);
    color: var(--primary);
    font-weight: 500;
}

.platform-image-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.72rem;
    display: block;
    filter: saturate(1.08) contrast(1.04);
}
.platform-image-card {
    padding: 0.35rem !important;
    position: relative;
    border: 1px solid rgba(18, 150, 219, 0.28);
    box-shadow: 0 0 0 1px rgba(18, 150, 219, 0.08), 0 10px 24px rgba(18, 150, 219, 0.14);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.platform-image-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    pointer-events: none;
    background-image: linear-gradient(120deg, rgba(18,150,219,0.16), rgba(0,184,217,0.08) 45%, rgba(18,150,219,0.2));
    mix-blend-mode: screen;
}
.platform-image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(18, 150, 219, 0.16), 0 14px 30px rgba(18, 150, 219, 0.2);
}
@media (max-width: 767px) {
    .platform-image-card {
        padding: 0.1rem !important;
    }
    .platform-image-full {
        border-radius: 0.85rem;
    }
}
.spider-web-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9;
    opacity: 0.82;
    mix-blend-mode: normal;
}
@media (max-width: 1279px) {
    .spider-web-canvas {
        display: none !important;
    }
}
#subject.form-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: block;
    padding-right: 2.5rem;
}
#subject.form-input option {
    white-space: normal;
}
#contactForm .custom-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

#contactForm .form-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(18, 150, 219, 0.12);
}

#contactForm label {
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 0.5rem;
    display: block;
}

#submitBtn {
    display: inline-block;
    background-image: linear-gradient(to right, var(--primary) 0%, var(--accent) 100%);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.875rem 3rem;
    border-radius: 0.5rem;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(53, 158, 255, 0.2);
}

#submitBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(53, 158, 255, 0.3);
}

@media (pointer: coarse) {
    #contactForm-container { overflow-x: clip; }
    #subject.form-input { font-size: 16px; }
    #contactForm .custom-select-option { min-height: 44px; }
}
