/* ============================================
   POE AFFIX DATABASE - COMPLETE CSS
   Dark Theme | Desktop Optimized
   Version: Clean & Organized
   ============================================ */

/* ========== VARIABLES ========== */
:root {
    --bg-dark: #0a0e17;
    --bg-darker: #06090f;
    --bg-card: #0f131c;
    --bg-hover: #161e2a;
    --border: #252c3a;
    --border-light: #2a3142;
    --text: #e8edf5;
    --text-dim: #9aa2b5;
    --text-muted: #6a7080;
    --gold: #e6b422;
    --gold-light: #ffdd88;
    --shadow: 0 4px 16px rgba(0,0,0,0.4);
    --transition: all 0.2s ease;
}

/* ========== RESET ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-dark);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: var(--text);
    line-height: 1.5;
}

/* Remove underline de todos os links */
a, a:link, a:visited, a:hover, a:active {
    text-decoration: none;
}

/* ========== LAYOUT PRINCIPAL ========== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    max-width: 1920px;
    margin: 0 auto;
}

/* Colunas de anúncios */
.ads-left, .ads-right {
    width: 180px;
    flex-shrink: 0;
    background: var(--bg-darker);
    padding: 20px 12px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.content-wrapper {
    flex: 1;
    min-width: 0;
}

/* ========== TOP BAR (HOME BUTTON) ========== */
.top-bar {
    background: var(--bg-darker);
    border-bottom: 2px solid var(--gold);
    padding: 12px 24px;
    margin-bottom: 20px;
}

.top-bar-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}


.top-bar-home-btn:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.top-bar-welcome {
     font-size: 25px;
     text-align: center;
    font-weight: 600;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
   
}

/* ========== LAYOUT COM SIDEBAR ========== */
.page-layout-with-sidebar {
    display: flex;
    gap: 28px;
    padding: 24px 32px;
}

.items-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    overflow-y: auto;
}

.item-content-area {
    flex: 1;
    min-width: 0;
}

/* ========== SIDEBAR ========== */
.sidebar-header {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.sidebar-header h3 {
    color: var(--gold);
    font-size: 1.1rem;
}

.sidebar-header p {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-category {
    padding: 12px 20px 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-dim);
    font-size: 0.85rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover {
    background: var(--bg-hover);
    color: var(--gold);
    border-left-color: var(--gold);
}

.sidebar-nav li a.active {
    background: rgba(230, 180, 34, 0.1);
    color: var(--gold);
    border-left-color: var(--gold);
}

/* ========== ADS ========== */
.ad-slot {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
    overflow: hidden;
}

.ad-slot-vertical, .ad-slot-square {
    min-height: 280px;
}

.ad-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-align: center;
    padding: 8px;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border);
}

.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
    min-height: 240px;
    background: var(--bg-dark);
}

.ad-placeholder span {
    font-size: 40px;
    opacity: 0.5;
}

/* ========== PAGE HEADER ========== */
.page-header-modern {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-dark));
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 28px;
    border: 1px solid var(--border);
}

.page-header-modern h1 {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
}

.page-header-modern p {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ========== TABELAS ========== */
.item-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 20px 24px;
    margin-bottom: 28px;
    border: 1px solid var(--border);
}

.item-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-left: 4px solid var(--gold);
    padding-left: 16px;
}

.table-wrapper {
    overflow-x: auto;
}

.affix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    background: var(--bg-dark);
    
}

.affix-table th {
    background: var(--bg-hover);
    color: var(--gold);
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    margin: auto;
}
f

.affix-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-dim);
}

.affix-table tr:hover td {
    background: rgba(230, 180, 34, 0.05);
}

.affix-table .category-row td {
    background: var(--bg-darker);
    color: var(--gold);
    font-weight: 700;
    border-top: 1px solid var(--border);
}

.value-range {
    font-family: 'JetBrains Mono', monospace;
    color: var(--gold-light);
    font-weight: 500;
}

.source-info {
    margin-top: 24px;
    padding: 12px 16px;
    background: var(--bg-darker);
    border-radius: 12px;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* ========== HOME PAGE ========== */
.home-simple {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px;
}

.hero-simple {
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-dark));
    border-radius: 28px;
    margin-bottom: 48px;
    border: 1px solid var(--border);
}

.hero-simple h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-simple p {
    color: var(--text-dim);
    font-size: 1.2rem;
    margin-top: 8px;
}

/* Botões de navegação da home */
.nav-buttons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.nav-btn-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px 20px;
    transition: var(--transition);
    color: inherit;
}

.nav-btn-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    background: var(--bg-hover);
    box-shadow: 0 8px 24px rgba(230, 180, 34, 0.15);
}

.btn-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.btn-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 6px;
}

.btn-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Tutorial */
.tutorial-section, .video-section, .info-section {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 36px;
    margin-bottom: 48px;
    border: 1px solid var(--border);
}

.tutorial-section h2, .video-section h2, .info-section h2 {
    color: var(--gold);
    font-size: 1.8rem;
    margin-bottom: 32px;
    text-align: center;
}

.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tutorial-step {
    display: flex;
    gap: 24px;
    background: var(--bg-dark);
    border-radius: 20px;
    padding: 20px 24px;
    transition: var(--transition);
}

.tutorial-step:hover {
    background: var(--bg-hover);
    transform: translateX(5px);
}

.step-num {
    width: 56px;
    height: 56px;
    background: var(--gold);
    color: var(--bg-dark);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    flex-shrink: 0;
}

.step-content h3 {
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Video */
.video-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
}

.video-container iframe {
    width: 100%;
    height: 506px;
    border: none;
}

.video-caption {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 16px;
    text-align: center;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.info-card {
    background: var(--bg-dark);
    border-radius: 20px;
    padding: 24px 20px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid black;
}

.info-card:hover {
    transform: translateY(-4px);
    border: 1px solid var(--gold);
}

.info-card h3 {
    color: var(--gold);
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.info-card p {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border: 2px solid var(--gold);
    border-radius: 28px;
    padding: 36px 32px;
    max-width: 420px;
    width: 90%;
    position: relative;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.close-modal:hover {
    color: var(--gold);
}

.password-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 24px;
}

.password-input:focus {
    outline: none;
    border-color: var(--gold);
}

.btn-submit {
    background: var(--gold);
    color: var(--bg-dark);
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}

.btn-submit:hover {
    background: var(--gold-light);
}

.error-msg {
    color: #d64b4b;
    font-size: 0.8rem;
    margin-top: 16px;
}

/* Botão Roll */
.btn-roll {
    background: var(--gold);
    color: var(--bg-dark);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-roll:hover {
    background: var(--gold-light);
    transform: scale(1.02);
}

.btn-clear {
    background: var(--bg-hover);
    color: var(--text-dim);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
}

.btn-clear:hover {
    background: var(--border);
    color: var(--text);
}

/* ========== FOOTER ========== */
.site-footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
    margin-top: 48px;
    padding: 48px 32px 24px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.footer-section h4 {
    color: var(--gold);
    margin-bottom: 16px;
    font-size: 1rem;
}

.footer-section p, .footer-section ul {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--text-dim);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--gold);
}

.copyright {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.7rem;
    text-align: center;
    color: var(--text-muted);
}

/* ========== SCROLL TOP ========== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--gold);
    border: none;
    border-radius: 50%;
    color: var(--bg-dark);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--gold-light);
    transform: scale(1.1);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* ========== ANIMAÇÕES ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-btn-card, .tutorial-step, .info-card {
    animation: fadeInUp 0.4s ease forwards;
}

.nav-btn-card:nth-child(1) { animation-delay: 0.1s; }
.nav-btn-card:nth-child(2) { animation-delay: 0.2s; }
.nav-btn-card:nth-child(3) { animation-delay: 0.3s; }
.nav-btn-card:nth-child(4) { animation-delay: 0.4s; }

/* ========== MEDIA QUERIES ========== */
@media (min-width: 1200px) and (max-width: 1440px) {
    .ads-left, .ads-right {
        width: 160px;
    }
    
    .affix-table th, .affix-table td {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
}

@media (min-width: 1920px) {
    .ads-left, .ads-right {
        width: 220px;
    }
    
    .affix-table {
        font-size: 0.9rem;
    }
}


/* ========== PRINT ========== */
@media print {
    .ads-left, .ads-right, .scroll-top, .items-sidebar, .sidebar-ad {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ============================================
   MARKET PAGE - POE MARKET STYLES
   ============================================ */

.market-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px;
}

.market-header {
    text-align: center;
    padding: 40px 30px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-dark));
    border-radius: 28px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.market-header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
}

.market-header p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.last-update {
    margin-top: 15px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Search Box */
.search-box {
    margin-bottom: 30px;
}

.search-input-market {
    width: 100%;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
}

.search-input-market:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(230, 180, 34, 0.1);
}

/* Tables */
.market-table-container {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.market-table-container h2 {
    color: var(--gold);
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.table-wrapper {
    overflow-x: auto;
}

.market-table {
    width: 100%;
    border-collapse: collapse;
}

.market-table th {
    text-align: left;
    padding: 14px 12px;
    background: var(--bg-hover);
    color: var(--gold);
    font-weight: 600;
    font-size: 0.85rem;
}

.market-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-dim);
    font-size: 0.85rem;
}

.market-table tr:hover td {
    background: var(--bg-hover);
}

.item-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-icon {
    font-size: 1.2rem;
}

.chaos-value {
    font-weight: 600;
    color: #ffd966;
}

.divine-value {
    font-weight: 600;
    color: var(--gold);
}

.positive {
    color: #4bae6f;
}

.negative {
    color: #d64b4b;
}

.stable {
    color: var(--text-muted);
}

.trend-cell {
    font-size: 1.1rem;
}

/* Calculator */
.calculator-section {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.calculator-section h2 {
    color: var(--gold);
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
}

.calculator-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 450px;
    margin: 0 auto;
}

.calc-row {
    display: flex;
    gap: 15px;
    align-items: center;
}

.calc-row label {
    width: 50px;
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9rem;
}

.calc-row select {
    flex: 1;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
}

.calc-row select:focus {
    outline: none;
    border-color: var(--gold);
}

.calc-row input {
    flex: 1;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.85rem;
}

.calc-row input:focus {
    outline: none;
    border-color: var(--gold);
}

.calc-row input[readonly] {
    background: var(--bg-darker);
    cursor: not-allowed;
}

.calc-arrow {
    text-align: center;
    font-size: 1.5rem;
    color: var(--gold);
}

.btn-calc {
    background: var(--gold);
    color: var(--bg-dark);
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-calc:hover {
    background: var(--gold-light);
    transform: scale(1.02);
}

/* Loading state */
.loading-row td {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* No results */
.no-results td {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

