:root {
    --bg-color: #0a0e1a;
    --text-color: #f8fafc;
    --primary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --card-bg: rgba(20, 30, 50, 0.85);
    --ml-color: #ffe600;
    --pc-color: #3b82f6;
    --olx-color: #6e0ad6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html,
body {
    min-height: 100vh;
    overflow-x: auto;
}

body {
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f35 50%, #0f172a 100%);
    color: var(--text-color);
    padding: 30px 20px;
    overflow-x: hidden;
}

/* Background Animation */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
}

.globe-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color), #4c1d95);
    top: -100px;
    left: -100px;
    animation: float 15s infinite alternate ease-in-out;
}

.globe-2 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, var(--accent-color), #0891b2);
    bottom: -80px;
    right: -80px;
    animation: float 18s infinite alternate-reverse ease-in-out;
}

.globe-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #ec4899, #be185d);
    top: 40%;
    left: 60%;
    animation: pulse 12s infinite ease-in-out;
}

@keyframes float {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(40px, 60px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(1);
    }

    50% {
        opacity: 0.35;
        transform: scale(1.1);
    }
}

/* Container */
.container {
    max-width: 1600px;
    margin: 0 auto;
    min-width: 320px;
}

header {
    text-align: center;
    margin-bottom: 15px;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header h1 i {
    -webkit-text-fill-color: var(--accent-color);
    margin-right: 8px;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: #64748b;
    font-size: 1rem;
}

/* Search Box */
.search-section {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 0 10px;
}

.search-box {
    width: 100%;
    max-width: 600px;
    display: flex;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.25);
    border-color: var(--primary-color);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.1rem;
}

.search-box {
    position: relative;
}

input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px 14px 14px 45px;
    color: white;
    font-size: 1rem;
}

input::placeholder {
    color: #475569;
}

button {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    padding: 0 25px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

button:hover {
    opacity: 0.9;
    transform: scale(1.03);
}

/* Loader */
.loader {
    text-align: center;
    margin: 50px 0;
}

.loader p {
    color: #64748b;
    font-style: italic;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-color);
    border-right: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* Game Image Header */
.game-image-header {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    max-height: 250px;
    display: flex;
    align-items: center;
}

.game-header-img {
    max-width: 250px;
    max-height: 250px;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(139, 92, 246, 0.3);
    border: 2px solid rgba(139, 92, 246, 0.4);
    object-fit: contain;
    transition: all 0.4s ease;
    animation: fadeInScale 0.6s ease-out;
}

.game-header-img:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 35px rgba(139, 92, 246, 0.5);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Results Grid - Responsive with better space usage */
.results-section {
    overflow-x: auto;
    padding-bottom: 20px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(260px, 1fr));
    gap: 20px;
    padding: 5px;
    width: 100%;
}

@media (max-width: 1150px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Source Column */
.source-column {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-height: none;
    overflow-y: visible;
}

.source-column::-webkit-scrollbar {
    width: 8px;
}

.source-column::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.source-column::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: background 0.3s ease;
}

.source-column::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-color), var(--primary-color));
}

.source-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid rgba(139, 92, 246, 0.2);
    flex-shrink: 0;
    position: relative;
}

.source-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.source-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    flex: 1;
    min-width: 120px;
    word-break: break-word;
}

.source-header h3 i {
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.source-badge {
    font-size: 0.7rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(6, 182, 212, 0.25));
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    border: 1px solid rgba(139, 92, 246, 0.4);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
    letter-spacing: 0.5px;
    margin-left: auto;
}

/* Game Card - Premium Vertical Design */
.game-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 0;
    margin-bottom: 16px;
    min-height: 220px !important;
    display: flex !important;
    flex-direction: column !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(139, 92, 246, 0.15);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    animation: cardFadeIn 0.5s ease-out backwards;
}

/* Staggered animation for cards */
.game-card:nth-child(1) {
    animation-delay: 0.05s;
}

.game-card:nth-child(2) {
    animation-delay: 0.1s;
}

.game-card:nth-child(3) {
    animation-delay: 0.15s;
}

.game-card:nth-child(4) {
    animation-delay: 0.2s;
}

.game-card:nth-child(5) {
    animation-delay: 0.25s;
}

.game-card:nth-child(6) {
    animation-delay: 0.3s;
}

.game-card:nth-child(7) {
    animation-delay: 0.35s;
}

.game-card:nth-child(8) {
    animation-delay: 0.4s;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 18px;
    z-index: 0;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.game-card:hover::before {
    opacity: 1;
}

.game-thumb {
    width: 100%;
    height: 120px !important;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.game-card:hover .game-thumb {
    transform: scale(1.08);
}

.game-info {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.2);
}

.game-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: #f1f5f9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6em;
    margin-bottom: 4px;
}

.game-price {
    color: #4ade80;
    font-weight: 700;
    font-size: 1.3rem;
    text-shadow: 0 2px 8px rgba(74, 222, 128, 0.3);
    letter-spacing: -0.5px;
}

/* Dual currency */
.game-price-dual {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-usd {
    color: #60a5fa;
    font-weight: 600;
    font-size: 0.95rem;
    text-shadow: 0 2px 8px rgba(96, 165, 250, 0.3);
}

.price-brl {
    color: #4ade80;
    font-weight: 700;
    font-size: 1.3rem;
    text-shadow: 0 2px 8px rgba(74, 222, 128, 0.3);
    letter-spacing: -0.5px;
}

.no-results {
    color: #64748b;
    font-style: italic;
    text-align: center;
    padding: 25px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Compact List Item (replacing game-card) */
.game-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    gap: 12px;
}

.game-list-item:last-child {
    border-bottom: none;
}

.game-list-item:hover {
    background: rgba(139, 92, 246, 0.15);
    transform: translateX(4px);
}

.game-list-item .game-title {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
    color: #e2e8f0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.game-price-compact {
    color: #4ade80;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.price-usd-compact {
    color: #60a5fa;
    font-size: 0.75rem;
    font-weight: 600;
}

.price-brl-compact {
    color: #4ade80;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Rodapé de média de valor por fonte */
.source-average-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding: 12px 18px;
    border-top: 1px solid rgba(139, 92, 246, 0.3);
    background: rgba(0, 0, 0, 0.25);
    margin-left: -18px;
    margin-right: -18px;
    margin-bottom: -18px;
    border-radius: 0 0 20px 20px;
}

.average-label {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.average-value {
    font-size: 1rem;
    font-weight: 700;
    color: #4ade80;
    font-family: 'Outfit', sans-serif;
}

.error {
    color: #f87171;
    text-align: center;
    padding: 30px;
}

/* Tablet */
@media (max-width: 900px) {
    header {
        min-height: 160px;
        padding: 15px;
    }

    .game-image-header {
        right: 15px;
        max-height: 200px;
    }

    .game-header-img {
        max-width: 200px;
        max-height: 200px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    body {
        padding: 12px 10px;
    }

    header {
        flex-direction: column;
        min-height: auto;
        padding: 14px 10px;
        gap: 8px;
        margin-bottom: 8px;
    }

    /* Esconde a imagem de capa no header em telas pequenas */
    .game-image-header {
        display: none !important;
    }

    header h1 {
        font-size: 1.3rem;
    }

    header p {
        font-size: 0.85rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .source-column {
        max-height: none;
        padding: 12px;
        border-radius: 14px;
    }

    .source-header {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .source-header h3 {
        font-size: 0.95rem;
    }

    .game-card {
        margin-bottom: 10px;
        min-height: unset !important;
    }

    .game-thumb {
        height: 120px !important;
    }

    .game-info {
        padding: 10px;
        gap: 6px;
    }

    .game-title {
        font-size: 0.85rem;
        min-height: unset;
    }

    .game-price {
        font-size: 1.1rem;
    }

    button {
        padding: 0 18px;
        font-size: 0.85rem;
    }

    /* Lista de resultados: preço abaixo do nome no mobile */
    .game-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        padding: 8px 10px;
    }

    .game-list-item .game-title {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        font-size: 0.85rem;
        line-height: 1.3;
        width: 100%;
    }

    .game-list-item .game-price-compact {
        font-size: 0.9rem;
        align-self: flex-start;
    }

    /* Preços do PriceCharting (USD + BRL) em coluna no mobile */
    .game-list-item .price-usd-compact,
    .game-list-item .price-brl-compact {
        display: block;
    }
}

/* ========== TABS ========== */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #fff;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    border-color: transparent;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========== CALCULATOR ========== */
.calculator-container {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 30px;
}

.calculator-container h2 {
    text-align: center;
    color: var(--accent-color);
    margin-bottom: 5px;
    font-size: 1.6rem;
}

.calc-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 30px;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

@media (max-width: 900px) {
    .calc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }
}

.calc-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.calc-section h3 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calc-field {
    margin-bottom: 15px;
}

.calc-field label {
    display: block;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.calc-field input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 15px;
    color: #fff;
    font-size: 1rem;
}

.calc-field input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.calc-field small {
    display: block;
    color: #475569;
    font-size: 0.75rem;
    margin-top: 4px;
}

.readonly-field {
    background: rgba(74, 222, 128, 0.15) !important;
    border-color: rgba(74, 222, 128, 0.3) !important;
    color: #4ade80 !important;
    font-weight: 700;
    cursor: not-allowed;
}

.total-field label {
    color: #4ade80;
    font-weight: 600;
}

.calc-formula {
    color: #64748b;
    font-size: 0.8rem;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-style: italic;
}

/* Section full width */
.calc-section-full {
    grid-column: 1 / -1;
}

/* Section header with add button */
.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.section-header-row h3 {
    margin-bottom: 0;
}

/* Add/Remove buttons */
.btn-add,
.btn-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-add {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #fff;
}

.btn-add:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.4);
}

.btn-remove {
    background: linear-gradient(135deg, #f87171, #ef4444);
    color: #fff;
    flex-shrink: 0;
}

.btn-remove:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(248, 113, 113, 0.4);
}

.btn-small {
    width: 26px;
    height: 26px;
    font-size: 0.75rem;
}

/* Despesa row */
.despesa-row {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    align-items: center;
}

.despesa-row .despesa-desc {
    flex: 1;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 10px;
    color: #fff;
    font-size: 0.85rem;
}

.despesa-row .despesa-valor {
    width: 70px;
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 8px;
    color: #fff;
    font-size: 0.85rem;
    min-width: 100px;
}

.despesa-row .despesa-desc:focus,
.despesa-row .despesa-valor:focus {
    outline: none;
    border-color: var(--primary-color);
}

#despesasContainer {
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 10px;
    padding-right: 5px;
}

/* Subsection within section */
.calc-subsection {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.calc-subsection h4 {
    color: #60a5fa;
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.calc-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 25px;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 30px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calc-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4);
}

.calc-result {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 16px;
    padding: 25px;
}

.calc-result h3 {
    text-align: center;
    color: #4ade80;
    margin-bottom: 20px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.result-item {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.result-label {
    display: block;
    color: #94a3b8;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.result-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.result-value.big {
    font-size: 1.8rem;
    color: var(--accent-color);
}

.result-value.green {
    color: #4ade80;
}

.result-value.blue {
    color: #60a5fa;
}

.result-value.orange {
    color: #fb923c;
}

.result-item.marketplace {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(249, 115, 22, 0.1));
    border: 1px solid rgba(251, 146, 60, 0.3);
}

/* Sell Form Actions */
.sell-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.sell-actions .btn-clear {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sell-actions .btn-submit {
    flex: 2;
}

@media (max-width: 600px) {
    .sell-actions {
        flex-direction: column;
    }
}

/* ========== VERIFY GAMES TAB ========== */
.verify-container {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 20px;
}

.verify-container h2 {
    text-align: center;
    color: var(--accent-color);
    margin-bottom: 5px;
    font-size: 1.6rem;
}

.verify-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.upload-section {
    margin-bottom: 10px;
}

.upload-box {
    background: rgba(0, 0, 0, 0.2);
    border: 2px dashed rgba(139, 92, 246, 0.4);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-box:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.upload-box.drag-over {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--accent-color);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    display: block;
}

.upload-text {
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.upload-hint {
    color: #64748b;
    font-size: 0.75rem;
    margin-bottom: 8px;
}

.upload-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* Image Preview */
.image-preview {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.preview-header h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin: 0;
}

.btn-remove-image {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f87171, #ef4444);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.btn-remove-image:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(248, 113, 113, 0.5);
}

#previewImg {
    width: 100%;
    max-width: 300px;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(139, 92, 246, 0.3);
}

.verify-btn {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border: none;
    color: white;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.verify-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.4);
}

.verify-btn i {
    font-size: 1.1rem;
}

/* Verification Result */
.verify-result {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    margin-top: 10px;
}

.verify-result h3 {
    color: var(--accent-color);
    font-size: 1rem;
    margin-bottom: 8px;
    text-align: center;
}

#verifyContent {
    color: #e2e8f0;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .verify-container {
        padding: 20px;
    }

    .upload-box {
        padding: 35px 20px;
    }

    .upload-icon {
        font-size: 2.5rem;
    }

    #previewImg {
        max-height: 300px;
    }

    .verify-btn {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
}

/* Games List - MAXIMIZADO */
.games-list {
    max-height: 1200px;
    overflow-y: auto;
    padding: 3px;
    margin-top: 3px;
}

.games-list::-webkit-scrollbar {
    width: 8px;
}

.games-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.games-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b5cf6, #06b6d4);
    border-radius: 4px;
}

.games-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #06b6d4, #8b5cf6);
}

/* ========== GAMES VERIFICATION GRID ========== */
.games-grid-wrapper {
    max-width: 100%;
    max-height: 800px;
    margin: 0 auto;
    overflow-x: hidden;
    /* Remove scroll horizontal se possível */
    overflow-y: auto;
    border-radius: 12px;
    padding: 10px;
    margin-top: 5px;
    padding-top: 100px;
    /* Reduzido de 250px para 100px, suficiente para tooltips menores */
}

.games-grid-wrapper::-webkit-scrollbar {
    width: 8px;
}

.games-grid-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.games-grid-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b5cf6, #06b6d4);
    border-radius: 4px;
}

.games-grid-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #06b6d4, #8b5cf6);
}

.games-grid {
    width: 100%;
    margin-top: 15px;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 12px;
    overflow: visible;
    /* Necessário para tooltips */
}

.games-grid-header {
    display: grid;
    grid-template-columns: 50px 1.5fr 140px 100px 100px 100px 100px;
    gap: 8px;
    padding: 12px 15px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(6, 182, 212, 0.4));
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(139, 92, 246, 0.5);
    text-align: left;
    font-weight: 700;
    color: var(--accent-color);
}

.games-grid-row {
    display: grid;
    grid-template-columns: 50px 1.5fr 140px 100px 100px 100px 100px;
    gap: 8px;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    align-items: center;
}

/* Células base */
.grid-cell {
    display: flex;
    align-items: center;
    min-height: 40px;
}

.grid-number {
    justify-content: center;
    font-weight: 700;
    color: var(--text-color);
}

.grid-title {
    font-size: 0.9rem;
    color: #e2e8f0;
    font-weight: 500;
    word-break: break-word;
    padding-right: 10px;
}

.grid-platform {
    justify-content: flex-start;
}

.grid-price {
    justify-content: center;
    text-align: center;
    font-weight: 600;
}

.games-grid-row:hover {
    background: rgba(139, 92, 246, 0.15);
}

.games-grid-row:last-child {
    border-bottom: none;
}

.game-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
}

.game-item:nth-child(1) {
    animation-delay: 0.05s;
}

.game-item:nth-child(2) {
    animation-delay: 0.1s;
}

.game-item:nth-child(3) {
    animation-delay: 0.15s;
}

.game-item:nth-child(4) {
    animation-delay: 0.2s;
}

.game-item:nth-child(5) {
    animation-delay: 0.25s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.game-item:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.game-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
}

.game-name {
    flex: 1;
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 500;
    word-break: break-word;
}

/* As classes foram unificadas acima para evitar conflitos */

/* ========== PRICE TOOLTIP PREMIUM ========== */
.price-with-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.price-value {
    border-bottom: 1px dotted #10b981;
    transition: all 0.2s ease;
}

.price-with-tooltip:hover .price-value {
    color: #4ade80;
}

.custom-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 12px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0;
    min-width: 280px;
    max-width: 350px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(139, 92, 246, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    /* AUMENTADO: para ficar acima de tudo */
    pointer-events: none;
    overflow: visible;
    /* Posicionar via JavaScript quando hover */
}

.price-with-tooltip:hover .custom-tooltip {
    opacity: 1;
    visibility: visible;
    margin-bottom: 16px;
}

/* Alinhamento para evitar corte nas bordas */
.custom-tooltip.align-left {
    left: 0;
    transform: translateX(0);
}

.custom-tooltip.align-right {
    left: auto;
    right: 0;
    transform: translateX(0);
}

/* Seta do tooltip - apontando para BAIXO */
.custom-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(30, 41, 59, 0.98);
}

.custom-tooltip.align-left::after {
    left: 30px;
    transform: translateX(0);
}

.custom-tooltip.align-right::after {
    left: auto;
    right: 30px;
    transform: translateX(0);
}

/* Header do tooltip */
.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.3), rgba(6, 182, 212, 0.3));
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.tooltip-source {
    font-weight: 700;
    font-size: 0.85rem;
    color: #8b5cf6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tooltip-count {
    font-size: 0.7rem;
    color: #94a3b8;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 8px;
    border-radius: 10px;
}

/* Lista de itens com scroll */
.tooltip-items {
    padding: 8px 0;
    max-height: 200px;
    /* AUMENTADO: de 150px para 200px */
    overflow-y: auto;
}

.tooltip-items::-webkit-scrollbar {
    width: 4px;
}

.tooltip-items::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 2px;
}

.tooltip-item {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    gap: 8px;
    padding: 6px 14px;
    transition: background 0.2s ease;
}

.tooltip-item:hover {
    background: rgba(139, 92, 246, 0.1);
}

.tooltip-item-num {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 600;
}

.tooltip-item-title {
    font-size: 0.75rem;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tooltip-item-price {
    font-size: 0.75rem;
    font-weight: 600;
    color: #10b981;
    white-space: nowrap;
}

/* Footer com média */
.tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tooltip-footer span:first-child {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.tooltip-avg {
    font-size: 0.9rem;
    font-weight: 700;
    color: #4ade80;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

/* ==========================================================================
   SELL FORM & UPLOAD
   ========================================================================== */
.sell-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upload-box {
    border: 2px dashed rgba(96, 165, 250, 0.4);
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    background: rgba(15, 23, 42, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-box:hover, .upload-box.dragover {
    border-color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

.upload-icon {
    font-size: 2.5rem;
    color: #60a5fa;
    margin-bottom: 10px;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 5px;
}

.upload-hint {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 15px;
}

.upload-btn {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
    border: 1px solid #60a5fa;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: none;
}

.sell-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.preview-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.1);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transition: background 0.2s ease;
}

.preview-item .remove-btn:hover {
    background: #f87171;
}

.preview-item .size-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 0.7rem;
    text-align: center;
    padding: 2px 0;
}