    @import url('https://fonts.cdnfonts.com/css/opendyslexic');
  

    :root {
      --bg: #081120;
      --bg-2: #0f172a;
      --card: rgba(255,255,255,0.08);
      --card-2: rgba(255,255,255,0.05);
      --line: rgba(255,255,255,0.12);
      --text: #f8fafc;
      --muted: #cbd5e1;
      --primary: #22c55e;
      --primary-dark: #16a34a;
      --blue: #3b82f6;
      --red: #ef4444;
      --amber: #f59e0b;
      --radius: 24px;
      --shadow: 0 24px 60px rgba(0,0,0,0.28);
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color: var(--text);
      background:
        radial-gradient(circle at top left, rgba(34,197,94,0.14), transparent 25%),
        radial-gradient(circle at top right, rgba(59,130,246,0.14), transparent 25%),
        linear-gradient(135deg, #020617 0%, #081120 45%, #0f172a 100%);
      min-height: 100vh;
      transition: background 0.3s, font-family 0.3s;
      overflow-x: hidden;
    }

    /* MODO FOCO / DISLEXIA */
    body.modo-foco {
      font-family: 'OpenDyslexic', sans-serif !important;
      letter-spacing: 1.5px !important;
      line-height: 2 !important;
      background: #020617; 
    }
    body.modo-foco .question-card {
      box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85); 
      z-index: 100;
      position: relative;
      background: #1e293b;
      border-color: var(--primary);
    }

    /* ANIMAÇÕES RPG E PODERES */
    @keyframes float-avatar {
        0%, 100% { transform: translateY(0px); }
        50% { transform: translateY(-8px); }
    }
    .avatar-animate { 
        display: inline-block; 
        animation: float-avatar 3s ease-in-out infinite; 
    }

    @keyframes shake {
        0% { transform: translate(1px, 1px) rotate(0deg); }
        20% { transform: translate(-3px, 0px) rotate(1deg); }
        40% { transform: translate(1px, -2px) rotate(-1deg); }
        60% { transform: translate(-3px, 2px) rotate(0deg); }
        80% { transform: translate(1px, -1px) rotate(1deg); }
        100% { transform: translate(0px, 0px) rotate(0deg); }
    }
    .screen-shake { 
        animation: shake 0.4s infinite; 
    }

    @keyframes meteor-fall {
        0% { transform: translate(100px, -100px); opacity: 1; }
        100% { transform: translate(-600px, 110vh); opacity: 0; }
    }
    .meteor {
        position: fixed; 
        font-size: 6rem; 
        z-index: 99999;
        pointer-events: none; 
        animation: meteor-fall 0.8s linear forwards;
    }
    
    @keyframes pulse-boss {
        0% { transform: scale(1); text-shadow: 0 0 10px rgba(239,68,68,0.5); }
        100% { transform: scale(1.1); text-shadow: 0 0 20px rgba(239,68,68,1); }
    }

    .app { width: min(1400px, calc(100% - 28px)); margin: 20px auto; }
    .topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,0.06); backdrop-filter: blur(16px); box-shadow: var(--shadow); margin-bottom: 20px; }
    .brand { display: flex; align-items: center; gap: 14px; }
    .brand-icon { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 28px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); box-shadow: 0 14px 34px rgba(34,197,94,0.28); }
    .brand h1 { margin: 0; font-size: 1.2rem; }
    .brand p { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }
    .switcher { display: flex; gap: 10px; flex-wrap: wrap; }
    .switch-btn { border: 1px solid var(--line); background: rgba(255,255,255,0.06); color: var(--text); padding: 12px 18px; border-radius: 16px; cursor: pointer; font-weight: 700; transition: .25s ease; }
    .switch-btn.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #052e16; border-color: transparent; }
    .panel-view { display: none; }
    .panel-view.active { display: block; }
    .grid { display: grid; grid-template-columns: 350px 1fr; gap: 20px; align-items: start; }
    .card { background: rgba(255,255,255,0.07); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
    .side { padding: 22px; position: sticky; top: 20px; }
    .main { padding: 24px; }
    .title-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
    .title-row h2, .title-row h3 { margin: 0; }
    .muted { color: var(--muted); }
    .hero { padding: 22px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)); margin-bottom: 20px; position: relative;}
    .hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(59,130,246,0.16); border: 1px solid rgba(59,130,246,0.26); color: #bfdbfe; padding: 8px 12px; border-radius: 999px; font-weight: 700; margin-bottom: 12px; font-size: .9rem; }
    .hero h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 4vw, 2.3rem); }
    .hero p { margin: 0; color: var(--muted); line-height: 1.7; max-width: 850px; }
    .stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
    .stat { padding: 15px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,0.05); }
    .stat span { display: block; color: var(--muted); font-size: .84rem; margin-bottom: 6px; }
    .stat strong { font-size: 1.16rem; }
    .btn { border: none; border-radius: 16px; padding: 13px 16px; font-weight: 800; cursor: pointer; transition: .25s ease; }
    .btn:hover { transform: translateY(-2px); }
    .btn:disabled { opacity: 0.5; cursor: not-allowed; }
    .btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #052e16; }
    .btn-secondary { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid var(--line); }
    .btn-blue { background: linear-gradient(135deg, #60a5fa, #2563eb); color: white; }
    .btn-danger { background: linear-gradient(135deg, #f97316, #ef4444); color: white; }
    .btn-block { width: 100%; }
    .field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .field { display: flex; flex-direction: column; gap: 8px; }
    .field label { color: var(--muted); font-size: .88rem; font-weight: 600; }
    .field input, .field textarea, .field select { width: 100%; padding: 14px 15px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,0.06); color: var(--text); outline: none; font-size: 16px !important; }
    
    .field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>"); background-repeat: no-repeat; background-position-x: 96%; background-position-y: 50%; }
    .field select option { background: #ffffff; color: #000000; font-size: 16px; }

    .section-card { padding: 20px; border-radius: 22px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); margin-bottom: 18px; }
    .pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; border: 1px solid var(--line); background: rgba(255,255,255,0.06); }
    .pill-class { background: rgba(59,130,246,0.15); color: #93c5fd; border-color: rgba(59,130,246,0.3); }
    .question-card { display: none; padding: 22px; border-radius: 24px; border: 1px solid var(--line); background: rgba(255,255,255,0.05); margin-bottom: 16px; animation: fade .3s ease; }
    .question-card.active { display: block; }
    @keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
    
    .question-title { font-size: 1.08rem; line-height: 1.7; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: flex-start;}
    .options { display: grid; gap: 12px; }
    .option { position: relative; cursor: pointer; }
    .option input { position: absolute; opacity: 0; pointer-events: none; }
    .option-box { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,0.05); transition: .2s ease; }
    .option:hover .option-box { transform: translateX(4px); background: rgba(255,255,255,0.08); }
    .option input:checked + .option-box { border-color: rgba(34,197,94,0.46); background: rgba(34,197,94,0.14); }
    .letter { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,0.08); font-weight: 800; flex: 0 0 34px; }
    .question-nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 18px; }
    .nav-dot { aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,0.06); color: var(--text); font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; }
    .nav-dot.answered { background: rgba(34,197,94,0.16); border-color: rgba(34,197,94,0.36); }
    .nav-dot.current { outline: 2px solid rgba(255,255,255,0.84); }
    .actions { display: grid; gap: 10px; margin-top: 18px; }
    .progress-bar { width: 100%; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.08); }
    .progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), #86efac); border-radius: inherit; transition: width .3s ease; }
    .result-screen { display: none; }
    .result-screen.show { display: block; animation: fade .5s ease; }
    .score-wrap { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; }
    .score-circle { width: 180px; height: 180px; border-radius: 50%; position: relative; display: grid; place-items: center; background: conic-gradient(var(--primary) 0deg, rgba(255,255,255,0.08) 0deg); margin-inline: auto; }
    .score-circle::after { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: var(--bg-2); border: 1px solid var(--line); }
    .score-inner { position: relative; z-index: 1; text-align: center; }
    .score-inner strong { display: block; font-size: 2.1rem; }
    .score-inner span { color: var(--muted); }
    .summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
    .summary-box { padding: 15px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,0.05); }
    .summary-box span { display: block; color: var(--muted); font-size: .86rem; margin-bottom: 6px; }
    .summary-box strong { font-size: 1.18rem; }
    .good { border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.08) !important; }
    .bad { border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.08) !important; }
    .review-list, .student-results-list { display: grid; gap: 12px; margin-top: 20px; }
    .review-item, .result-item { border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,0.05); padding: 16px; }
    .review-item h4 { margin: 0 0 8px; font-size: 1rem; color: #fff; }
    .review-item p { margin: 4px 0; color: var(--muted); line-height: 1.55; }
    .result-item:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
    .auth-gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
    .auth-gate.hidden, .app.hidden { display: none; }
    .auth-card { width: min(1100px, 100%); border-radius: 30px; border: 1px solid var(--line); background: rgba(255,255,255,0.07); backdrop-filter: blur(18px); box-shadow: var(--shadow); padding: 28px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; }
    .auth-hero { padding: 26px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(34,197,94,0.14), rgba(59,130,246,0.10)); }
    .auth-hero h2 { margin: 0 0 12px; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.1; }
    .auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
    .auth-tab { border: 1px solid var(--line); background: rgba(255,255,255,0.06); color: var(--text); padding: 12px 24px; border-radius: 14px; cursor: pointer; font-weight: 700; transition: all 0.3s ease; }
    .auth-tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #052e16; border-color: transparent; box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3); }
    .auth-tab.special-tab { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.3); color: #fcd34d; }
    .auth-tab.special-tab.active { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; border-color: transparent; }
    .auth-panel { display: none; padding: 22px; border-radius: 24px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); }
    .auth-panel.active { display: block; animation: fade .3s ease; }
    .error-text { color: #fecaca; background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.26); padding: 10px 12px; border-radius: 14px; min-height: 20px; margin-top: 12px; font-size: .92rem; }
    .tab-content { display: none; animation: fadeInTab 0.4s ease forwards; }
    .tab-content.active { display: block; }
    
    /* Gamificação Estilos */
    .gami-badge { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.3); padding: 8px 16px; border-radius: 20px; border: 1px solid var(--line); }
    .gami-icon { font-size: 1.5rem; }
    .gami-info { display: flex; flex-direction: column; }
    .gami-info span { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; font-weight: bold; }
    .gami-info strong { font-size: 1.1rem; color: #fff; }
    
    .store-modal { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.8); z-index: 1000; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
    .store-modal.active { display: flex; animation: fade 0.3s ease; }
    .store-content { background: var(--bg); border: 1px solid var(--line); border-radius: 24px; padding: 30px; width: 90%; max-width: 800px; max-height: 90vh; overflow-y: auto; }
    .store-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-top: 15px; }
    .store-item { position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04)); border: 1px solid var(--line); border-radius: 22px; padding: 16px; text-align: center; cursor: pointer; transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 295px; }
    .store-item::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 40%); opacity: 0; transition: opacity 0.25s ease; pointer-events: none; }
    .store-item:hover { transform: translateY(-5px); border-color: var(--amber); background: rgba(245, 158, 11, 0.1); box-shadow: 0 18px 34px rgba(0,0,0,0.28); }
    .store-item:hover::before { opacity: 1; }
    .store-item.owned { border-color: rgba(34, 197, 94, 0.5); background: linear-gradient(180deg, rgba(34, 197, 94, 0.16), rgba(34, 197, 94, 0.08)); cursor: default; }
    .store-item.legendary { border-color: rgba(251, 191, 36, 0.45); background: linear-gradient(160deg, rgba(127, 29, 29, 0.46), rgba(69, 10, 10, 0.72) 42%, rgba(17, 24, 39, 0.96)); box-shadow: 0 22px 48px rgba(120, 18, 18, 0.35), inset 0 0 0 1px rgba(251, 191, 36, 0.14); }
    .store-item.legendary::before { opacity: 1; background: radial-gradient(circle at top, rgba(251,191,36,0.22), transparent 42%), linear-gradient(180deg, rgba(255,255,255,0.06), transparent); }
    .store-item.legendary::after { content: ''; position: absolute; inset: 1px; border-radius: 21px; border: 1px solid rgba(251, 191, 36, 0.18); pointer-events: none; }
    .store-item.legendary:hover { border-color: rgba(252, 211, 77, 0.9); box-shadow: 0 24px 52px rgba(127,29,29,0.5), 0 0 0 1px rgba(252,211,77,0.18), 0 0 40px rgba(249,115,22,0.18); background: linear-gradient(160deg, rgba(153, 27, 27, 0.54), rgba(69, 10, 10, 0.78) 40%, rgba(17, 24, 39, 0.98)); }
    .store-item-top { min-height: 24px; display: flex; justify-content: center; }
    .store-rarity { display: inline-flex; align-items: center; justify-content: center; padding: 5px 11px; border-radius: 999px; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; }
    .store-rarity-legendary { color: #fff7d6; background: linear-gradient(135deg, rgba(245,158,11,0.26), rgba(239,68,68,0.28)); border: 1px solid rgba(252,211,77,0.35); box-shadow: 0 0 14px rgba(245,158,11,0.16); }
    .store-seal { position: absolute; top: 12px; right: -30px; transform: rotate(35deg); background: linear-gradient(135deg, #f59e0b, #dc2626); color: white; font-size: 0.65rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; padding: 5px 34px; box-shadow: 0 12px 20px rgba(0,0,0,0.22); z-index: 2; }
    .store-item-media { display:flex; justify-content:center; align-items:center; min-height:96px; margin-bottom: 2px; position: relative; }
    .store-item-title { margin: 0; font-size: 1rem; font-weight: 800; }
    .store-item-desc { font-size: 0.78rem; color: var(--muted); margin: 0; flex-grow: 1; line-height: 1.45; }
    .store-status-text { color: var(--primary); font-weight: 800; margin-top: 5px; }
    .store-legendary-note { font-size: 0.72rem; color: #fde68a; background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(252, 211, 77, 0.18); padding: 8px 10px; border-radius: 12px; line-height: 1.35; }
    .store-item-visual { position: relative; width: 94px; height: 94px; display: grid; place-items: center; border-radius: 24px; background: rgba(255,255,255,0.04); }
    .store-item-visual.legendary { background: radial-gradient(circle at 50% 38%, rgba(255, 190, 92, 0.34), rgba(127, 29, 29, 0.18) 48%, rgba(0, 0, 0, 0) 70%); filter: drop-shadow(0 12px 20px rgba(239, 68, 68, 0.18)); }
    .store-item-image { width: 78px; height: 78px; object-fit: cover; border-radius: 20px; border: 2px solid rgba(255,255,255,0.18); box-shadow: 0 8px 18px rgba(0,0,0,0.28); position: relative; z-index: 2; }
    .store-item-image.legendary { width: 88px; height: 88px; border-radius: 22px; border-color: rgba(252, 211, 77, 0.8); box-shadow: 0 0 0 2px rgba(153, 27, 27, 0.35), 0 16px 30px rgba(0,0,0,0.4), 0 0 24px rgba(249,115,22,0.28); }
    .store-item-icon { font-size: 3rem; margin-bottom: 5px; }
    .store-item-icon.legendary { text-shadow: 0 0 18px rgba(251,191,36,0.3), 0 0 28px rgba(239,68,68,0.24); }
    .store-item-visual-flare { position: absolute; inset: 8px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 197, 92, 0.38), rgba(239, 68, 68, 0.16) 45%, transparent 72%); animation: legendaryPulse 2.8s ease-in-out infinite; }
    .store-item-visual-spark { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.9), rgba(251,191,36,0.65)); box-shadow: 0 0 12px rgba(251,191,36,0.55); z-index: 1; animation: orbitSpark 3.2s linear infinite; }
    .store-item-visual-spark.spark-1 { top: 8px; left: 12px; animation-delay: 0s; }
    .store-item-visual-spark.spark-2 { right: 10px; top: 18px; animation-delay: -1s; }
    .store-item-visual-spark.spark-3 { left: 50%; bottom: 2px; animation-delay: -2s; }
    .store-btn-legendary { background: linear-gradient(135deg, #f59e0b, #dc2626); color: white; border: none; box-shadow: 0 12px 24px rgba(220,38,38,0.28); }
    .store-btn-legendary:hover { transform: translateY(-1px) scale(1.01); box-shadow: 0 16px 28px rgba(220,38,38,0.34); }
    .store-btn-legendary-secondary { border-color: rgba(252,211,77,0.45); background: rgba(245,158,11,0.12); color: #fde68a; }
    @keyframes legendaryPulse { 0%, 100% { transform: scale(0.94); opacity: 0.72; } 50% { transform: scale(1.08); opacity: 1; } }
    @keyframes orbitSpark { 0% { transform: translateY(0) scale(0.8); opacity: 0.4; } 50% { transform: translateY(-6px) scale(1.15); opacity: 1; } 100% { transform: translateY(0) scale(0.8); opacity: 0.4; } }
    
    /* BALÃO DINÂMICO ESTILOS */
    .dynamic-balloon-wrapper { position: fixed; bottom: 25px; right: 25px; display: flex; flex-direction: column; align-items: flex-end; z-index: 9999; transform: translateY(150%) scale(0.8); opacity: 0; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease; pointer-events: none; }
    .dynamic-balloon-wrapper.show { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
    .dynamic-balloon-content { background: linear-gradient(135deg, #1e3a8a, var(--blue)); border: 1px solid rgba(255,255,255,0.2); padding: 22px; border-radius: 24px 24px 4px 24px; color: #fff; max-width: 340px; box-shadow: 0 15px 40px rgba(0,0,0,0.6); position: relative; margin-bottom: 15px; line-height: 1.6; font-size: 0.95rem; }
    .dynamic-balloon-content.amber { background: linear-gradient(135deg, #b45309, var(--amber)); color: #fff; }
    .dynamic-balloon-content.red { background: linear-gradient(135deg, #b91c1c, #ef4444); color: #fff; }
    .dynamic-balloon-avatar { width: 65px; height: 65px; background: var(--bg-2); border: 3px solid var(--line); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
    .balloon-close { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,0.2); border: none; color: inherit; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; font-size: 1rem; transition: 0.2s; }
    .balloon-close:hover { background: rgba(0,0,0,0.5); transform: scale(1.1); }
    .balloon-title { margin: 0 0 10px 0; font-size: 1.1rem; padding-right: 20px; font-weight: 800; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 8px;}
    .hide-mobile { display: inline; }
    @media (max-width: 600px) { .hide-mobile { display: none; } .dynamic-balloon-wrapper { bottom: 15px; right: 15px; } .dynamic-balloon-content { max-width: 280px; } }
    @media (max-width: 1100px) { .grid { grid-template-columns: 1fr; } .side { position: static; } .field-grid { grid-template-columns: 1fr; } }
    @media (max-width: 980px) { .auth-card { grid-template-columns: 1fr; } }
    @media (max-width: 760px) { .topbar { flex-direction: column; align-items: stretch; } .stats, .summary-grid, .score-wrap { grid-template-columns: 1fr; } .gami-badge {width: 100%; justify-content: center;} }
  


/* AVATAR RPG 3D */
.avatar-stage-wrap { width: min(100%, 360px); margin-top: 18px; }
.avatar-stage {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 0px;
  --my: 0px;
  position: relative;
  width: 100%;
  height: 330px;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.18), transparent 26%),
    radial-gradient(circle at 80% 20%, rgba(239, 68, 68, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(15,23,42,0.95), rgba(8,17,32,0.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 25px 50px rgba(0,0,0,0.35);
  transform-style: preserve-3d;
  transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.16s ease, box-shadow 0.25s ease;
}
.avatar-stage:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 32px 70px rgba(0,0,0,0.45); }
.avatar-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent 40%, rgba(255,255,255,0.02));
  pointer-events: none;
}
.avatar-stage-bg,
.avatar-stage-floor,
.avatar-stage-glow,
.avatar-stage-ring,
.avatar-stage-shine,
.avatar-stage-label,
.avatar-stage-particles,
.avatar-stage-image,
.avatar-stage-emoji { position: absolute; }
.avatar-stage-bg {
  inset: 0;
  background:
    radial-gradient(circle at 50% 32%, rgba(248, 113, 113, 0.16), transparent 22%),
    radial-gradient(circle at 50% 60%, rgba(234, 179, 8, 0.08), transparent 30%);
  transform: translateZ(10px);
}
.avatar-stage-floor {
  left: 50%;
  bottom: 16px;
  width: 240px;
  height: 46px;
  transform: translateX(-50%) translateZ(25px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249,115,22,0.38), rgba(239,68,68,0.08) 58%, transparent 72%);
  filter: blur(10px);
}
.avatar-stage-glow {
  left: 50%;
  top: 58px;
  width: 210px;
  height: 210px;
  transform: translateX(-50%) translateZ(20px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253,186,116,0.28), rgba(248,113,113,0.06) 60%, transparent 75%);
  filter: blur(10px);
  animation: avatarPulse 3.6s ease-in-out infinite;
}
.avatar-stage-ring {
  left: 50%;
  top: 120px;
  border-radius: 50%;
  border: 1px solid rgba(251, 191, 36, 0.22);
  transform: translateX(-50%) translateZ(35px);
}
.avatar-stage-ring.ring-1 { width: 180px; height: 180px; animation: spinRing 10s linear infinite; }
.avatar-stage-ring.ring-2 { width: 210px; height: 210px; animation: spinRingReverse 14s linear infinite; }
.avatar-stage-particles { inset: 0; transform: translateZ(50px); }
.avatar-stage-particles span {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,0.95), rgba(251,191,36,0.3));
  box-shadow: 0 0 12px rgba(251,191,36,0.65);
  animation: avatarParticle var(--dur) linear infinite;
  animation-delay: var(--delay);
}
.avatar-stage-image,
.avatar-stage-emoji {
  left: 50%;
  bottom: 28px;
  z-index: 3;
  transform: translateX(calc(-50% + var(--mx))) translateY(var(--my)) translateZ(80px);
  animation: avatarFloat 4s ease-in-out infinite;
}
.avatar-stage-image {
  width: auto;
  max-width: 95%;
  max-height: 268px;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.55));
}
.avatar-stage-emoji {
  font-size: 8rem;
  line-height: 1;
  text-shadow: 0 18px 30px rgba(0,0,0,0.55);
}
.avatar-stage-model.hidden,
.avatar-stage-image.hidden,
.avatar-stage-emoji.hidden { display: none; }
.avatar-stage-shine {
  top: -30%;
  left: -30%;
  width: 70%;
  height: 180%;
  transform: rotate(18deg) translateZ(90px);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
  animation: stageShine 5s ease-in-out infinite;
}
.avatar-stage-label {
  left: 16px;
  top: 16px;
  z-index: 4;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fcd34d;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  transform: translateZ(100px);
}
@keyframes avatarFloat {
  0%, 100% { transform: translateX(calc(-50% + var(--mx))) translateY(calc(var(--my) + 0px)) translateZ(80px); }
  50% { transform: translateX(calc(-50% + var(--mx))) translateY(calc(var(--my) - 10px)) translateZ(95px); }
}
@keyframes avatarPulse {
  0%, 100% { opacity: 0.65; transform: translateX(-50%) translateZ(20px) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) translateZ(20px) scale(1.08); }
}
@keyframes spinRing { from { transform: translateX(-50%) translateZ(35px) rotate(0deg); } to { transform: translateX(-50%) translateZ(35px) rotate(360deg); } }
@keyframes spinRingReverse { from { transform: translateX(-50%) translateZ(35px) rotate(360deg); } to { transform: translateX(-50%) translateZ(35px) rotate(0deg); } }
@keyframes stageShine {
  0%, 100% { opacity: 0; }
  15% { opacity: 0; }
  50% { opacity: 1; }
  85% { opacity: 0; }
}
@keyframes avatarParticle {
  0% { transform: translateY(10px) scale(0.6); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(-180px) scale(1.2); opacity: 0; }
}
@media (max-width: 760px) {
  .avatar-stage-wrap { width: 100%; }
  .avatar-stage { height: 280px; }
  .avatar-stage-image { max-height: 228px; }
  .avatar-stage-emoji { font-size: 6rem; }
}


/* GOLDOF 3D REAL */
.goldof-preview-modal { max-width: 980px; }
.goldof-preview-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.goldof-preview-stage { position: relative; min-height: 520px; border-radius: 28px; border: 1px solid rgba(252, 211, 77, 0.2); background:
  radial-gradient(circle at 50% 20%, rgba(245,158,11,0.16), transparent 28%),
  radial-gradient(circle at 50% 78%, rgba(239,68,68,0.18), transparent 34%),
  linear-gradient(180deg, rgba(18,24,38,0.92), rgba(7,12,23,0.98));
  box-shadow: inset 0 0 0 1px rgba(252,211,77,0.08), 0 26px 50px rgba(0,0,0,0.34);
  overflow: hidden;
}
.goldof-preview-stage::before { content: ''; position: absolute; inset: auto 12% 18px; height: 84px; border-radius: 999px; background: radial-gradient(circle, rgba(249,115,22,0.24), rgba(0,0,0,0) 70%); filter: blur(8px); }
.goldof-preview-viewer { width: 100%; height: 520px; background: transparent; }
.goldof-preview-footer { margin-top: 16px; }
.store-item-model { width: 88px; height: 88px; border-radius: 22px; background: transparent; position: relative; z-index: 2; }
.store-item-model.legendary { filter: drop-shadow(0 12px 18px rgba(249,115,22,0.22)); }
.avatar-stage-model { position: absolute; inset: 12px 8px 24px; width: calc(100% - 16px); height: calc(100% - 36px); z-index: 4; background: transparent; transform: translateZ(40px) translateX(var(--mx)) translateY(calc(var(--my) * 0.7)); }
.avatar-stage.model-active .avatar-stage-glow { opacity: 1; }
.avatar-stage.model-active .avatar-stage-floor { box-shadow: 0 0 36px rgba(245,158,11,0.28), inset 0 0 0 1px rgba(255,255,255,0.05); }
@media (max-width: 760px) {
  .goldof-preview-stage, .goldof-preview-viewer { min-height: 380px; height: 380px; }
}
