/* ============================
   MARKET PAGE STYLES
   ============================ */

.results-hero {
    padding: 85px 20px 20px;
    background: linear-gradient(135deg, rgba(17, 17, 35, 0.8), rgba(30, 30, 50, 0.7));
    position: relative;
    overflow: hidden;
}

.results-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.1), transparent 70%);
    pointer-events: none;
}

.page-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-title i {
    font-size: 1.2em;
}

.page-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

/* Summary Stats */
/* Summary Stats */
.summary-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.stat-box {
    background: rgba(30, 30, 50, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-height: auto;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.stat-box:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.15);
}

.stat-box i {
    font-size: 1.8rem;
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.1);
    padding: 0.8rem;
    border-radius: 10px;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 1.5rem;
    margin: 0;
    background: linear-gradient(135deg, #D4AF37, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    line-height: 1.2;
}

.stat-info p {
    margin: 0.2rem 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

/* Filter Section */
.filter-section {
    padding: 2rem 20px;
    background: rgba(20, 20, 40, 0.5);
    position: sticky;
    top: 70px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.filter-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: rgba(30, 30, 50, 0.6);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 50px;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: #D4AF37;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #D4AF37, #FFD700);
    color: #111123;
    border-color: #D4AF37;
    font-weight: 600;
}

.filter-divider {
    width: 2px;
    height: 30px;
    background: rgba(212, 175, 55, 0.3);
    margin: 0 0.5rem;
}

.platform-filter {
    border-color: rgba(59, 130, 246, 0.3);
}

.platform-filter:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.platform-filter.active {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #fff;
    border-color: #3b82f6;
}


/* Results Grid */
.results-grid-section {
    padding: 3rem 20px;
    min-height: 400px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.result-card {
    background: rgba(30, 30, 50, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
    display: flex;
    flex-direction: column;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

.result-card.hidden {
    display: none;
}

.result-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    background: rgba(20, 20, 40, 0.2);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.result-content {
    padding: 0.8rem 1rem;
}

.result-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    margin-bottom: 0.8rem;
}

.result-title {
    font-size: 1.1rem;
    margin: 0;
    color: #fff;
    line-height: 1.2;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.meta-tag {
    font-size: 0.65rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.meta-tag:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: absolute;
    right: -0.35rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Old tag styles removed or repurposed if needed */
.result-tag {
    display: none;
}

/* Highlighted Type Tag */
.meta-tag.type {
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Remove dot after type tag */
.meta-tag.type::after {
    display: none;
}

.result-card.live .meta-tag.type {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.result-card.backtest .meta-tag.type {
    background: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.result-card.demo .meta-tag.type {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.result-details-box {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    line-height: 1.5;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.result-details-box strong {
    color: #D4AF37;
    display: block;
    margin-bottom: 0.3rem;
}

.product-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.price-date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #3b82f6;
}

.result-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}


.result-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.stat-item {
    background: rgba(20, 20, 40, 0.5);
    padding: 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    transition: background 0.3s;
}

.stat-item:hover {
    background: rgba(212, 175, 55, 0.1);
}

.stat-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.stat-value.positive {
    color: #10b981;
}

.stat-value.negative {
    color: #ef4444;
}

.result-date {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* No Results State */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.5);
}

.no-results i {
    font-size: 4rem;
    color: rgba(212, 175, 55, 0.3);
    margin-bottom: 1rem;
}

.no-results h3 {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

/* Results CTA */
.results-cta {
    padding: 3rem 20px;
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.8), rgba(20, 20, 40, 0.9));
}

.results-cta .cta-box {
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.results-cta h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 1rem;
    color: #fff;
}

.results-cta p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
}

.results-cta .btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .results-hero {
        padding: 50px 15px 30px;
    }

    .summary-stats {
        gap: 0.8rem;
        margin-top: 1rem;
        justify-content: space-between;
    }

    .stat-box {
        padding: 0.8rem;
        gap: 0.5rem;
        min-width: 45%;
        max-width: 48%;
        flex: 0 0 auto;
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .stat-box i {
        font-size: 1.4rem;
        padding: 0.5rem;
        background: rgba(212, 175, 55, 0.08);
    }

    .stat-info h3 {
        font-size: 1.1rem;
        margin-bottom: 2px;
    }

    .stat-info p {
        font-size: 0.7rem;
        line-height: 1.1;
    }

    .filter-controls {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.8rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .result-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .summary-stats {
        flex-wrap: wrap;
    }

    .stat-box {
        min-width: 45%;
    }

    .summary-stats {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .filter-section {
        top: 60px;
    }
}

/* Result Carousel Styles */
.result-carousel {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #000;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 8px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.dot.active {
    background: #D4AF37;
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.8);
}

#result-search:focus {
    outline: none;
    border-color: #D4AF37;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.result-card.hidden {
    display: none;
}