/* Naruto Idle - camada visual final */
:root {
  --polish-ink: #080b0e;
  --polish-panel: rgba(13, 17, 21, .96);
  --polish-panel-2: rgba(24, 29, 34, .96);
  --polish-line: #594421;
  --polish-line-hot: #d29b27;
  --polish-gold: #e3b33d;
  --polish-gold-soft: #f2d178;
  --polish-text: #f0eadf;
  --polish-muted: #a9a296;
  --polish-green: #64c96b;
  --polish-red: #dc584d;
  --polish-blue: #3d9bd7;
  --polish-radius: 6px;
  --polish-shadow: 0 18px 55px rgba(0, 0, 0, .72);
}

* { scrollbar-width: thin; scrollbar-color: #775a2a #090c0f; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: #090c0f; }
*::-webkit-scrollbar-thumb { background: #765929; border: 2px solid #090c0f; border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: #ad8133; }
::selection { color: #151006; background: var(--polish-gold-soft); }

button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--polish-gold) !important;
  outline-offset: 2px !important;
}

/* HUD superior */
body:not(.nrmt-baiak-layout) [class*="_topHud_"] {
  height: 62px !important;
  background: linear-gradient(180deg, rgba(20, 24, 27, .98), rgba(7, 9, 11, .98)) !important;
  border-bottom: 1px solid #8e6927 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .7), inset 0 -1px rgba(235, 177, 54, .12) !important;
}
body:not(.nrmt-baiak-layout) [class*="_topHud_"]::after {
  content: "";
  position: absolute;
  right: 0; bottom: -1px; left: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #d7a627 18%, #ffe08a 50%, #d7a627 82%, transparent);
  opacity: .65;
}
body:not(.nrmt-baiak-layout) [class*="_topHudNavigation_"] { gap: 2px !important; padding-inline: 8px !important; }
body:not(.nrmt-baiak-layout) [class*="_topHudMenuButton_"] {
  position: relative !important;
  min-width: 80px !important;
  padding: 5px 10px 4px !important;
  background: transparent !important;
  border: 0 !important;
  border-right: 1px solid rgba(143, 103, 35, .22) !important;
  transition: background .18s ease, color .18s ease, transform .18s ease !important;
}
body:not(.nrmt-baiak-layout) [class*="_topHudMenuButton_"]::after {
  content: "";
  position: absolute;
  right: 18%; bottom: 0; left: 18%;
  height: 2px;
  background: var(--polish-gold);
  transform: scaleX(0);
  transition: transform .2s ease;
  box-shadow: 0 0 10px var(--polish-gold);
}
body:not(.nrmt-baiak-layout) [class*="_topHudMenuButton_"]:hover { background: linear-gradient(180deg, rgba(211, 156, 39, .12), transparent) !important; transform: translateY(-1px); }
body:not(.nrmt-baiak-layout) [class*="_topHudMenuButton_"]:hover::after,
body:not(.nrmt-baiak-layout) [class*="_topHudMenuButtonActive_"]::after { transform: scaleX(1); }
body:not(.nrmt-baiak-layout) [class*="_topHudMenuButtonActive_"] { background: linear-gradient(180deg, rgba(226, 174, 56, .18), rgba(226, 174, 56, .03)) !important; }
body:not(.nrmt-baiak-layout) [class*="_topHudMenuIcon_"] { width: 22px !important; height: 22px !important; filter: drop-shadow(0 2px 2px #000); transition: transform .18s ease, filter .18s ease !important; }
body:not(.nrmt-baiak-layout) [class*="_topHudMenuButton_"]:hover [class*="_topHudMenuIcon_"] { transform: translateY(-2px) scale(1.08); filter: sepia(.5) saturate(1.5) drop-shadow(0 0 5px #c98e20); }
body:not(.nrmt-baiak-layout) [class*="_topHudMenuLabel_"] { color: #c8c1b5 !important; font-size: 9px !important; font-weight: 600 !important; letter-spacing: .06em !important; }
body:not(.nrmt-baiak-layout) [class*="_topHudMenuButtonActive_"] [class*="_topHudMenuLabel_"] { color: var(--polish-gold-soft) !important; }
body:not(.nrmt-baiak-layout) [class*="_topHudCurrency_"] { height: 100% !important; padding-inline: 16px !important; background: linear-gradient(90deg, rgba(0,0,0,.25), transparent) !important; border-right: 1px solid rgba(169, 124, 38, .3) !important; }
body:not(.nrmt-baiak-layout) [class*="_topHudCurrencyValue_"] { color: var(--polish-gold-soft) !important; text-shadow: 0 0 9px rgba(227, 179, 61, .35) !important; }

/* Painel do ninja e equipe */
body:not(.nrmt-baiak-layout) [class*="_wrapper_iq0g4_"] { gap: 8px !important; padding: 8px !important; }
body:not(.nrmt-baiak-layout) [class*="_characterPanel_iq0g4_"] {
  position: relative !important;
  background: linear-gradient(145deg, rgba(18, 22, 26, .98), rgba(7, 9, 11, .98)) !important;
  border-color: #765822 !important;
  border-radius: var(--polish-radius) !important;
  box-shadow: 0 12px 35px rgba(0,0,0,.62), inset 0 0 0 1px rgba(255,220,125,.035) !important;
  overflow: hidden !important;
}
body:not(.nrmt-baiak-layout) [class*="_characterPanel_iq0g4_"]::before {
  content: "";
  position: absolute; inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--polish-gold), transparent);
  opacity: .75;
}
body:not(.nrmt-baiak-layout) [class*="_portraitFrame_iq0g4_"] { background: radial-gradient(circle, #283039, #080a0c) !important; border-color: #a27b30 !important; box-shadow: 0 0 14px rgba(206,156,49,.16) !important; }
body:not(.nrmt-baiak-layout) [class*="_name_iq0g4_"] { color: #fff5dd !important; text-shadow: 0 1px #000, 0 0 9px rgba(255,208,100,.2) !important; }
body:not(.nrmt-baiak-layout) [class*="_qualityBox_iq0g4_"] { background: rgba(0,0,0,.32) !important; border: 1px solid rgba(126,94,39,.38) !important; border-radius: 4px !important; }
body:not(.nrmt-baiak-layout) [class*="_elementBadge_iq0g4_"] { border: 1px solid rgba(255,255,255,.2) !important; border-radius: 3px !important; box-shadow: inset 0 -5px rgba(0,0,0,.15) !important; }
body:not(.nrmt-baiak-layout) [class*="_statBarContainer_iq0g4_"] { height: 11px !important; background: #050607 !important; border: 1px solid #41464a !important; border-radius: 2px !important; overflow: hidden !important; box-shadow: inset 0 2px 4px #000 !important; }
body:not(.nrmt-baiak-layout) [class*="_statBarFill_iq0g4_"] { position: relative; transition: width .3s ease !important; box-shadow: inset 0 1px rgba(255,255,255,.25), 0 0 7px currentColor !important; }
body:not(.nrmt-baiak-layout) [class*="_partyList_iq0g4_"] { gap: 7px !important; }
body:not(.nrmt-baiak-layout) [class*="_partyMemberCard_iq0g4_"] {
  position: relative !important;
  background: linear-gradient(105deg, rgba(24,29,34,.96), rgba(10,13,16,.96)) !important;
  border: 1px solid #514221 !important;
  border-radius: 4px !important;
  box-shadow: 0 6px 14px rgba(0,0,0,.38) !important;
  overflow: hidden !important;
  transition: transform .16s ease, border-color .16s ease, filter .16s ease !important;
}
body:not(.nrmt-baiak-layout) [class*="_partyMemberCard_iq0g4_"]:hover { transform: translateX(3px); border-color: #a87c2a !important; filter: brightness(1.08); }
body:not(.nrmt-baiak-layout) [class*="_partyMemberCardBadge_iq0g4_"] { color: #201705 !important; background: var(--polish-gold) !important; border: 0 !important; border-radius: 2px !important; }
body:not(.nrmt-baiak-layout) [class*="_partyMemberCardHpbar_iq0g4_"] { height: 5px !important; background: #040506 !important; border-radius: 4px !important; overflow: hidden !important; }
body:not(.nrmt-baiak-layout) [class*="_partyMemberCardHpfill_iq0g4_"] { background: linear-gradient(90deg, #218a43, #65df73) !important; box-shadow: 0 0 7px #39b957 !important; transition: width .28s ease !important; }

/* Auto-Helper */
.pixel-panel:has(#btn-autohelper-toggle) {
  background: linear-gradient(150deg, rgba(20,25,29,.97), rgba(7,9,11,.97)) !important;
  border: 1px solid #6c5124 !important;
  border-radius: 5px !important;
  box-shadow: 0 12px 34px rgba(0,0,0,.58), inset 0 0 0 1px rgba(255,255,255,.025) !important;
  overflow: hidden !important;
}
.pixel-panel:has(#btn-autohelper-toggle) .pixel-header { padding: 8px !important; color: var(--polish-gold-soft) !important; background: linear-gradient(90deg,#252b30,#15191d) !important; border-bottom: 1px solid #6a5127 !important; }
#btn-autohelper-toggle { min-height: 34px !important; border-radius: 3px !important; box-shadow: inset 0 1px rgba(255,255,255,.13), 0 5px 12px rgba(0,0,0,.28) !important; }

/* Janelas e controles */
.nrmt-game-overlay { background: rgba(2,4,7,.78) !important; backdrop-filter: blur(5px) saturate(.8) !important; }
.nrmt-game-window {
  background: linear-gradient(145deg, #14191e, #090c0f) !important;
  border-color: #725727 !important;
  box-shadow: var(--polish-shadow), inset 0 0 0 1px rgba(255,255,255,.035) !important;
}
.nrmt-game-window__header { background: linear-gradient(90deg,#272e34,#171c20 55%,#111519) !important; border-bottom-color: #755826 !important; }
.nrmt-game-window__header::after { content:""; position:absolute; right:0; bottom:-1px; left:0; height:1px; background:linear-gradient(90deg,transparent,#c6922b,transparent); opacity:.5; }
.nrmt-game-window__close { transition: transform .15s ease, background .15s ease !important; }
.nrmt-game-window__close:hover { transform: rotate(90deg) scale(1.06) !important; }
.pixel-button, .nrmt-btn, .btn-accept, .btn-complete,
.nrmt-native-hunt-enter, .nrmt-native-hunt-details {
  position: relative;
  overflow: hidden;
  border-radius: 3px !important;
  letter-spacing: .03em !important;
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 4px 10px rgba(0,0,0,.24) !important;
}
.pixel-button::before, .nrmt-btn::before, .btn-accept::before, .btn-complete::before,
.nrmt-native-hunt-enter::before, .nrmt-native-hunt-details::before {
  content:""; position:absolute; top:0; bottom:0; left:-50%; width:35%; pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.16),transparent); transform:skewX(-20deg); transition:left .35s ease;
}
.pixel-button:hover::before, .nrmt-btn:hover::before, .btn-accept:hover::before, .btn-complete:hover::before,
.nrmt-native-hunt-enter:hover::before, .nrmt-native-hunt-details:hover::before { left:115%; }
input, select, textarea { color:var(--polish-text) !important; background:#0b0f12 !important; border-color:#564526 !important; border-radius:3px !important; }
input:hover, select:hover, textarea:hover { border-color:#8e6b2d !important; }

/* Cards: missões, hunts e jutsus */
.mission-card.nrmt-mission-card, .nrmt-hunts-native-list > .nrmt-native-hunt-row, .jutsu-card {
  border-color: #493c27 !important;
  background: linear-gradient(135deg, rgba(23,28,33,.98), rgba(11,14,17,.98)) !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.34) !important;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}
.mission-card.nrmt-mission-card:hover, .nrmt-hunts-native-list > .nrmt-native-hunt-row:hover, .jutsu-card:hover {
  transform: translateY(-2px);
  border-color: #9b7430 !important;
  box-shadow: 0 12px 27px rgba(0,0,0,.48), 0 0 0 1px rgba(213,164,53,.08) !important;
}
.nrmt-mission-card__media, .nrmt-native-hunt-thumb { background:#060809 !important; border-color:#5e4824 !important; overflow:hidden !important; }
.nrmt-mission-card__image, .nrmt-native-hunt-thumb__img { transition: transform .4s ease, filter .4s ease !important; }
.mission-card:hover .nrmt-mission-card__image, .nrmt-native-hunt-row:hover .nrmt-native-hunt-thumb__img { transform:scale(1.045); filter:saturate(1.12) brightness(1.06); }
.nrmt-mission-card__rank, .nrmt-native-hunt-thumb__level { backdrop-filter:blur(5px); box-shadow:0 3px 9px rgba(0,0,0,.4); }
.jutsu-card--ready { border-left:3px solid var(--polish-green) !important; }
.jutsu-card--cooldown { border-left:3px solid var(--polish-gold) !important; }
.jutsu-card--locked { filter:grayscale(.65); }
.jutsu-card__icon { border-radius:4px !important; box-shadow:0 0 12px rgba(215,166,39,.12); }

/* Inventário, equipamento, tabelas e chat */
.inventory-item-card, .inventory-item, .equipment-slot { border-radius:4px !important; transition:transform .15s ease,border-color .15s ease,filter .15s ease !important; }
.inventory-item-card:hover, .inventory-item:hover, .equipment-slot:hover { transform:translateY(-2px) scale(1.02); filter:brightness(1.1); border-color:#ba8735 !important; }
.leaderboard-table tbody tr { transition:background .15s ease,transform .15s ease; }
.leaderboard-table tbody tr:hover { background:rgba(211,161,52,.08) !important; transform:translateX(2px); }
.nrmt-chat-window { border-color:#594421 !important; box-shadow:0 14px 38px rgba(0,0,0,.58) !important; }

/* Seleção da equipe: prevalece sobre o estilo injetado pelo script */
.nrmt-team-select-overlay { background:radial-gradient(circle at 50% 35%,rgba(70,48,14,.22),rgba(2,4,7,.9)) !important; backdrop-filter:blur(7px) !important; }
.nrmt-team-select { border-color:#916b29 !important; box-shadow:0 24px 80px #000,0 0 0 1px rgba(255,211,99,.07) !important; }
.nrmt-team-select__header { background:linear-gradient(90deg,#2a3035,#151a1e) !important; }
.nrmt-team-select__card { background:linear-gradient(145deg,#1b2126,#0c0f12) !important; transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease !important; }
.nrmt-team-select__card:hover:not(:disabled) { transform:translateY(-3px) !important; border-color:#bd8c34 !important; box-shadow:0 9px 18px rgba(0,0,0,.42) !important; }
.nrmt-team-select__card.is-selected { border-color:#6bd473 !important; background:linear-gradient(145deg,rgba(51,105,58,.45),#0c1410) !important; }
.nrmt-team-select__confirm:not(:disabled) { background:linear-gradient(180deg,#4f9c54,#285e30) !important; box-shadow:0 0 15px rgba(86,197,96,.2) !important; }

/* Efeitos globais mais limpos */
.nrmt-jutsu-flash { letter-spacing:.05em; filter:drop-shadow(0 7px 12px #000); }
.nrmt-drop-toast { backdrop-filter:blur(8px); border-radius:5px !important; }
.nrmt-damage-number { filter:drop-shadow(2px 3px 1px #000); }

/* Itens NTO: ícones extraídos da própria DAT/SPR, com leitura clara por raridade. */
.inventory-modal__items { gap:8px !important; padding:10px !important; }
.inventory-item-card {
  min-height:86px !important;
  background:radial-gradient(circle at 50% 24%,rgba(203,154,54,.12),transparent 48%),linear-gradient(145deg,#171d22,#090c0f) !important;
  border:1px solid #4e4029 !important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025),0 5px 12px rgba(0,0,0,.34) !important;
}
.inventory-item-card img {
  width:40px !important;
  height:40px !important;
  object-fit:contain !important;
  image-rendering:pixelated !important;
  filter:drop-shadow(0 3px 3px #000) drop-shadow(0 0 5px rgba(255,183,44,.22));
  transition:transform .18s ease,filter .18s ease;
}
.inventory-item-card:hover img { transform:scale(1.18) translateY(-2px); filter:drop-shadow(0 4px 4px #000) drop-shadow(0 0 9px rgba(255,190,60,.48)); }
.inventory-item-card > div:nth-child(2) { color:#e9dfcc !important; line-height:1.15 !important; text-shadow:1px 1px #000; }
canvas { /* filtro global removido sob Baiak (layout-lock); fora do Baiak mantém leve punch */ }
body:not(.nrmt-baiak-layout) canvas { filter:saturate(1.04) contrast(1.025); }

@media (max-width: 980px) {
  body:not(.nrmt-baiak-layout) [class*="_topHudMenuButton_"] { min-width:68px !important; padding-inline:7px !important; }
  body:not(.nrmt-baiak-layout) [class*="_topHudMenuLabel_"] { font-size:8px !important; }
  body:not(.nrmt-baiak-layout) [class*="_wrapper_iq0g4_"] { transform-origin:top left; }
}
@media (max-width: 680px) {
  body:not(.nrmt-baiak-layout) [class*="_topHud_"] { height:56px !important; }
  body:not(.nrmt-baiak-layout) [class*="_topHudNavigation_"] { overflow-x:auto !important; scrollbar-width:none; }
  body:not(.nrmt-baiak-layout) [class*="_topHudMenuButton_"] { min-width:58px !important; }
  body:not(.nrmt-baiak-layout) [class*="_topHudMenuIcon_"] { width:19px !important; height:19px !important; }
  body:not(.nrmt-baiak-layout) [class*="_topHudMenuLabel_"] { max-width:54px; overflow:hidden; text-overflow:ellipsis; }
  .nrmt-game-overlay { padding:62px 8px 8px !important; }
  .nrmt-game-window { width:calc(100vw - 16px) !important; max-height:calc(100vh - 70px) !important; }
  .nrmt-team-transition__content { gap:10px !important; padding-inline:15px !important; }
  .nrmt-team-transition__content img { width:66px !important; height:66px !important; }
  .nrmt-team-transition__content span { font-size:10px !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
