@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=JetBrains+Mono:wght@400;500;700&family=Poppins:wght@700;800;900&display=swap');

        :root {
            --inter: 'Inter', system-ui, sans-serif;
            --horizon: 'Inter', system-ui, sans-serif;
            --mono: 'JetBrains Mono', monospace;

            /* Brand Palette - Aetheric Fluidity */
            --cyan: #8EE7DD;
            --orange: #F2B63D;
            --magenta: #E7A6D9;
            --purple: #9B6BFF;
            --green: #19E6A7;
            --blue-glow: #143B8F;

            --bg: #0A0D14;
            --bg-2: #10141D;
            --bg-3: #161B26;
            --surface: rgba(16, 20, 29, 0.6);
            --border: #1E2736;
            --border-strong: rgba(30, 39, 54, 0.8);
            --text: #F4F6FB;
            --text-muted: #9AA3B7;
        }

        body.light {
            /* Neutros frios limpos (estilo Binance) — fim da névoa lilás */
            --bg: #f6f7f9;
            --bg-2: #ffffff;
            --bg-3: #eceef1;
            --surface: rgba(255, 255, 255, 0.92);
            --border: rgba(17, 24, 39, 0.10);
            --border-strong: rgba(17, 24, 39, 0.16);
            --text: #0f1117;
            --text-muted: #5c6472;
            --cyan: #0e9f6e;
        }

        * {
            transition-property: color, background-color, border-color, box-shadow, transform, opacity, filter;
            transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
            transition-duration: 200ms;
        }

        html {
            scroll-behavior: smooth;
            -webkit-tap-highlight-color: transparent;
        }

        html.no-motion *,
        html.no-motion *::before,
        html.no-motion *::after {
            animation-duration: 0.001ms !important;
            transition-duration: 0.001ms !important;
        }

        body {
            font-family: var(--inter);
            background-color: var(--bg);
            color: var(--text);
            overflow-x: hidden;
            min-height: 100vh;
        }

        /* ===== AURORA BACKGROUND ===== */
        body::after {
            content: '';
            position: fixed;
            inset: 0;
            z-index: 0;
            pointer-events: none;
            background:
                radial-gradient(ellipse 80% 50% at 20% 0%, rgba(155, 107, 255, 0.06) 0%, transparent 60%),
                radial-gradient(ellipse 60% 40% at 80% 20%, rgba(142, 231, 221, 0.04) 0%, transparent 60%),
                radial-gradient(ellipse 50% 60% at 50% 100%, rgba(20, 59, 143, 0.08) 0%, transparent 70%);
            animation: auroraShift 24s ease-in-out infinite alternate;
        }

        @keyframes auroraShift {
            0% {
                opacity: 0.4;
                filter: hue-rotate(0deg);
            }

            50% {
                opacity: 0.6;
                filter: hue-rotate(10deg);
            }

            100% {
                opacity: 0.5;
                filter: hue-rotate(-5deg);
            }
        }

        body.light {
            background-image:
                radial-gradient(ellipse 70% 55% at 10% 0%, rgba(155, 107, 255, 0.10) 0%, transparent 60%),
                radial-gradient(ellipse 65% 50% at 92% 8%, rgba(142, 231, 221, 0.12) 0%, transparent 62%),
                radial-gradient(ellipse 90% 60% at 50% 100%, rgba(231, 166, 217, 0.08) 0%, transparent 70%);
            background-attachment: fixed;
        }

        /* Ruído sutil */
        body::before {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            opacity: 0.015;
            z-index: 1;
            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
            mix-blend-mode: overlay;
        }

        body.light::before {
            opacity: 0.012;
            mix-blend-mode: multiply;
        }

        /* Light mode — glass mais sutil, sombras suaves para conforto visual */
        body.light .glass {
            background: rgba(255, 255, 255, 0.75) !important;
            border-color: rgba(0, 0, 0, 0.06) !important;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.03);
            backdrop-filter: blur(12px);
        }

        body.light .glass-darker,
        body.light .bg-[#050816]\/40,
        body.light .bg-[#050816]\/50 {
            background: rgba(241, 243, 245, 0.9) !important;
        }

        body.light .text-white {
            color: #1a1d23 !important;
        }

        body.light .text-gray-400,
        body.light .text-gray-500 {
            color: #6b7280 !important;
        }

        body.light .text-gray-300 {
            color: #4b5563 !important;
        }

        body.light .border-white\/10,
        body.light .border-white\/5,
        body.light .border-white\/20 {
            border-color: rgba(0, 0, 0, 0.07) !important;
        }

        body.light .note-card {
            background: rgba(255, 255, 255, 0.85) !important;
            border-color: rgba(0, 0, 0, 0.08) !important;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
        }

        body.light .note-card.unread {
            background: rgba(14, 153, 104, 0.04) !important;
            border-color: rgba(14, 153, 104, 0.2) !important;
        }

        body.light .challenge-card {
            background: rgba(255, 255, 255, 0.8) !important;
            border-color: rgba(0, 0, 0, 0.06) !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }

        body.light .challenge-card:hover {
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        }

        body.light header.glass {
            background: rgba(255, 255, 255, 0.88) !important;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
        }

        body.light .horizon-font {
            color: #1a1d23;
        }

        body.light .text-heading {
            color: #1a1d23 !important;
        }

        body.light input,
        body.light textarea,
        body.light select {
            background: rgba(241, 243, 245, 0.8) !important;
            border-color: rgba(0, 0, 0, 0.1) !important;
            color: #1a1d23 !important;
        }

        body.light input::placeholder,
        body.light textarea::placeholder {
            color: #9ca3af !important;
        }

        .bg-grid {
            position: fixed;
            inset: 0;
            z-index: 0;
            pointer-events: none;
            background-size: 50px 50px;
            background-image:
                linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
                linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
            -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
            mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
        }

        body.light .bg-grid {
            background-image:
                linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
                linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
        }

        /* Foco acessível */
        :focus-visible {
            outline: 2px solid var(--cyan);
            outline-offset: 3px;
            border-radius: 6px;
        }

        button:focus-visible,
        a:focus-visible,
        input:focus-visible,
        select:focus-visible,
        textarea:focus-visible,
        [tabindex]:focus-visible {
            outline: 2px solid var(--cyan);
            outline-offset: 3px;
        }

        .horizon-font {
            font-family: var(--inter);
            font-weight: 700;
            letter-spacing: -0.02em;
        }

        .mono-font {
            font-family: var(--mono);
        }

        /* ===== GLASS SURFACES ===== */
        .glass {
            background: rgba(11, 16, 35, 0.55);
            backdrop-filter: blur(20px) saturate(150%);
            -webkit-backdrop-filter: blur(20px) saturate(150%);
            border: 1px solid rgba(155, 107, 255, 0.12);
            box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
            border-radius: 1.5rem;
        }

        body.light .glass {
            background: rgba(255, 255, 255, 0.8) !important;
            border-color: rgba(0, 0, 0, 0.06) !important;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
        }

        .glass-panel {
            background: rgba(255, 255, 255, 0.025);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(155, 107, 255, 0.1);
            border-radius: 1.25rem;
        }

        .neon-cyan {
            color: var(--cyan);
        }

        .neon-purple {
            color: var(--purple);
        }

        .neon-border-purple {
            border-color: rgba(155, 107, 255, 0.35);
            box-shadow: 0 4px 20px rgba(155, 107, 255, 0.12);
        }

        .terminal-scroll::-webkit-scrollbar {
            width: 4px;
        }

        .terminal-scroll::-webkit-scrollbar-track {
            background: transparent;
        }

        .terminal-scroll::-webkit-scrollbar-thumb {
            background: rgba(155, 107, 255, 0.3);
            border-radius: 10px;
        }

        /* ===== CHALLENGE CARD ===== */
        .challenge-card {
            position: relative;
            transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .challenge-card::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            padding: 1px;
            background: linear-gradient(135deg, rgba(155, 107, 255, 0) 0%, rgba(142, 231, 221, 0.6) 50%, rgba(155, 107, 255, 0) 100%);
            -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            opacity: 0;
            transition: opacity 0.4s ease;
            pointer-events: none;
        }

        .challenge-card:hover::before {
            opacity: 1;
        }

        .challenge-card:hover {
            transform: translateY(-8px) scale(1.01);
            box-shadow: 0 30px 60px -15px rgba(155, 107, 255, 0.25), 0 0 0 1px rgba(142, 231, 221, 0.15);
        }

        /* ===== GLOW BUTTON ===== */
        .glow-btn {
            position: relative;
            overflow: hidden;
            transition: transform 0.2s, box-shadow 0.3s;
        }

        .glow-btn::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.25) 50%, transparent 60%);
            transform: translateX(-100%);
            transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
            pointer-events: none;
        }

        .glow-btn:hover::after {
            transform: translateX(100%);
        }

        .glow-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 0 35px rgba(155, 107, 255, 0.5), 0 8px 25px rgba(0, 0, 0, 0.3);
        }

        .glow-btn:active {
            transform: translateY(0);
        }

        /* Light mode - correções consistentes */
        body.light .text-white {
            color: #111827;
        }

        body.light .text-gray-200 {
            color: #1f2937;
        }

        body.light .text-gray-300 {
            color: #374151;
        }

        body.light .text-gray-400 {
            color: #4b5563;
        }

        body.light .text-gray-500 {
            color: #6b7280;
        }

        body.light .text-\[\#8EE7DD\] {
            color: #00a674;
        }

        body.light .bg-\[\#8EE7DD\] {
            background-color: #00a674;
        }

        body.light .bg-[#050816],
        body.light .bg-\[\#050505\] {
            background-color: #ffffff;
        }

        body.light .bg-\[\#0a0a0a\],
        body.light .bg-\[\#111111\],
        body.light .bg-\[\#111\] {
            background-color: #ffffff;
            border-color: #e5e7eb;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
        }

        body.light .bg-[#050816]\/30,
        body.light .bg-[#050816]\/40,
        body.light .bg-[#050816]\/50,
        body.light .bg-[#050816]\/70,
        body.light .bg-[#050816]\/80,
        body.light .bg-[#050816]\/90 {
            background-color: rgba(255, 255, 255, 0.75);
            backdrop-filter: blur(12px);
            border-color: rgba(0, 0, 0, 0.08);
        }

        body.light .border-white\/5,
        body.light .border-white\/10,
        body.light .border-white\/20 {
            border-color: rgba(0, 0, 0, 0.08);
        }

        body.light input,
        body.light textarea,
        body.light select {
            background-color: #ffffff;
            color: #111827;
            border-color: #d1d5db;
        }

        body.light input::placeholder,
        body.light textarea::placeholder {
            color: #9ca3af;
        }

        body.light .bg-white\/5 {
            background-color: rgba(0, 0, 0, 0.03);
        }

        body.light .bg-white\/10 {
            background-color: rgba(0, 0, 0, 0.05);
        }

        /* ===== KEYFRAMES ===== */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(24px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        @keyframes scaleIn {
            from {
                opacity: 0;
                transform: scale(0.94) translateY(8px);
            }

            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        @keyframes slideInRight {
            from {
                opacity: 0;
                transform: translateX(24px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes shimmer {
            0% {
                background-position: -200% 0;
            }

            100% {
                background-position: 200% 0;
            }
        }


        @keyframes spin {
            from {
                transform: rotate(0deg);
            }

            to {
                transform: rotate(360deg);
            }
        }

        @keyframes orbit {
            0% {
                transform: rotate(0deg) translateX(60px) rotate(0deg);
            }

            100% {
                transform: rotate(360deg) translateX(60px) rotate(-360deg);
            }
        }

        @keyframes orbFloat {

            0%,
            100% {
                transform: translate(0, 0) scale(1);
            }

            33% {
                transform: translate(30px, -20px) scale(1.05);
            }

            66% {
                transform: translate(-20px, 15px) scale(0.97);
            }
        }

        @keyframes gradientShift {
            0% {
                background-position: 0% center;
            }

            50% {
                background-position: 100% center;
            }

            100% {
                background-position: 0% center;
            }
        }

        @keyframes borderGlow {

            0%,
            100% {
                border-color: rgba(155, 107, 255, 0.2);
                box-shadow: 0 0 0 rgba(155, 107, 255, 0);
            }

            50% {
                border-color: rgba(142, 231, 221, 0.4);
                box-shadow: 0 0 20px rgba(142, 231, 221, 0.1);
            }
        }

        .animate-fade-in-up {
            animation: fadeInUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
        }

        .animate-fade-in {
            animation: fadeIn 0.4s ease both;
        }

        .animate-scale-in {
            animation: scaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
        }


        /* Gradient text animado — hero last line (fluxo contínuo de cor) */
        .gradient-text {
            background: linear-gradient(90deg,
                    #7B61FF 0%,
                    #A855F7 15%,
                    #D946EF 30%,
                    #FF4DCE 45%,
                    #C084FC 60%,
                    #A855F7 75%,
                    #7B61FF 100%);
            background-size: 250% 100%;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: gradientFlow 5s linear infinite;
        }

        @keyframes gradientFlow {
            0% {
                background-position: 100% center;
            }

            100% {
                background-position: -100% center;
            }
        }

        /* ===== HERO LINE REVEAL (clip-path from bottom) ===== */
        .hero-line-wrap {
            display: block;
            overflow: hidden;
            line-height: 1.15;
            padding-bottom: 0.05em;
            /* evita corte no descender */
        }

        .hero-line {
            display: block;
            clip-path: inset(100% 0 0 0);
            animation: heroLineReveal 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
            opacity: 0;
        }

        @keyframes heroLineReveal {
            0% {
                clip-path: inset(100% 0 0 0);
                opacity: 0;
                transform: translateY(12px);
            }

            1% {
                opacity: 1;
            }

            100% {
                clip-path: inset(0% 0 0 0);
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* delays definidos inline no HTML (nth-child não funciona aqui,
           pois cada .hero-line é filho único do seu wrapper) */

        /* ===== CURSOR TEXT SHIMMER ===== */
        /* O shimmer é aplicado no .hero-line-wrap (fora do clip-path)
           usando transform para não ser cortado pelo clip do filho */
        .hero-line-wrap {
            position: relative;
            /* necessário para o ::after absoluto */
        }

        .hero-shimmer-wrap::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(105deg,
                    transparent 25%,
                    rgba(255, 255, 255, 0.22) 50%,
                    transparent 75%);
            transform: translateX(-120%) skewX(-12deg);
            transition: none;
            pointer-events: none;
            z-index: 10;
        }

        .hero-shimmer-wrap:hover::after {
            animation: textShimmerSweep 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }

        @keyframes textShimmerSweep {
            0% {
                transform: translateX(-120%) skewX(-12deg);
            }

            100% {
                transform: translateX(220%) skewX(-12deg);
            }
        }

        /* Não anima em prefers-reduced-motion */
        @media (prefers-reduced-motion: reduce) {
            .hero-line {
                animation: none !important;
                clip-path: none !important;
                opacity: 1 !important;
                transform: none !important;
            }

            .hero-shimmer-wrap::after {
                display: none;
            }

            .gradient-text {
                animation: none !important;
            }
        }

        /* Animated border on cards */
        .animated-border {
            animation: borderGlow 3s ease-in-out infinite;
        }

        /* Stagger para cards */
        .stagger-item {
            opacity: 0;
            animation: fadeInUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        .stagger-item:nth-child(1) {
            animation-delay: 0.05s;
        }

        .stagger-item:nth-child(2) {
            animation-delay: 0.10s;
        }

        .stagger-item:nth-child(3) {
            animation-delay: 0.15s;
        }

        .stagger-item:nth-child(4) {
            animation-delay: 0.20s;
        }

        .stagger-item:nth-child(5) {
            animation-delay: 0.25s;
        }

        .stagger-item:nth-child(6) {
            animation-delay: 0.30s;
        }

        .stagger-item:nth-child(7) {
            animation-delay: 0.35s;
        }

        .stagger-item:nth-child(8) {
            animation-delay: 0.40s;
        }

        .stagger-item:nth-child(n+9) {
            animation-delay: 0.45s;
        }

        /* ===== YOUTUBE-STYLE FEED LAYOUT ===== */
        .feed-layout {
            display: flex;
            gap: 0;
            min-height: calc(100vh - 100px);
            position: relative;
        }

        .feed-sidebar {
            width: 260px;
            min-width: 260px;
            flex-shrink: 0;
            padding: 16px 0 32px 0;
            border-right: 1px solid var(--border);
            overflow-y: auto;
            max-height: calc(100vh - 100px);
            position: sticky;
            top: 80px;
            transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), min-width 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s, padding 0.3s;
        }

        .feed-sidebar.collapsed {
            width: 0;
            min-width: 0;
            padding: 0;
            opacity: 0;
            overflow: hidden;
            border-right: none;
        }

        .feed-sidebar-toggle {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            border-radius: 10px;
            background: transparent;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
        }

        .feed-sidebar-toggle:hover {
            background: rgba(255, 255, 255, 0.08);
            color: var(--text);
        }

        body.light .feed-sidebar-toggle:hover {
            background: rgba(0, 0, 0, 0.06);
        }

        .feed-sidebar-group {
            padding: 8px 16px;
        }

        .feed-sidebar-group h4 {
            font-size: 10px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--text-muted);
            margin-bottom: 8px;
            padding: 0 8px;
        }

        .feed-sidebar-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 12px;
            border-radius: 10px;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-muted);
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
            border: none;
            background: transparent;
            width: 100%;
            text-align: left;
        }

        .feed-sidebar-item:hover {
            background: rgba(255, 255, 255, 0.06);
            color: var(--text);
        }

        body.light .feed-sidebar-item:hover {
            background: rgba(0, 0, 0, 0.05);
        }

        .feed-sidebar-item.active {
            background: rgba(142, 231, 221, 0.1);
            color: #8EE7DD;
        }

        body.light .feed-sidebar-item.active {
            background: rgba(14, 153, 104, 0.1);
            color: #0e9968;
        }

        .feed-sidebar-item i {
            width: 20px;
            text-align: center;
            font-size: 14px;
        }

        .feed-sidebar-divider {
            height: 1px;
            background: var(--border);
            margin: 8px 16px;
        }

        .feed-content {
            flex: 1;
            min-width: 0;
            padding: 0 0 32px 0;
        }

        .feed-tags-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 16px;
            overflow-x: auto;
            -ms-overflow-style: none;
            scrollbar-width: none;
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 72px;
            z-index: 10;
            background: var(--bg);
        }

        /* Campo de busca fixo à direita na tags-bar */
        .feed-tags-bar .feed-search-inline {
            position: sticky;
            right: 16px;
            flex-shrink: 0;
            min-width: 180px;
            max-width: 220px;
            margin-left: auto;
        }

        .feed-tags-bar::-webkit-scrollbar {
            display: none;
        }

        .feed-tag {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 700;
            white-space: nowrap;
            cursor: pointer;
            border: none;
            transition: background 0.15s, color 0.15s;
            background: rgba(255, 255, 255, 0.08);
            color: var(--text-muted);
        }

        body.light .feed-tag {
            background: rgba(0, 0, 0, 0.06);
        }

        .feed-tag:hover {
            background: rgba(255, 255, 255, 0.14);
            color: var(--text);
        }

        body.light .feed-tag:hover {
            background: rgba(0, 0, 0, 0.1);
        }

        .feed-tag.active {
            background: var(--text);
            color: var(--bg);
        }

        body.light .feed-tag.active {
            background: #54379e;
            color: #fff;
        }

        /* Challenge Card Thumbnail */
        .challenge-thumb {
            position: relative;
            width: 100%;
            aspect-ratio: 16 / 9;
            border-radius: 12px;
            overflow: hidden;
            margin-bottom: 12px;
        }

        .challenge-thumb-bg {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .challenge-thumb-icon {
            font-size: 40px;
            opacity: 0.3;
            color: white;
        }

        .challenge-thumb-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 8px 12px;
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
        }

        .challenge-thumb-badge {
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: 800;
            backdrop-filter: blur(6px);
            background: rgba(0, 0, 0, 0.6);
            color: white;
        }

        .challenge-thumb-reward {
            padding: 4px 10px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 800;
            font-family: var(--mono);
            background: rgba(11, 16, 35, 0.85);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            color: var(--cyan);
            border: 1px solid rgba(142, 231, 221, 0.25);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 10px rgba(142, 231, 221, 0.15);
            letter-spacing: 0.5px;
            display: flex;
            align-items: center;
        }

        @media (max-width: 1024px) {
            .feed-sidebar {
                position: fixed;
                left: 0;
                top: 72px;
                bottom: 0;
                z-index: 45;
                background: var(--bg);
                border-right: 1px solid var(--border);
                box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
            }

            .feed-sidebar.collapsed {
                transform: translateX(-100%);
                opacity: 1;
                width: 260px;
                min-width: 260px;
                padding: 16px 0 32px 0;
            }

            body.light .feed-sidebar {
                box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
            }
        }

        .feed-sidebar-backdrop {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 44;
            background: rgba(0, 0, 0, 0.4);
        }

        @media (max-width: 1024px) {
            .feed-sidebar-backdrop.visible {
                display: block;
            }
        }

        /* Skeleton loading */
        .skeleton {
            background: linear-gradient(90deg,
                    rgba(255, 255, 255, 0.04) 0%,
                    rgba(255, 255, 255, 0.08) 50%,
                    rgba(255, 255, 255, 0.04) 100%);
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
        }

        body.light .skeleton {
            background: linear-gradient(90deg,
                    rgba(0, 0, 0, 0.04) 0%,
                    rgba(0, 0, 0, 0.08) 50%,
                    rgba(0, 0, 0, 0.04) 100%);
            background-size: 200% 100%;
        }

        /* Loader */
        .loader {
            border: 3px solid rgba(0, 255, 178, 0.2);
            border-top: 3px solid #8EE7DD;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            animation: spin 1s linear infinite;
        }

        /* Toast notifications */
        #toast-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 100000;
            display: flex;
            flex-direction: column;
            gap: 12px;
            pointer-events: none;
            max-width: calc(100vw - 40px);
        }

        .toast {
            pointer-events: auto;
            min-width: 280px;
            max-width: 420px;
            padding: 16px 20px;
            border-radius: 16px;
            backdrop-filter: blur(20px) saturate(140%);
            -webkit-backdrop-filter: blur(20px) saturate(140%);
            background: rgba(10, 10, 10, 0.85);
            border: 1px solid var(--border-strong);
            color: #fff;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
            animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
            display: flex;
            align-items: flex-start;
            gap: 14px;
        }

        body.light .toast {
            background: rgba(255, 255, 255, 0.95);
            color: #111827;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
        }

        .toast.toast-success {
            border-left: 3px solid var(--cyan);
        }

        .toast.toast-error {
            border-left: 3px solid #ef4444;
        }

        .toast.toast-warning {
            border-left: 3px solid var(--amber);
        }

        .toast.toast-info {
            border-left: 3px solid var(--purple);
        }

        .toast.toast-leaving {
            animation: slideInRight 0.25s cubic-bezier(0.4, 0, 1, 1) reverse forwards;
        }

        .toast-icon {
            width: 28px;
            height: 28px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            font-size: 13px;
        }

        .toast-success .toast-icon {
            background: rgba(0, 255, 178, 0.15);
            color: var(--cyan);
        }

        .toast-error .toast-icon {
            background: rgba(239, 68, 68, 0.15);
            color: #ef4444;
        }

        .toast-warning .toast-icon {
            background: rgba(251, 191, 36, 0.15);
            color: var(--amber);
        }

        .toast-info .toast-icon {
            background: rgba(123, 97, 255, 0.15);
            color: var(--purple);
        }

        .toast-body {
            flex: 1;
        }

        .toast-title {
            font-weight: 700;
            font-size: 14px;
            margin-bottom: 2px;
        }

        .toast-msg {
            font-size: 13px;
            color: var(--text-muted);
            line-height: 1.4;
            white-space: pre-line;
        }

        .toast-close {
            background: none;
            border: none;
            cursor: pointer;
            color: var(--text-muted);
            padding: 2px;
            font-size: 16px;
            line-height: 1;
        }

        .toast-close:hover {
            color: var(--text);
        }

        /* ===== HERO ORBS (animated) ===== */
        .hero-orb {
            position: absolute;
            border-radius: 50%;
            filter: blur(70px);
            pointer-events: none;
            opacity: 0.55;
            animation: orbFloat 12s ease-in-out infinite;
        }

        .hero-orb:nth-child(2) {
            animation-duration: 16s;
            animation-delay: -4s;
        }

        .hero-orb:nth-child(3) {
            animation-duration: 20s;
            animation-delay: -8s;
        }

        /* Modal refinado */
        .modal-backdrop {
            animation: fadeIn 0.25s ease forwards;
        }

        .modal-content {
            animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        /* Scrollbar */
        ::-webkit-scrollbar {
            width: 10px;
            height: 10px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(150, 150, 150, 0.25);
            border-radius: 10px;
            border: 2px solid transparent;
            background-clip: padding-box;
        }

        ::-webkit-scrollbar-thumb:hover {
            background-color: rgba(150, 150, 150, 0.5);
            background-clip: padding-box;
        }

        /* Bottom nav mobile */
        .bottom-nav {
            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            z-index: 90;
            backdrop-filter: blur(20px) saturate(140%);
            -webkit-backdrop-filter: blur(20px) saturate(140%);
            background: rgba(11, 16, 35, 0.75);
            border-top: 1px solid var(--border);
            padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
        }

        body.light .bottom-nav {
            background: rgba(255, 255, 255, 0.88);
        }

        .bottom-nav-inner {
            display: flex;
            justify-content: space-around;
            align-items: center;
            max-width: 600px;
            margin: 0 auto;
            gap: 2px;
        }

        .bottom-nav-btn {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 9px 8px;
            border-radius: 12px;
            cursor: pointer;
            color: var(--text-muted);
            font-size: 11px;
            font-weight: 700;
            background: transparent;
            white-space: nowrap;
        }

        .bottom-nav-btn i {
            font-size: 14px;
            width: 16px;
            text-align: center;
            flex-shrink: 0;
        }

        .bottom-nav-btn.active {
            color: var(--cyan);
        }

        .bottom-nav-btn:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        body.light .bottom-nav-btn:hover {
            background: rgba(0, 0, 0, 0.04);
        }

        @media (max-width: 1024px) {
            .bottom-nav {
                display: block;
            }

            main {
                padding-bottom: 90px;
            }
        }

        /* Command palette */
        .cmdk-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 12px 16px;
            border-radius: 12px;
            cursor: pointer;
            transition: background 120ms;
        }

        .cmdk-item:hover,
        .cmdk-item.active {
            background: rgba(0, 255, 178, 0.08);
        }

        .cmdk-item.active {
            border: 1px solid rgba(0, 255, 178, 0.3);
        }

        /* Chip / badge */
        .chip {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.02em;
            border: 1px solid var(--border);
        }

        /* Progress bar (para indicador de investimento em desafio) */
        .progress-bar {
            height: 4px;
            background: rgba(255, 255, 255, 0.06);
            border-radius: 999px;
            overflow: hidden;
        }

        .progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--cyan), var(--purple));
            border-radius: 999px;
            transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
        }

        /* Kbd */
        kbd {
            display: inline-flex;
            align-items: center;
            padding: 2px 6px;
            font-family: var(--mono);
            font-size: 10px;
            font-weight: 700;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid var(--border);
            border-radius: 4px;
            color: var(--text-muted);
        }

        body.light kbd {
            background: rgba(0, 0, 0, 0.05);
        }

        /* Redução de movimento respeitada */
        @media (prefers-reduced-motion: reduce) {

            *,
            *::before,
            *::after {
                animation-duration: 0.001ms !important;
                transition-duration: 0.001ms !important;
            }
        }

        /* Utility: hide inputs numbers spinner */
        input[type=number]::-webkit-inner-spin-button,
        input[type=number]::-webkit-outer-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        input[type=number] {
            -moz-appearance: textfield;
        }

        /* Skip link */
        .skip-link {
            position: absolute;
            top: -100px;
            left: 20px;
            z-index: 100001;
            padding: 12px 20px;
            background: var(--cyan);
            color: #000;
            font-weight: 700;
            border-radius: 8px;
            text-decoration: none;
        }

        .skip-link:focus {
            top: 20px;
        }

        /* View transitions on section change */
        .view-enter {
            animation: fadeInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        /* ============= NOTAS (INBOX EMPRESA) ============= */
        .notes-grid {
            display: grid;
            gap: 1rem;
            grid-template-columns: repeat(1, minmax(0, 1fr));
        }

        @media (min-width: 640px) {
            .notes-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (min-width: 1024px) {
            .notes-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

        @media (min-width: 1536px) {
            .notes-grid {
                grid-template-columns: repeat(4, minmax(0, 1fr));
            }
        }

        .note-card {
            position: relative;
            padding: 1.25rem;
            border-radius: 1rem;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
            border: 1px solid rgba(255, 255, 255, 0.08);
            transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
            cursor: pointer;
            min-height: 200px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            animation: noteIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
        }

        @keyframes noteIn {
            from {
                opacity: 0;
                transform: translateY(12px) scale(0.98);
            }

            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .note-card::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            background: linear-gradient(180deg, var(--note-accent, #64748b), transparent);
        }

        .note-card:hover {
            transform: translateY(-3px);
            border-color: rgba(255, 255, 255, 0.18);
            box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.6), 0 0 30px -15px var(--note-accent, rgba(123, 97, 255, 0.4));
        }

        .note-card.unread {
            background: linear-gradient(135deg, rgba(0, 255, 178, 0.05), rgba(123, 97, 255, 0.03));
            border-color: rgba(0, 255, 178, 0.25);
        }

        .note-card.unread::after {
            content: '';
            position: absolute;
            top: 14px;
            right: 14px;
            width: 8px;
            height: 8px;
            background: #8EE7DD;
            border-radius: 50%;
            box-shadow: 0 0 10px #8EE7DD, 0 0 20px #8EE7DD;
            animation: notePulse 2s ease-in-out infinite;
        }

        @keyframes notePulse {

            0%,
            100% {
                opacity: 1;
                transform: scale(1);
            }

            50% {
                opacity: 0.6;
                transform: scale(1.2);
            }
        }

        /* Marcador "Salvar para depois" no card da resposta */
        .note-save-btn {
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 4px 6px;
            border-radius: 8px;
            color: rgba(255, 255, 255, 0.28);
            font-size: 14px;
            transition: color 0.15s, background 0.15s, transform 0.15s;
        }

        .note-save-btn:hover {
            color: #9B6BFF;
            background: rgba(155, 107, 255, 0.1);
            transform: scale(1.1);
        }

        .note-save-btn.saved {
            color: #9B6BFF;
        }

        .note-card:has(.note-save-btn.saved) {
            --note-accent: #9B6BFF;
        }

        /* Botão de salvar dentro do detalhe da solução */
        .eval-save-btn.saved {
            color: #fff;
            border-color: #9B6BFF;
            background: rgba(155, 107, 255, 0.12);
        }

        /* Modo "Dividir Prêmio": cards viram alvos de seleção */
        .note-card.note-selecting {
            --note-accent: #E7A6D9;
            border-style: dashed;
            border-color: rgba(231, 166, 217, 0.35);
        }

        .note-card.note-selecting:hover {
            border-color: rgba(231, 166, 217, 0.7);
        }

        .note-selected {
            outline: 2px solid #E7A6D9;
            outline-offset: 2px;
        }

        .note-card.note-selecting.note-selected {
            border-style: solid;
            background: linear-gradient(135deg, rgba(231, 166, 217, 0.1), rgba(155, 107, 255, 0.04));
        }

        .inbox-filter-btn.active {
            background: rgba(255, 255, 255, 0.12) !important;
            color: white !important;
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
        }

        /* ============= ANIMAÇÃO DE COMPRA DE NFT ============= */
        .nft-flying {
            position: fixed;
            z-index: 99998;
            pointer-events: none;
            width: 48px;
            height: 48px;
            border-radius: 12px;
            background: linear-gradient(135deg, #8EE7DD, #9B6BFF, #E7A6D9);
            box-shadow: 0 0 30px rgba(0, 255, 178, 0.8), 0 0 60px rgba(123, 97, 255, 0.4);
            display: flex;
            align-items: center;
            justify-content: center;
            color: black;
            font-weight: 900;
            font-family: 'JetBrains Mono', monospace;
            font-size: 12px;
            transform: translate(-50%, -50%) scale(0);
            opacity: 0;
        }

        .nft-flying.fly {
            animation: nftFly var(--fly-duration, 1.2s) cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }

        @keyframes nftFly {
            0% {
                transform: translate(-50%, -50%) scale(0) rotate(0deg);
                opacity: 0;
            }

            15% {
                transform: translate(-50%, -50%) scale(1.2) rotate(0deg);
                opacity: 1;
            }

            30% {
                transform: translate(var(--fly-mid-x, -50%), var(--fly-mid-y, -50%)) scale(1) rotate(180deg);
                opacity: 1;
            }

            85% {
                transform: translate(var(--fly-target-x, -50%), var(--fly-target-y, -50%)) scale(0.6) rotate(540deg);
                opacity: 1;
            }

            100% {
                transform: translate(var(--fly-target-x, -50%), var(--fly-target-y, -50%)) scale(0) rotate(720deg);
                opacity: 0;
            }
        }

        /* Wallet icon pulse quando recebe nft */
        .wallet-received {
            animation: walletBurst 0.7s cubic-bezier(0.16, 1, 0.3, 1);
        }

        @keyframes walletBurst {
            0% {
                transform: scale(1);
            }

            40% {
                transform: scale(1.25);
                filter: drop-shadow(0 0 18px #8EE7DD);
            }

            100% {
                transform: scale(1);
            }
        }

        /* Confetti sutil */
        .confetti-burst {
            position: fixed;
            width: 8px;
            height: 8px;
            border-radius: 2px;
            pointer-events: none;
            z-index: 99997;
            opacity: 0;
            animation: confettiFall 1.4s cubic-bezier(0.4, 0, 0.6, 1) forwards;
        }

        @keyframes confettiFall {
            0% {
                opacity: 1;
                transform: translate(0, 0) rotate(0deg);
            }

            100% {
                opacity: 0;
                transform: translate(var(--cf-x, 100px), var(--cf-y, 200px)) rotate(720deg);
            }
        }

        /* ============= PARTÍCULAS DE FUNDO TECH ============= */
        .tech-bg-particles {
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 0;
            overflow: hidden;
        }

        .tech-particle {
            position: absolute;
            width: 2px;
            height: 2px;
            border-radius: 50%;
            background: rgba(155, 107, 255, 0.5);
            animation: particleDrift var(--drift-duration, 20s) linear infinite;
            opacity: 0;
        }

        body.light .tech-particle {
            background: rgba(155, 107, 255, 0.2);
        }

        @keyframes particleDrift {
            0% {
                opacity: 0;
                transform: translateY(100vh) translateX(0);
            }

            10% {
                opacity: 0.8;
            }

            90% {
                opacity: 0.8;
            }

            100% {
                opacity: 0;
                transform: translateY(-20vh) translateX(var(--drift-x, 50px));
            }
        }

        /* ============= SPLIT PRIZE MODAL ============= */
        .slider-fancy {
            -webkit-appearance: none;
            appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: linear-gradient(90deg, #8EE7DD var(--fill, 0%), rgba(255, 255, 255, 0.1) var(--fill, 0%));
            outline: none;
        }

        .slider-fancy::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: white;
            border: 3px solid #8EE7DD;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
        }

        .slider-fancy::-moz-range-thumb {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: white;
            border: 3px solid #8EE7DD;
            cursor: pointer;
        }

        .split-total-bar {
            position: relative;
            height: 32px;
            border-radius: 16px;
            background: rgba(255, 255, 255, 0.05);
            overflow: hidden;
            display: flex;
        }

        .split-segment {
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'JetBrains Mono', monospace;
            font-weight: 900;
            font-size: 11px;
            color: white;
            transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            overflow: hidden;
            white-space: nowrap;
        }

        /* ============= LOGIN PILL ============= */
        .login-pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 14px;
            border-radius: 100px;
            background: linear-gradient(135deg, rgba(0, 255, 178, 0.12), rgba(123, 97, 255, 0.12));
            border: 1px solid rgba(0, 255, 178, 0.3);
            font-size: 11px;
            font-weight: 700;
            color: #8EE7DD;
        }

        .login-pill.owner {
            background: linear-gradient(135deg, rgba(255, 77, 202, 0.15), rgba(251, 191, 36, 0.15));
            border-color: rgba(255, 77, 202, 0.4);
            color: #F2B63D;
        }

        .login-pill .dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: currentColor;
            box-shadow: 0 0 8px currentColor;
            animation: ownerDot 2s ease-in-out infinite;
        }

        @keyframes ownerDot {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0.4;
            }
        }

        /* ============= PROGRESS BAR INTERNA ============= */
        .similarity-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            padding: 2px 8px;
            border-radius: 100px;
            background: rgba(255, 77, 202, 0.15);
            color: #E7A6D9;
            border: 1px solid rgba(255, 77, 202, 0.25);
        }

        @media (prefers-reduced-motion: reduce) {

            .tech-particle,
            .wallet-received,
            .nft-flying,
            .confetti-burst,
            .note-card::after,
            .login-pill .dot {
                animation: none !important;
            }
        }

        /* Previne que qualquer texto longo ou sem espaços ultrapasse as bordas dos cards e quebre o layout */
        .break-words, 
        h1, h2, h3, h4, h5, h6, 
        p, span, div, li, a {
            overflow-wrap: break-word !important;
            word-wrap: break-word !important;
            word-break: break-word !important;
        }

        /* ============= PAINEL DE CONFIGURAÇÕES (DRAWER LATERAL) ============= */
        .settings-overlay { position: fixed; inset: 0; z-index: 200; }
        .settings-overlay.hidden { display: none; }

        .settings-backdrop {
            position: absolute; inset: 0;
            background: rgba(3, 6, 18, 0.6);
            backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
            opacity: 0; transition: opacity .28s ease;
        }
        .settings-overlay.open .settings-backdrop { opacity: 1; }

        .settings-drawer {
            position: absolute; top: 0; right: 0; height: 100%;
            width: 400px; max-width: 92vw;
            background: rgba(11, 16, 35, 0.97);
            backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
            border-left: 1px solid var(--border, #1E2745);
            box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
            display: flex; flex-direction: column;
            transform: translateX(100%);
            transition: transform .3s cubic-bezier(.22, .61, .36, 1);
        }
        .settings-overlay.open .settings-drawer { transform: translateX(0); }
        body.light .settings-drawer { background: rgba(255, 255, 255, 0.97); }

        .settings-drawer-head {
            display: flex; align-items: center; justify-content: space-between;
            padding: 18px 20px; flex-shrink: 0;
            border-bottom: 1px solid var(--border, #1E2745);
        }
        .settings-drawer-head h2 {
            font-size: 1.05rem; font-weight: 800; color: var(--text, #F4F6FB);
            display: flex; align-items: center; gap: 10px;
        }
        .settings-drawer-head h2 i { color: #9B6BFF; }
        .settings-close {
            width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center;
            color: #9AA3B7; background: transparent; transition: all .15s;
        }
        .settings-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

        .settings-drawer-body { flex: 1; overflow-y: auto; padding: 8px 14px 28px; }
        .set-group { margin-top: 16px; }
        .set-group-title {
            font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
            color: #6B7488; padding: 0 6px 6px;
        }
        .set-row {
            display: flex; align-items: center; justify-content: space-between; gap: 10px;
            padding: 10px 8px; border-radius: 12px; cursor: pointer; transition: background .15s;
        }
        .set-row:hover { background: rgba(255, 255, 255, 0.05); }
        body.light .set-row:hover { background: rgba(0, 0, 0, 0.04); }
        .set-row-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
        .set-ico {
            width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px;
            background: rgba(11, 16, 35, 0.7); border: 1px solid var(--border, #1E2745);
            display: flex; align-items: center; justify-content: center; font-size: 14px;
        }
        body.light .set-ico { background: rgba(0, 0, 0, 0.04); }
        .set-title { font-size: 13.5px; font-weight: 700; color: var(--text, #F4F6FB); line-height: 1.25; }
        .set-sub { font-size: 10.5px; color: #828BA0; line-height: 1.2; }

        /* Switch (toggle) */
        .set-switch {
            width: 40px; height: 22px; flex-shrink: 0; border-radius: 999px;
            background: #1E2745; position: relative; transition: background .2s;
        }
        .set-knob {
            position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
            border-radius: 50%; background: #9AA3B7; transition: transform .2s, background .2s;
        }
        .set-switch.on { background: rgba(142, 231, 221, 0.30); }
        .set-switch.on .set-knob { transform: translateX(18px); background: #8EE7DD; }

        /* Pill (idioma / moeda / fonte) */
        .set-pill {
            flex-shrink: 0; min-width: 38px; text-align: center; padding: 4px 10px;
            border-radius: 8px; font-size: 11px; font-weight: 800; color: #8EE7DD;
            background: rgba(142, 231, 221, 0.12); border: 1px solid rgba(142, 231, 221, 0.25);
        }
        /* Badge "em breve" */
        .set-soon {
            flex-shrink: 0; font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
            color: #9AA3B7; background: rgba(154, 163, 183, 0.12);
            border: 1px solid var(--border, #1E2745); padding: 3px 8px; border-radius: 999px;
        }
        .set-chev { color: #586079; font-size: 11px; flex-shrink: 0; }
        .set-version { text-align: center; font-size: 10px; color: #586079; margin-top: 14px; }
        .set-danger { border-top: 1px solid var(--border, #1E2745); margin-top: 18px; padding-top: 6px; }

        @media (max-width: 420px) {
            .settings-drawer { width: 100%; max-width: 100%; }
        }

        /* ===== Acessibilidade (funcionais) ===== */
        body.reduce-motion *,
        body.reduce-motion *::before,
        body.reduce-motion *::after {
            animation-duration: .001ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: .001ms !important;
            scroll-behavior: auto !important;
        }
        body.high-contrast { --text-muted: #C7CEDA; --border: #39456B; }
        body.high-contrast .text-gray-400,
        body.high-contrast .text-gray-500,
        body.high-contrast .text-gray-600,
        body.high-contrast .set-sub { color: #CBD2DE !important; }
        body.high-contrast .set-group-title { color: #9AA3B7 !important; }

        html.font-sm { font-size: 14px; }
        html.font-lg { font-size: 18px; }

        /* ============================================================
           LIGHT MODE v3 — tema pastel suave "Aetheric Soft"
           Paleta lavanda/menta dessaturada, confortavel para os olhos.
           Vem por ultimo: sobrescreve regras parciais anteriores.
           [class*=] pega variantes de opacidade; [class~=] casa token exato.
           ============================================================ */

        body.light { color: #0f1117; }

        /* ---- Superficies de vidro (glass / header) — neutro limpo, sombra cinza ---- */
        body.light .glass,
        body.light header.glass {
            background: rgba(255, 255, 255, 0.92) !important;
            border-color: rgba(17, 24, 39, 0.10) !important;
            box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 4px 16px rgba(17, 24, 39, 0.05) !important;
            backdrop-filter: blur(14px) saturate(120%);
            -webkit-backdrop-filter: blur(14px) saturate(120%);
        }
        body.light .glass-panel {
            background: #ffffff !important;
            border-color: rgba(17, 24, 39, 0.10) !important;
        }

        /* ---- Cartoes ---- */
        body.light .challenge-card {
            background: #ffffff !important;
            border-color: rgba(17, 24, 39, 0.10) !important;
            box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 4px 14px rgba(17, 24, 39, 0.05) !important;
        }
        body.light .challenge-card:hover {
            box-shadow: 0 8px 26px rgba(17, 24, 39, 0.10) !important;
        }
        body.light .note-card {
            background: #ffffff !important;
            border-color: rgba(17, 24, 39, 0.10) !important;
            box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 3px 12px rgba(17, 24, 39, 0.05) !important;
        }
        body.light .note-card.unread {
            background: #f0faf6 !important;
            border-color: rgba(14, 159, 110, 0.30) !important;
        }

        /* ---- Superficies escuras (classes Tailwind arbitrarias) -> neutro claro limpo ---- */
        body.light [class*="bg-[#050816]"] { background-color: #f6f7f9 !important; }
        body.light [class*="bg-[#0B1023]"] { background-color: #ffffff !important; }
        body.light [class*="bg-[#10162B]"] { background-color: #f1f2f5 !important; }
        body.light [class*="bg-[#1a1a1a]"],
        body.light [class*="bg-[#111]"],
        body.light [class*="bg-[#1E2745]"],
        body.light [class*="bg-[#2a365c]"] { background-color: #eceef1 !important; }

        /* ---- Bordas escuras -> hairline neutra nitida (definicao, nao nevoa) ---- */
        body.light [class*="border-[#1E2745]"],
        body.light [class*="border-[#2a365c]"],
        body.light [class*="border-[#10162B]"],
        body.light [class*="border-white/"] { border-color: rgba(17, 24, 39, 0.11) !important; }

        /* ---- Inputs ---- */
        body.light input,
        body.light textarea,
        body.light select {
            background: #ffffff !important;
            border-color: rgba(17, 24, 39, 0.15) !important;
            color: #0f1117 !important;
        }
        body.light input::placeholder,
        body.light textarea::placeholder { color: #94a0af !important; }

        /* ---- Texto: titulos e corpo ---- */
        body.light .text-white,
        body.light .text-heading,
        body.light .horizon-font { color: #0f1117 !important; }

        /* Titulo do hero (tem color:#fff inline) -> roxo forte da marca */
        body.light .hero-line { color: #5a2fd6 !important; }

        /* CTA final: remove o degrade escuro no modo claro (mantem no escuro) */
        body.light .cta-final { background-image: none !important; }

        /* FAQ accordion (landing) */
        .faq-item summary { list-style: none; }
        .faq-item summary::-webkit-details-marker { display: none; }
        .faq-chevron { transition: transform .25s ease; }
        .faq-item[open] .faq-chevron { transform: rotate(180deg); }
        .faq-item[open] > summary { color: var(--cyan); }
        body.light [class*="text-zinc-1"],
        body.light [class*="text-zinc-2"],
        body.light [class*="text-zinc-3"],
        body.light .text-gray-200,
        body.light .text-gray-300 { color: #1c2230 !important; }
        body.light [class*="text-zinc-4"],
        body.light [class*="text-zinc-5"],
        body.light .text-gray-400 { color: #444d5c !important; }
        body.light [class*="text-zinc-6"],
        body.light [class*="text-zinc-7"],
        body.light .text-gray-500,
        body.light .text-gray-600 { color: #5c6472 !important; }

        /* ---- Texto: acentos dessaturados (pastel + contraste) ---- */
        body.light [class*="text-[#F4F6FB]"],
        body.light [class*="text-[#9AA3B7]"] { color: #4a4366 !important; }
        body.light [class*="text-[#8EE7DD]"],
        body.light [class*="text-[#19E6A7]"],
        body.light [class*="text-[#00e09d]"] { color: #0a6f5b !important; }
        body.light [class*="text-[#9B6BFF]"],
        body.light [class*="text-[#8e74ff]"],
        body.light [class*="text-[#c4b5fd]"],
        body.light [class*="text-[#6a50e5]"] { color: #54379e !important; }
        body.light [class*="text-[#E7A6D9]"] { color: #9c4385 !important; }
        body.light [class*="text-[#F2B63D]"] { color: #73530c !important; }
        body.light .text-amber-200,
        body.light .text-amber-400,
        body.light .text-amber-500,
        body.light .text-yellow-400,
        body.light .text-yellow-500 { color: #73530c !important; }

        /* ---- Acentos como FUNDO solido (token exato p/ nao pegar /opacidade) -> pastel ---- */
        body.light [class~="bg-[#8EE7DD]"],
        body.light [class~="bg-[#19E6A7]"],
        body.light [class~="bg-[#00e09d]"] { background-color: #6fd9c4 !important; }
        body.light [class~="bg-[#9B6BFF]"],
        body.light [class~="bg-[#6a50e5]"] { background-color: #8a67e6 !important; }
        body.light [class~="bg-[#F2B63D]"] { background-color: #f0d488 !important; }

        /* ---- Grade de fundo + scrollbar em tom lavanda ---- */
        body.light .bg-grid {
            background-image:
                linear-gradient(to right, rgba(17, 24, 39, 0.04) 1px, transparent 1px),
                linear-gradient(to bottom, rgba(17, 24, 39, 0.04) 1px, transparent 1px) !important;
        }
        body.light ::-webkit-scrollbar-thumb { background: rgba(17, 24, 39, 0.20); }
        /* ===== Wizard de publicação de desafio (Novo Desafio) ===== */
        .pub-step {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 9px;
            padding: 13px 6px;
            border-radius: 12px;
            font-size: 10px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.14em;
            color: #6B7280;
            border: 1px solid var(--border);
            background: rgba(11, 16, 35, 0.4);
            cursor: pointer;
            transition: all 0.15s;
            white-space: nowrap;
            font-family: var(--inter);
        }

        .pub-step:hover {
            color: #fff;
            border-color: #2a365c;
        }

        .pub-step-n {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: grid;
            place-items: center;
            font-size: 10px;
            font-weight: 700;
            font-family: var(--mono);
            border: 1px solid var(--border);
            color: #6B7280;
            flex: 0 0 auto;
            letter-spacing: 0;
        }

        .pub-step.active {
            border-color: var(--cyan);
            background: rgba(142, 231, 221, 0.1);
            color: #fff;
        }

        .pub-step.active .pub-step-n {
            border-color: var(--cyan);
            color: var(--cyan);
        }

        .pub-step.done {
            color: var(--text-muted);
        }

        .pub-step.done .pub-step-n {
            background: rgba(25, 230, 167, 0.15);
            border-color: rgba(25, 230, 167, 0.5);
            color: #19E6A7;
        }

        @media (max-width: 640px) {
            .pub-step .pub-step-txt {
                display: none;
            }
        }

        body.light .pub-step {
            background: rgba(241, 243, 245, 0.8);
        }

        body.light .pub-step:hover {
            color: #1a1d23;
        }

        body.light .pub-step.active {
            color: #1a1d23;
        }

        /* ============================================================
           NOVO DESAFIO — escala tipográfica compacta e refinada.
           Fontes menores, compensadas por mais espaço em branco (paddings e
           gaps no index.html). Escopo restrito ao #publish-modal.
           ============================================================ */
        #publish-modal { font-size: 14px; }
        #publish-modal .text-xs   { font-size: 11px !important; }
        #publish-modal .text-sm   { font-size: 12.5px !important; }
        #publish-modal .text-base { font-size: 13.5px !important; }
        #publish-modal .text-lg   { font-size: 15px !important; }
        #publish-modal .text-xl   { font-size: 17px !important; }
        #publish-modal .text-2xl  { font-size: 19px !important; }
        #publish-modal input,
        #publish-modal textarea   { font-size: 13.5px !important; }
        #publish-modal .mono-font { letter-spacing: .01em; }

        /* Menos poluição: rótulos e textos de apoio mais leves e discretos,
           deixando os campos como foco visual. */
        #publish-modal section h3 { letter-spacing: -0.01em; }
        #publish-modal ::placeholder { opacity: 0.6; }
        #publish-modal p { line-height: 1.55; }
        #publish-modal label { color: #7C8598 !important; letter-spacing: .14em; }
        /* As frases-guia à direita de cada título (só desktop) ficam bem discretas */
        #publish-modal section .flex.items-baseline p { color: #5A6273 !important; }

        /* ===== Central de notificações (sino do header) ===== */
        .notif-panel {
            position: absolute; top: calc(100% + 10px); right: 0; width: 360px; max-width: calc(100vw - 24px);
            background: var(--bg-2, #10141D); border: 1px solid var(--border, #1E2745);
            border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.5); z-index: 60;
            overflow: hidden; transform-origin: top right;
            opacity: 0; transform: translateY(-6px) scale(.98); transition: opacity .18s ease, transform .18s ease;
        }
        .notif-panel.open { opacity: 1; transform: translateY(0) scale(1); }
        .notif-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--border, #1E2745); }
        .notif-panel-title { font-weight: 800; color: var(--text, #F4F6FB); font-size: 15px; }
        .notif-panel-sub { font-size: 11px; color: var(--text-muted, #7A849E); margin-top: 2px; }
        .notif-markall { font-size: 11px; font-weight: 700; color: #8EE7DD; background: none; border: 0; cursor: pointer; white-space: nowrap; }
        .notif-markall:hover { text-decoration: underline; }
        .notif-list { max-height: min(60vh, 440px); overflow-y: auto; }
        .notif-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 13px 18px; background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.04); cursor: pointer; transition: background .15s; position: relative; }
        .notif-item:hover { background: rgba(255,255,255,.03); }
        .notif-item.unread { background: rgba(142,231,221,.05); }
        .notif-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
        .notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
        .notif-title { font-size: 13px; font-weight: 700; color: var(--text, #F4F6FB); line-height: 1.35; }
        .notif-text { font-size: 12px; color: var(--text-muted, #9AA3B7); line-height: 1.4; }
        .notif-time { font-size: 10.5px; color: #5A6273; margin-top: 2px; }
        .notif-dot { width: 8px; height: 8px; border-radius: 50%; background: #8EE7DD; flex-shrink: 0; margin-top: 6px; margin-left: auto; }
        .notif-empty { text-align: center; padding: 40px 26px; color: var(--text-muted, #7A849E); }
        .notif-empty i { font-size: 30px; opacity: .5; display: block; margin-bottom: 12px; }
        .notif-empty p { font-weight: 700; color: var(--text, #F4F6FB); font-size: 14px; }
        .notif-empty span { font-size: 12px; display: block; margin-top: 6px; line-height: 1.5; }
        body.light .notif-panel { background: #ffffff; border-color: rgba(0,0,0,.08); box-shadow: 0 20px 50px rgba(0,0,0,.14); }
        body.light .notif-item.unread { background: rgba(14,158,120,.06); }
        body.light .notif-item:hover { background: rgba(0,0,0,.03); }
