/* ==========================================================================
   Design System & Variáveis (Inspirado em Path of Exile)
   ========================================================================== */
:root {
    --bg-app: #08090b;
    --bg-sidebar: #0f1115;
    --bg-card: #15181e;
    --bg-card-hover: #1c2029;
    --border-color: rgba(228, 194, 117, 0.15);
    --border-hover: rgba(228, 194, 117, 0.4);
    
    /* Cores de Acento */
    --poe-gold: #e4c275;
    --poe-gold-hover: #f1db9e;
    --poe-blue: #3f6dbf;
    --poe-red: #a33232;
    --poe-green: #3ca352;
    --poe-text: #c8c8c8;
    --poe-text-muted: #7f7f7f;
    --poe-white: #e9e9e9;

    /* Cores de Itens do PoE */
    --color-normal: #c8c8c8;
    --color-magic: #8888ff;
    --color-rare: #ffff77;
    --color-unique: #af6025;
    --color-gem: #1ba22e;
    --color-currency: #aa9e82;
    --color-runic: #e5c880;

    /* Fontes */
    --font-primary: 'Outfit', sans-serif;
    --font-display: 'Cinzel', serif;
}

/* ==========================================================================
   Reset & Estilos Globais
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-app);
    color: var(--poe-text);
    font-family: var(--font-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

button {
    font-family: var(--font-primary);
    cursor: pointer;
    background: none;
    border: none;
    outline: none;
    color: inherit;
}

input {
    font-family: var(--font-primary);
    border: none;
    outline: none;
    background: none;
    color: inherit;
}

/* ==========================================================================
   Layout Principal (App Grid)
   ========================================================================== */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Estilizada */
.sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    justify-content: space-between;
}

.brand {
    text-align: center;
    margin-bottom: 32px;
}

.brand h1 {
    font-family: var(--font-display);
    color: var(--poe-gold);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(228, 194, 117, 0.3);
}

.brand .sub-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--poe-text-muted);
}

.category-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    color: #a0a0a0;
}

.tab-btn:hover {
    background-color: rgba(228, 194, 117, 0.05);
    color: var(--poe-white);
    border-color: rgba(228, 194, 117, 0.1);
}

.tab-btn.active {
    background-color: rgba(228, 194, 117, 0.1);
    color: var(--poe-gold);
    border-color: var(--border-color);
    box-shadow: inset 0 0 12px rgba(228, 194, 117, 0.08);
}

.tab-btn .icon {
    font-size: 16px;
}

.stats-box {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 24px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.stat-label {
    color: var(--poe-text-muted);
}

.stat-value {
    color: var(--poe-gold);
    font-weight: 600;
}

/* Área de Conteúdo Principal */
.main-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Barra Superior */
.top-bar {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(8, 9, 11, 0.8);
    backdrop-filter: blur(10px);
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(228, 194, 117, 0.1);
    padding: 10px 18px;
    border-radius: 30px;
    width: 450px;
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    border-color: var(--poe-gold);
    box-shadow: 0 0 10px rgba(228, 194, 117, 0.15);
}

.search-icon {
    font-size: 14px;
    color: var(--poe-text-muted);
}

#search-input {
    width: 100%;
    font-size: 13px;
}

#search-input::placeholder {
    color: var(--poe-text-muted);
}

.sub-tabs {
    display: flex;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.sub-tab-btn {
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s ease;
    color: var(--poe-text-muted);
}

.sub-tab-btn:hover {
    color: var(--poe-white);
}

.sub-tab-btn.active {
    background-color: var(--poe-gold);
    color: #1c1402;
    box-shadow: 0 2px 8px rgba(228, 194, 117, 0.3);
}

/* Corpo de Conteúdo */
.content-body {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

.tab-pane {
    display: none;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.tab-pane.active {
    display: block;
}

/* ==========================================================================
   Visualização de Itens Base (Items Section)
   ========================================================================== */
.items-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    height: 100%;
}

.grid-container {
    height: 100%;
    overflow-y: auto;
    padding: 32px;
}

/* Custom Scrollbar */
.grid-container::-webkit-scrollbar,
.inspector-body::-webkit-scrollbar,
.mods-list::-webkit-scrollbar {
    width: 6px;
}

.grid-container::-webkit-scrollbar-track,
.inspector-body::-webkit-scrollbar-track,
.mods-list::-webkit-scrollbar-track {
    background: transparent;
}

.grid-container::-webkit-scrollbar-thumb,
.inspector-body::-webkit-scrollbar-thumb,
.mods-list::-webkit-scrollbar-thumb {
    background: rgba(228, 194, 117, 0.15);
    border-radius: 3px;
}

.grid-container::-webkit-scrollbar-thumb:hover,
.inspector-body::-webkit-scrollbar-thumb:hover,
.mods-list::-webkit-scrollbar-thumb:hover {
    background: var(--poe-gold);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* Cards de Itens */
.item-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    cursor: pointer;
}

.item-card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(228, 194, 117, 0.08);
}

.item-card.selected {
    border-color: var(--poe-gold);
    box-shadow: 0 0 15px rgba(228, 194, 117, 0.15);
}

.item-card-image {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.item-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.item-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--poe-white);
    margin-bottom: 8px;
    line-height: 1.3;
}

.item-card-props {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    font-size: 12px;
    color: var(--poe-text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 8px;
}

.item-card-req {
    margin-top: 6px;
    font-size: 11px;
    color: var(--poe-text-muted);
}

/* ==========================================================================
   Painel Lateral de Inspeção (Inspector)
   ========================================================================== */
.inspector-panel {
    background-color: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.inspector-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.inspector-header h3 {
    font-family: var(--font-display);
    color: var(--poe-gold);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.inspector-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--poe-text-muted);
    height: 300px;
    gap: 16px;
}

.empty-icon {
    font-size: 48px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 13px;
    line-height: 1.5;
}

/* ==========================================================================
   Popup do Path of Exile Estilizado (newItemPopup)
   ========================================================================== */
.newItemPopup {
    background-color: #0b0c10;
    border: 1px solid #2d303b;
    font-family: var(--font-primary);
    font-size: 13px;
    color: var(--poe-text);
    padding: 14px 18px;
    width: 100%;
    max-width: 320px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    margin-top: 16px;
}

/* Efeitos de Raros/Únicos baseados na classe */
.newItemPopup.NormalPopup { border-color: #4a4d5c; }
.newItemPopup.MagicPopup { border-color: var(--poe-blue); }
.newItemPopup.RarePopup { border-color: var(--color-rare); }
.newItemPopup.UltraRarePopup { border-color: var(--poe-red); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(163, 50, 50, 0.15); }
.newItemPopup.UniquePopup { border-color: var(--color-unique); }
.newItemPopup.RunicNormalPopup { border-color: var(--color-runic); }

/* Header do Item */
.itemHeader {
    padding-bottom: 8px;
    position: relative;
}

.itemName {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
}

/* Estilos de cores para o título */
.NormalPopup .itemName { color: var(--color-normal); }
.MagicPopup .itemName { color: var(--color-magic); }
.RarePopup .itemName { color: var(--color-rare); }
.UltraRarePopup .itemName { color: var(--poe-red); text-shadow: 0 0 8px rgba(163, 50, 50, 0.4); }
.UniquePopup .itemName { color: var(--color-unique); }
.RunicNormalPopup .itemName { color: var(--color-runic); }

/* Divisores Clássicos do PoE (Linha com nó/diamante no centro) */
.newItemPopup .separator {
    height: 8px;
    margin: 8px 0;
    background-image: linear-gradient(90deg, transparent, rgba(170, 158, 130, 0.35) 20%, rgba(170, 158, 130, 0.5) 50%, rgba(170, 158, 130, 0.35) 80%, transparent);
    position: relative;
}

.newItemPopup .separator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 6px;
    height: 6px;
    background-color: #15181f;
    border: 1px solid rgba(170, 158, 130, 0.6);
}

.UltraRarePopup .separator {
    background-image: linear-gradient(90deg, transparent, rgba(163, 50, 50, 0.4) 20%, rgba(163, 50, 50, 0.7) 50%, rgba(163, 50, 50, 0.4) 80%, transparent);
}
.UltraRarePopup .separator::after {
    border-color: rgba(163, 50, 50, 0.8);
    background-color: rgba(163, 50, 50, 0.2);
}

/* Propriedades e Status */
.newItemPopup .content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.newItemPopup .property {
    color: var(--poe-text-muted);
}

.newItemPopup .property a {
    color: inherit;
    text-decoration: none;
}

.newItemPopup .colourDefault {
    color: #ffffff;
    font-weight: 600;
}

/* Requisitos */
.newItemPopup .requirements {
    color: var(--poe-text-muted);
    font-size: 12px;
}

/* Mods implícitos e explícitos */
.newItemPopup .implicitMod,
.newItemPopup .explicitMod {
    color: var(--color-magic);
}

.newItemPopup .mod-value {
    color: #ffffff;
    font-weight: 600;
}

/* Imagem Ampliada na Caixa do Inspetor */
.inspector-item-img {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.8));
}

.inspector-item-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ==========================================================================
   Visualização de Modificadores (Modifiers Section)
   ========================================================================== */
.modifiers-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    height: 100%;
    padding: 32px;
}

.mod-column {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid transparent;
}

.section-title.prefix {
    color: var(--poe-blue);
    border-bottom-color: rgba(63, 109, 191, 0.3);
}

.section-title.suffix {
    color: var(--poe-gold);
    border-bottom-color: rgba(228, 194, 117, 0.3);
}

.section-title.corruption {
    color: var(--poe-red);
    border-bottom-color: rgba(163, 50, 50, 0.3);
}

.mods-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
}

/* Card de Modificador */
.mod-item {
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.mod-item:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background-color: var(--bg-card-hover);
}

/* Cabeçalho do Card de Mod */
.mod-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
}

.mod-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.mod-text {
    font-weight: 600;
    color: var(--poe-white);
    line-height: 1.4;
}

.mod-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mod-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--poe-text-muted);
}

.mod-badge.badge-tag {
    background-color: rgba(63, 109, 191, 0.15);
    color: #7b9fe0;
}

.mod-badge.badge-weight {
    background-color: rgba(163, 50, 50, 0.15);
    color: #e26e6e;
}

.mod-toggle-icon {
    font-size: 12px;
    color: var(--poe-text-muted);
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.mod-item.open .mod-toggle-icon {
    transform: rotate(180deg);
    color: var(--poe-gold);
}

/* Tabela de Tiers Detalhada (Collapse) */
.mod-tiers-collapse {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    background-color: rgba(0, 0, 0, 0.2);
    padding: 12px;
}

.mod-item.open .mod-tiers-collapse {
    display: block;
}

.tiers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    text-align: left;
}

.tiers-table th {
    color: var(--poe-text-muted);
    font-weight: 600;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tiers-table td {
    padding: 6px 8px;
    color: var(--poe-text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    vertical-align: middle;
}

.tiers-table tr:last-child td {
    border-bottom: none;
}

.tiers-table .tier-cell {
    font-weight: 700;
    color: var(--poe-gold);
}

.tiers-table .value-cell {
    color: var(--color-magic);
}

.tiers-table .weight-cell {
    color: #e26e6e;
    font-weight: 500;
}

/* ==========================================================================
   Estados de Transição e Responsividade Básicos
   ========================================================================== */
.fade-in {
    animation: fadeIn 0.35s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Simulador de Drop - Estilos do Modal e Auras
   ========================================================================== */
.poe-btn-premium {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(5, 5, 5, 0.95));
    border: 1px solid var(--poe-gold-dark);
    color: var(--poe-gold);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    width: 100%;
}

.poe-btn-premium:hover {
    border-color: var(--poe-gold);
    color: #fff;
    box-shadow: 0 0 15px rgba(228, 194, 117, 0.3);
    transform: translateY(-2px);
}

.poe-btn-premium:active {
    transform: translateY(1px);
}

.drop-btn-container {
    padding: 20px 0 10px 0;
    width: 100%;
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Container */
.modal-container {
    background-color: var(--bg-card);
    border: 1px solid rgba(228, 194, 117, 0.15);
    border-radius: 8px;
    width: 90%;
    max-width: 950px;
    max-height: 85vh;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

/* Header */
.modal-header {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h2 {
    font-family: var(--font-display);
    color: var(--poe-gold);
    font-size: 18px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--poe-text-muted);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.close-btn:hover {
    color: var(--poe-red);
}

/* Body */
.modal-body {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    overflow-y: auto;
}

.simulator-config, .simulator-result {
    display: flex;
    flex-direction: column;
}

.simulator-config h3, .simulator-result h3 {
    font-family: var(--font-display);
    color: #fff;
    font-size: 14px;
    letter-spacing: 1px;
    margin-top: 0;
    margin-bottom: 12px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.config-desc {
    font-size: 12px;
    color: var(--poe-text-muted);
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Opções de Raridade */
.rarity-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.rarity-opt {
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    padding-left: 44px;
}

.rarity-opt input[type="radio"] {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    accent-color: var(--poe-gold);
    width: 16px;
    height: 16px;
}

.rarity-opt .opt-label {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.rarity-opt .opt-desc {
    font-size: 11px;
    color: var(--poe-text-muted);
}

/* Modificações baseadas na seleção de raridade */
.rarity-opt.opt-random .opt-label { color: var(--poe-gold); }
.rarity-opt.opt-normal .opt-label { color: #d0d0d0; }
.rarity-opt.opt-magic .opt-label { color: var(--color-magic); }
.rarity-opt.opt-rare .opt-label { color: var(--poe-gold); }
.rarity-opt.opt-ultrarare .opt-label { color: var(--poe-red); }

.rarity-opt:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.rarity-opt.active {
    background-color: rgba(228, 194, 117, 0.03);
    border-color: rgba(228, 194, 117, 0.3);
}

.rarity-opt.active.opt-normal { border-color: rgba(255, 255, 255, 0.3); background-color: rgba(255,255,255,0.02); }
.rarity-opt.active.opt-magic { border-color: rgba(63, 109, 191, 0.4); background-color: rgba(63, 109, 191, 0.02); }
.rarity-opt.active.opt-rare { border-color: rgba(228, 194, 117, 0.4); background-color: rgba(228, 194, 117, 0.02); }
.rarity-opt.active.opt-ultrarare { border-color: rgba(163, 50, 50, 0.4); background-color: rgba(163, 50, 50, 0.02); }

/* Container de Imagem do Item no Simulador */
.item-drop-image-box {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px auto 14px auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px dashed rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    max-width: 100px;
    transition: all 0.3s ease;
}

.item-drop-image {
    max-height: 72px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.08));
    transition: all 0.3s ease;
}

.dropped-item-wrapper:hover .item-drop-image {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.15));
}

/* Área do Item Sorteado */
.dropped-item-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 24px;
    min-height: 380px;
    position: relative;
}

.result-placeholder {
    text-align: center;
    color: var(--poe-text-muted);
    max-width: 250px;
}

.placeholder-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.3;
}

.result-placeholder p {
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
}

/* Popup de Item com Aura */
.dropped-item-wrapper {
    position: relative;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none !important;
    align-self: flex-start;
}

.dropped-item-wrapper .newItemPopup {
    margin-top: 0;
}

/* Auras de Brilho Ponderadas */
.aura-normal {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.aura-magic {
    animation: pulseMagic 2s infinite ease-in-out;
}

.aura-rare {
    animation: pulseRare 2s infinite ease-in-out;
}

.aura-ultrarare {
    animation: pulseUltraRare 1.8s infinite ease-in-out;
}

@keyframes pulseMagic {
    0% { box-shadow: 0 0 15px rgba(63, 109, 191, 0.3); }
    50% { box-shadow: 0 0 35px rgba(63, 109, 191, 0.7); }
    100% { box-shadow: 0 0 15px rgba(63, 109, 191, 0.3); }
}

@keyframes pulseRare {
    0% { box-shadow: 0 0 15px rgba(228, 194, 117, 0.3); }
    50% { box-shadow: 0 0 35px rgba(228, 194, 117, 0.7); }
    100% { box-shadow: 0 0 15px rgba(228, 194, 117, 0.3); }
}

@keyframes pulseUltraRare {
    0% { box-shadow: 0 0 15px rgba(163, 50, 50, 0.3); }
    50% { box-shadow: 0 0 35px rgba(163, 50, 50, 0.75); }
    100% { box-shadow: 0 0 15px rgba(163, 50, 50, 0.3); }
}

.poe-btn-premium:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--poe-text-muted) !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Estilização para o Drop de Ouro */
.gold-drop-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 250px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(228, 194, 117, 0.25);
    border-radius: 6px;
    padding: 24px;
    box-shadow: inset 0 0 20px rgba(228, 194, 117, 0.05);
    animation: goldGlow 2s infinite ease-in-out;
}

.gold-drop-icon {
    font-size: 54px;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px rgba(228, 194, 117, 0.6));
}

.gold-drop-amount {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--color-rare);
    margin-bottom: 8px;
    text-shadow: 0 0 15px rgba(228, 194, 117, 0.4);
}

.gold-drop-label {
    font-size: 13px;
    color: var(--poe-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes goldGlow {
    0% { box-shadow: inset 0 0 20px rgba(228, 194, 117, 0.05), 0 0 10px rgba(228, 194, 117, 0.1); }
    50% { box-shadow: inset 0 0 30px rgba(228, 194, 117, 0.1), 0 0 20px rgba(228, 194, 117, 0.3); }
    100% { box-shadow: inset 0 0 20px rgba(228, 194, 117, 0.05), 0 0 10px rgba(228, 194, 117, 0.1); }
}

/* Estilização para o Drop Nulo */
.nodrop-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 250px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 24px;
}

.nodrop-icon {
    font-size: 54px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.nodrop-text {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--poe-text-muted);
    margin-bottom: 6px;
}

.nodrop-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

/* Nova Disposição Horizontal para o Modal do Baú Global */
.modal-container.modal-global-large {
    max-width: 1200px;
    width: 95%;
}

.global-simulator-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px;
    grid-template-columns: none !important; /* Desativa a grid de duas colunas padrão */
    overflow-y: auto;
    max-height: 75vh;
}

.global-controls-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 20px;
}

.rarity-options-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.rarity-options-row .rarity-opt {
    padding: 10px 10px 10px 36px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 4px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    background-color: rgba(255, 255, 255, 0.01) !important;
}

.rarity-options-row .rarity-opt input[type="radio"] {
    left: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.rarity-options-row .opt-content {
    display: flex;
    flex-direction: column;
}

.rarity-options-row .opt-label {
    font-size: 12px;
    font-weight: bold;
    text-align: left;
}

.rarity-options-row .opt-desc {
    font-size: 10px;
    color: var(--poe-text-muted);
    text-align: left;
    line-height: 1.3;
    margin-top: 2px;
}

.global-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.global-results-panel {
    display: flex;
    flex-direction: column;
}

/* Permitir múltiplos itens alinhados horizontalmente com rolagem se necessário */
.global-simulator-body .dropped-item-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    min-height: 400px;
    padding: 20px;
    overflow-y: auto;
}

/* Ouro no Baú Global centralizado no topo se houver também itens */
.global-gold-display {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
    background: rgba(228, 194, 117, 0.05);
    border: 1px solid rgba(228, 194, 117, 0.15);
    border-radius: 4px;
    padding: 10px;
}

/* ==========================================================================
   Mecânica de Drop (Visualização de Documentação Premium)
   ========================================================================== */
.items-layout.full-width {
    grid-template-columns: 1fr !important;
}

.items-layout.full-width .inspector-panel {
    display: none !important;
}

.drop-mechanics-doc {
    grid-column: 1 / -1;
    max-width: 100%;
    margin: 0 auto;
    color: var(--poe-text);
    font-family: var(--font-body);
    line-height: 1.6;
    padding-bottom: 50px;
}

.doc-header {
    border-bottom: 2px solid rgba(228, 194, 117, 0.2);
    padding-bottom: 16px;
    margin-bottom: 32px;
}

.doc-header h1 {
    font-family: var(--font-display);
    color: var(--color-rare);
    font-size: 32px;
    margin: 0 0 8px 0;
    text-shadow: 0 0 10px rgba(228, 194, 117, 0.2);
}

.doc-header p {
    color: var(--poe-text-muted);
    font-size: 14px;
    margin: 0;
}

.doc-section {
    background: rgba(20, 15, 10, 0.4);
    border: 1px solid rgba(228, 194, 117, 0.1);
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.doc-section h2 {
    font-family: var(--font-display);
    color: var(--color-magic);
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(63, 109, 191, 0.2);
    padding-bottom: 8px;
}

.doc-section h3 {
    font-family: var(--font-display);
    color: #e4c275;
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.doc-section p, .doc-section li {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.85);
}

.doc-section ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.doc-section li {
    margin-bottom: 8px;
}

/* Tabelas Premium */
.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 13px;
    background: rgba(0, 0, 0, 0.2);
}

.doc-table th, .doc-table td {
    padding: 10px 12px;
    text-align: left;
    border: 1px solid rgba(228, 194, 117, 0.1);
}

.doc-table th {
    background: rgba(228, 194, 117, 0.1);
    color: var(--color-rare);
    font-family: var(--font-display);
    font-weight: bold;
}

.doc-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Fórmulas e Código */
.doc-formula {
    background: rgba(0, 0, 0, 0.4);
    border-left: 3px solid var(--color-rare);
    padding: 12px 16px;
    margin: 16px 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #a3d9ff;
    border-radius: 0 4px 4px 0;
    overflow-x: auto;
}

.doc-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.doc-card {
    background: rgba(228, 194, 117, 0.03);
    border: 1px solid rgba(228, 194, 117, 0.15);
    border-radius: 4px;
    padding: 16px;
    text-align: center;
}

.doc-card .card-title {
    font-family: var(--font-display);
    font-weight: bold;
    margin-bottom: 8px;
}
