:root {
    --font-body: 'Inter', 'SF Pro Display', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition-theme: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: var(--font-body);
}

[data-theme='dark'] {
    color-scheme: dark;
    --surface-page: #050913;
    --surface-card: #0c1324;
    --surface-card-soft: #111a31;
    --surface-glass: rgba(15, 23, 42, 0.85);
    --surface-muted: rgba(15, 23, 42, 0.55);
    --text-primary: #f8fafc;
    --text-secondary: #c7d2fe;
    --text-muted: #a5b4fc;
    --border-strong: rgba(148, 163, 184, 0.6);
    --border-muted: rgba(51, 65, 85, 0.7);
    --shadow-color: rgba(2, 6, 23, 0.8);
    --accent: #34d399;
    --accent-strong: #10b981;
    --accent-contrast: #052d27;
    --accent-soft: rgba(52, 211, 153, 0.18);
    --accent-soft-border: rgba(52, 211, 153, 0.4);
    --gradient-hero: radial-gradient(circle at top left, rgba(52, 211, 153, 0.25), transparent 62%), linear-gradient(145deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.85));
}

[data-theme='light'] {
    color-scheme: light;
    --surface-page: #f8fafc;
    --surface-card: #ffffff;
    --surface-card-soft: #eef2ff;
    --surface-glass: rgba(255, 255, 255, 0.9);
    --surface-muted: rgba(237, 242, 255, 0.9);
    --text-primary: #0f172a;
    --text-secondary: #0f172a;
    --text-muted: #475569;
    --border-strong: rgba(71, 85, 105, 0.4);
    --border-muted: rgba(148, 163, 184, 0.5);
    --shadow-color: rgba(15, 23, 42, 0.18);
    --accent: #0ea5e9;
    --accent-strong: #0284c7;
    --accent-contrast: #f0f9ff;
    --accent-soft: rgba(14, 165, 233, 0.16);
    --accent-soft-border: rgba(14, 165, 233, 0.35);
    --gradient-hero: radial-gradient(circle at top left, rgba(14, 165, 233, 0.25), transparent 62%), linear-gradient(145deg, rgba(241, 245, 249, 0.95), rgba(226, 232, 240, 0.9));
}

body {
    min-height: 100vh;
    background-color: var(--surface-page);
    color: var(--text-primary);
    transition: var(--transition-theme);
    font-family: var(--font-body);
}

::selection {
    background: var(--accent);
    color: var(--accent-contrast);
}

.bg-surface {
    background-color: var(--surface-page) !important;
}

.bg-surface-card {
    background-color: var(--surface-card) !important;
}

.bg-surface-card-soft {
    background-color: var(--surface-card-soft) !important;
}

.bg-surface-glass {
    background-color: var(--surface-glass) !important;
}

.bg-gradient-hero {
    background-image: var(--gradient-hero) !important;
    background-color: var(--surface-card);
}

.text-primary {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.border-strong {
    border-color: var(--border-strong) !important;
}

.border-muted {
    border-color: var(--border-muted) !important;
}

.shadow-theme {
    box-shadow: 0 20px 45px -18px var(--shadow-color) !important;
}

.btn-accent {
    background-color: var(--accent);
    color: var(--accent-contrast);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-accent:hover {
    background-color: var(--accent-strong);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--shadow-color);
}

.btn-outline {
    border-color: var(--accent);
    color: var(--accent);
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.btn-outline:hover {
    border-color: var(--accent-strong);
    color: var(--accent-contrast);
    background-color: var(--accent-strong);
    transform: translateY(-2px);
}

.card-animated {
    background-color: var(--surface-glass);
    border-color: var(--border-muted);
    box-shadow: 0 10px 30px -20px var(--shadow-color);
}

.accent-chip {
    background-color: var(--accent-soft);
    border: 1px solid var(--accent-soft-border);
    color: var(--accent-strong);
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.15rem;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: normal;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 9999px;
    background: var(--accent);
    opacity: 0;
    transform: scaleX(0.4);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link-active {
    color: var(--text-primary);
}

.nav-link-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.nav-link-mobile {
    width: 100%;
    padding: 0.35rem 0;
}

[data-theme='light'] .text-slate-100,
[data-theme='light'] .text-slate-200,
[data-theme='light'] .text-slate-200\/90,
[data-theme='light'] .text-white {
    color: var(--text-primary) !important;
}

[data-theme='light'] .text-slate-300,
[data-theme='light'] .text-slate-900,
[data-theme='light'] .text-slate-900\/80 {
    color: var(--text-secondary) !important;
}

[data-theme='light'] .text-slate-400,
[data-theme='light'] .text-slate-500,
[data-theme='light'] .text-slate-900\/60 {
    color: var(--text-muted) !important;
}

[data-theme='light'] .hover\:text-white:hover {
    color: var(--text-primary) !important;
}

[data-theme='light'] .hover\:text-emerald-200:hover {
    color: var(--accent-strong) !important;
}

[data-theme='light'] .text-emerald-50,
[data-theme='light'] .text-emerald-100,
[data-theme='light'] .text-emerald-100\/80,
[data-theme='light'] .text-emerald-200,
[data-theme='light'] .text-emerald-200\/80,
[data-theme='light'] .text-emerald-300\/80,
[data-theme='light'] .text-emerald-300\/90,
[data-theme='light'] .text-emerald-400 {
    color: var(--accent-strong) !important;
}

[data-theme='light'] .text-rose-100,
[data-theme='light'] .text-rose-200,
[data-theme='light'] .text-rose-300 {
    color: #b91c1c !important;
}

[data-theme='light'] .bg-slate-950,
[data-theme='light'] .bg-slate-900,
[data-theme='light'] .bg-slate-800 {
    background-color: var(--surface-card) !important;
    color: var(--text-primary);
}

[data-theme='light'] .bg-slate-950\/30,
[data-theme='light'] .bg-slate-950\/40,
[data-theme='light'] .bg-slate-900\/45,
[data-theme='light'] .bg-slate-900\/50,
[data-theme='light'] .bg-slate-900\/55,
[data-theme='light'] .bg-slate-900\/60,
[data-theme='light'] .bg-slate-900\/65,
[data-theme='light'] .bg-slate-900\/70,
[data-theme='light'] .bg-slate-900\/75,
[data-theme='light'] .bg-slate-900\/95,
[data-theme='light'] .bg-slate-700\/45 {
    background-color: var(--surface-muted) !important;
    color: var(--text-primary);
}

[data-theme='light'] .border-slate-300 {
    border-color: var(--border-strong) !important;
}

[data-theme='light'] .border-slate-400,
[data-theme='light'] .border-slate-500\/70,
[data-theme='light'] .border-slate-600,
[data-theme='light'] .border-slate-700\/55,
[data-theme='light'] .border-slate-700\/60,
[data-theme='light'] .border-slate-700\/70,
[data-theme='light'] .border-slate-700\/80,
[data-theme='light'] .border-slate-800\/70 {
    border-color: var(--border-muted) !important;
}

[data-theme='light'] .ring-slate-700\/35,
[data-theme='light'] .ring-slate-700\/40,
[data-theme='light'] .ring-slate-800\/40 {
    --tw-ring-color: rgba(15, 23, 42, 0.12) !important;
}

[data-theme='light'] .placeholder\:text-slate-500::placeholder {
    color: rgba(15, 23, 42, 0.45) !important;
}

[data-theme='light'] .divide-slate-800 > :not([hidden]) ~ :not([hidden]),
[data-theme='light'] .divide-slate-800\/70 > :not([hidden]) ~ :not([hidden]) {
    border-color: var(--border-muted) !important;
}

.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    justify-content: space-between;
    border-radius: 9999px;
    padding: 0.35rem;
    min-width: 8.5rem;
    border: 1px solid var(--border-muted);
    background-color: var(--surface-card);
    color: var(--text-muted);
    transition: var(--transition-theme);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.theme-toggle-pill {
    min-width: 8.5rem;
}

.theme-toggle-compact {
    min-width: 5.5rem;
    padding: 0.25rem;
}

.theme-toggle-option {
    position: relative;
    z-index: 1;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.theme-toggle-option svg {
    width: 1rem;
    height: 1rem;
    opacity: 0.65;
    transition: opacity 0.3s ease;
}

.theme-toggle-option-label {
    white-space: nowrap;
}

.theme-toggle-compact .theme-toggle-option-label {
    display: none;
}

.theme-toggle-thumb {
    position: absolute;
    top: 0.35rem;
    bottom: 0.35rem;
    left: 0.35rem;
    width: calc(50% - 0.45rem);
    border-radius: 9999px;
    background: var(--surface-page);
    box-shadow: 0 12px 30px -20px var(--shadow-color);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle-compact .theme-toggle-thumb {
    top: 0.25rem;
    bottom: 0.25rem;
    left: 0.25rem;
    width: calc(50% - 0.35rem);
}

.theme-toggle[aria-pressed='true'] .theme-toggle-thumb {
    transform: translateX(calc(100% + 0.45rem));
}

.theme-toggle-compact[aria-pressed='true'] .theme-toggle-thumb {
    transform: translateX(calc(100% + 0.35rem));
}

.theme-toggle[aria-pressed='false'] .theme-toggle-option[data-theme-value='light'],
.theme-toggle[aria-pressed='true'] .theme-toggle-option[data-theme-value='dark'] {
    color: var(--text-primary);
}

.theme-toggle[aria-pressed='false'] .theme-toggle-option[data-theme-value='light'] svg,
.theme-toggle[aria-pressed='true'] .theme-toggle-option[data-theme-value='dark'] svg {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
