/* Base Styles */
:root {
    /* Flipprx Logo Colors */
    --flipprx-orange: #e25822;
    --flipprx-yellow: #f49d1a;
    --flipprx-green: #5cb270;
    --flipprx-teal: #2a9d8f;
    --flipprx-red: #d62246;
    --flipprx-bg: #f5e9c9;
    --flipprx-black: #1a1a1a;
    
    /* Core colors - updated to match logo */
    --primary-color: var(--flipprx-teal);
    --secondary-color: var(--flipprx-orange);
    --accent-color: var(--flipprx-yellow);
    --background-color: var(--flipprx-bg);
    --card-bg: #ffffff;
    --card-hover: #f9f4e6;
    --border-color: var(--flipprx-black);
    
    /* Rarity colors */
    --common-color: var(--flipprx-green);
    --uncommon-color: var(--flipprx-teal);
    --rare-color: var(--flipprx-yellow);
    --super-rare-color: var(--flipprx-orange);
    --oneofone-color: var(--flipprx-red);
    
    /* Text colors */
    --text-color: var(--flipprx-black);
    --text-muted: #666666;
    
    /* UI effects */
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --gradient-bg: var(--flipprx-bg);
    --header-bg: var(--flipprx-bg);
    --glass-effect: rgba(255, 255, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-bg);
    color: var(--text-color);
    line-height: 1.6;
    background-attachment: fixed;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239333ea' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%233498db' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header Styles - Retro Look */
header {
    background: var(--flipprx-bg);
    padding: 0.6rem 0;
    border-bottom: 3px solid var(--flipprx-black);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    height: 35px;
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--flipprx-black);
    text-shadow: 1px 1px 0 #fff;
    letter-spacing: -0.5px;
}

.filters {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex-wrap: wrap;
    background: white;
    padding: 0.5rem;
    border-radius: 12px;
    border: 3px solid var(--flipprx-black);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

.filter-btn {
    background: var(--flipprx-bg);
    color: var(--flipprx-black);
    border: 2px solid var(--flipprx-black);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    box-shadow: 2px 2px 0 var(--flipprx-black);
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 3px 3px 0 var(--flipprx-black);
}

.filter-btn.active {
    background: var(--flipprx-teal);
    color: white;
    box-shadow: none;
    transform: translate(2px, 2px);
}

.filter-btn:nth-child(1).active { background: var(--flipprx-black); }
.filter-btn:nth-child(2).active { background: var(--flipprx-red); }
.filter-btn:nth-child(3).active { background: var(--flipprx-green); }
.filter-btn:nth-child(4).active { background: var(--flipprx-teal); }
.filter-btn:nth-child(5).active { background: var(--flipprx-yellow); }
.filter-btn:nth-child(6).active { background: var(--flipprx-orange); }

#search-input {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 2px solid var(--flipprx-black);
    background-color: white;
    color: var(--text-color);
    min-width: 160px;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    box-shadow: 2px 2px 0 var(--flipprx-black);
}

#search-input:focus {
    outline: none;
    border-color: var(--flipprx-teal);
    box-shadow: 3px 3px 0 var(--flipprx-teal);
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.8rem;
    padding: 2rem 0;
}

.nft-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid var(--flipprx-black);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 4px 4px 0 var(--flipprx-black);
}

.nft-card:hover {
    transform: translateY(-8px);
    box-shadow: 6px 6px 0 var(--flipprx-black);
}

.nft-img-container {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    border-bottom: 3px solid var(--flipprx-black);
}

.nft-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.nft-card:hover .nft-img {
    transform: scale(1.05);
}

.nft-info {
    padding: 1.2rem;
    background: white;
}

.nft-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--flipprx-black);
}

.traits-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.trait-tag {
    background: var(--flipprx-bg);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--flipprx-black);
    border: 1px solid var(--flipprx-black);
    font-weight: 500;
}

.rarity-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 5;
    box-shadow: 2px 2px 0 var(--flipprx-black);
    border: 2px solid var(--flipprx-black);
}

.common .rarity-badge {
    background: var(--common-color);
    color: white;
}

.uncommon .rarity-badge {
    background: var(--uncommon-color);
    color: white;
}

.rare .rarity-badge {
    background: var(--rare-color);
    color: var(--flipprx-black);
}

.super-rare .rarity-badge {
    background: var(--super-rare-color);
    color: white;
}

.oneofone .rarity-badge {
    background: var(--oneofone-color);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Stats Panel - Retro Style */
.stats-panel {
    background: white;
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    border: 3px solid var(--flipprx-black);
    box-shadow: 5px 5px 0 var(--flipprx-black);
}

.stats-panel h2 {
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--flipprx-black);
    padding-bottom: 0.5rem;
    font-size: 1.4rem;
    color: var(--flipprx-black);
    font-weight: 800;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--flipprx-bg);
    padding: 0.8rem;
    border-radius: 10px;
    text-align: center;
    border: 2px solid var(--flipprx-black);
    box-shadow: 3px 3px 0 var(--flipprx-black);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card:nth-child(1) { background: white; }
.stat-card:nth-child(2) { background: var(--oneofone-color); color: white; }
.stat-card:nth-child(3) { background: var(--common-color); color: white; }
.stat-card:nth-child(4) { background: var(--uncommon-color); color: white; }
.stat-card:nth-child(5) { background: var(--rare-color); color: var(--flipprx-black); }
.stat-card:nth-child(6) { background: var(--super-rare-color); color: white; }

.stat-card h3 {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stat-card span {
    font-size: 1.6rem;
    font-weight: 800;
}

.traits-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.traits-stats h3 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: var(--flipprx-black);
    font-weight: 700;
    text-align: center;
    padding: 0.5rem;
    border-radius: 8px;
    border: 2px solid var(--flipprx-black);
}

.common-traits h3 {
    background: var(--common-color);
    color: white;
}

.rare-traits h3 {
    background: var(--rare-color);
    color: var(--flipprx-black);
}

.traits-stats ul {
    background: white;
    border-radius: 10px;
    border: 2px solid var(--flipprx-black);
    overflow: hidden;
    list-style: none;
}

.traits-stats li {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
}

.traits-stats li:last-child {
    border-bottom: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background: var(--flipprx-bg);
    margin: 3% auto;
    width: 90%;
    max-width: 1100px;
    border-radius: 24px;
    overflow: hidden;
    animation: modal-pop 0.5s cubic-bezier(0.26, 1.04, 0.54, 1);
    border: 4px solid var(--flipprx-black);
    box-shadow: 8px 8px 0 var(--flipprx-black);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.modal-img-container {
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-right: 4px solid var(--flipprx-black);
}

.modal-img-container img {
    max-width: 100%;
    max-height: 450px;
    border-radius: 16px;
    border: 3px solid var(--flipprx-black);
    transition: transform 0.5s ease;
    box-shadow: 5px 5px 0 var(--flipprx-black);
}

.modal-info {
    padding: 2.5rem 2.5rem 2.5rem 0;
}

.modal-info h2 {
    margin-bottom: 1.2rem;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--flipprx-black);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--flipprx-black);
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--flipprx-black);
    box-shadow: 2px 2px 0 var(--flipprx-black);
}

.close-modal:hover {
    transform: rotate(90deg);
    box-shadow: none;
}

.traits-container {
    margin-top: 2rem;
    background: white;
    border-radius: 16px;
    padding: 1rem;
    border: 3px solid var(--flipprx-black);
    box-shadow: 4px 4px 0 var(--flipprx-black);
}

.trait-item {
    display: flex;
    justify-content: space-between;
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease;
    border-radius: 8px;
}

.trait-item:last-child {
    border-bottom: none;
}

.trait-type {
    color: var(--text-muted);
    font-weight: 500;
}

.trait-value {
    font-weight: 600;
    color: var(--flipprx-black);
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--flipprx-bg);
    border-radius: 50%;
    border-top-color: var(--flipprx-orange);
    border-left-color: var(--flipprx-green);
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    margin: 0 auto 1.5rem;
}

.loading-spinner p {
    font-size: 1.1rem;
    color: var(--flipprx-black);
    letter-spacing: 1px;
    animation: pulse-text 1.5s infinite;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 2px solid var(--flipprx-black);
    box-shadow: 3px 3px 0 var(--flipprx-black);
}

/* Footer */
footer {
    background: var(--flipprx-bg);
    padding: 1.5rem 0;
    text-align: center;
    border-top: 3px solid var(--flipprx-black);
    margin-top: 3rem;
}

footer p {
    color: var(--flipprx-black);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-text {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

@keyframes modal-pop {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Rarity Distribution - More Compact */
.rarity-distribution {
    margin: 1.2rem 0;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 2px solid var(--flipprx-black);
    box-shadow: 3px 3px 0 var(--flipprx-black);
}

.rarity-distribution h3 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: var(--flipprx-black);
    text-align: center;
    padding: 0.4rem;
    border-radius: 8px;
    background: var(--flipprx-teal);
    color: white;
    border: 2px solid var(--flipprx-black);
}

.distribution-bars {
    margin-bottom: 1rem;
}

.distribution-bar {
    height: 25px;
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    border: 2px solid var(--flipprx-black);
    position: relative;
}

.bar-segment {
    height: 100%;
    transition: width 1s ease-out;
    position: relative;
}

.bar-segment::after {
    content: attr(data-percentage);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--flipprx-black);
    font-weight: bold;
    font-size: 0.75rem;
    text-shadow: 0 0 2px white;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.bar-segment:hover::after {
    opacity: 1;
}

.bar-segment.common {
    background-color: var(--common-color);
}

.bar-segment.uncommon {
    background-color: var(--uncommon-color);
}

.bar-segment.rare {
    background-color: var(--rare-color);
}

.bar-segment.super-rare {
    background-color: var(--super-rare-color);
}

.bar-segment.oneofone {
    background: var(--oneofone-color);
}

.distribution-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-top: 0.8rem;
    font-size: 0.8rem;
}

.distribution-legend span {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.distribution-legend span:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    border: 1px solid var(--flipprx-black);
}

.color-dot.common {
    background-color: var(--common-color);
}

.color-dot.uncommon {
    background-color: var(--uncommon-color);
}

.color-dot.rare {
    background-color: var(--rare-color);
}

.color-dot.super-rare {
    background-color: var(--super-rare-color);
}

.color-dot.oneofone {
    background-color: var(--oneofone-color);
}

/* Clean Survivor Badge */
.clean-survivor-badge {
    margin: 0.5rem 0;
    padding: 0.35rem 0.5rem;
    background: var(--flipprx-green);
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    border-radius: 4px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid var(--flipprx-black);
    box-shadow: 2px 2px 0 var(--flipprx-black);
}

.clean-survivor-banner {
    margin-bottom: 2rem;
    padding: 1.2rem;
    background: var(--flipprx-green);
    color: white;
    border-radius: 12px;
    text-align: center;
    border: 3px solid var(--flipprx-black);
    box-shadow: 4px 4px 0 var(--flipprx-black);
}

.clean-survivor-banner h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 0 var(--flipprx-black);
}

/* Special Trait Banners */
.special-trait-banner {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    border: 3px solid var(--flipprx-black);
    box-shadow: 4px 4px 0 var(--flipprx-black);
}

.special-trait-banner.shiny {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    color: var(--flipprx-black);
}

.special-trait-banner.gold {
    background: linear-gradient(135deg, #ffd700, #ffcc00);
    color: var(--flipprx-black);
    text-shadow: 1px 1px 0 white;
}

/* Special Trait Highlighting */
.trump-trait {
    border-left: 3px solid #ff9a9e !important;
    background: linear-gradient(90deg, rgba(255, 154, 158, 0.2), transparent) !important;
}

.gold-trait {
    border-left: 3px solid #ffd700 !important;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), transparent) !important;
}

/* Card rugged meter styles */
.card-rugged-meter {
    margin: 0.5rem 0;
    padding: 0.2rem 0;
}

.rugged-meter-mini {
    height: 8px;
    width: 100%;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--flipprx-black);
}

.card-rugged-meter .rugged-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--flipprx-yellow), var(--flipprx-red));
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.card-rugged-meter .rugged-meter-label {
    position: absolute;
    top: -15px;
    right: 0;
    font-size: 0.7rem;
    font-weight: bold;
    background: white;
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid var(--flipprx-black);
}

/* Rugged meter styles */
.rugged-meter-container {
    margin-bottom: 2rem;
    background: white;
    padding: 1.2rem;
    border-radius: 12px;
    border: 2px solid var(--flipprx-black);
    box-shadow: 3px 3px 0 var(--flipprx-black);
}

.rugged-meter-container h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--flipprx-black);
    display: flex;
    align-items: center;
    background: var(--flipprx-red);
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    border: 2px solid var(--flipprx-black);
}

.rugged-meter-container h3::before {
    content: '🔥';
    margin-right: 8px;
    font-size: 1.2rem;
}

.rugged-meter {
    height: 20px;
    width: 100%;
    background: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
    border: 2px solid var(--flipprx-black);
}

.rugged-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--flipprx-yellow), var(--flipprx-red));
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.rugged-meter-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--flipprx-black);
    font-weight: bold;
    font-size: 0.85rem;
    text-shadow: 0 1px 0 white;
    z-index: 5;
}

.rugged-reason {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    background: #f5f5f5;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--flipprx-black);
}

/* Load More Button Styles */
.load-more-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.load-more-btn {
    background: var(--flipprx-teal);
    color: white;
    border: 3px solid var(--flipprx-black);
    padding: 0.8rem 1.8rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 4px 4px 0 var(--flipprx-black);
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 5px 5px 0 var(--flipprx-black);
}

.load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: translateY(0);
}

/* Loading Counter */
.loading-counter {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--flipprx-black);
    text-align: center;
    letter-spacing: 1px;
    background: white;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    border: 2px solid var(--flipprx-black);
    display: inline-block;
}

/* Media Queries - Enhanced for mobile */
@media (min-width: 768px) {
    .filters {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .filter-buttons {
        justify-content: flex-start;
    }
    
    #search-input {
        max-width: 200px;
    }
}

@media (max-width: 992px) {
    header .container {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .filters {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.3rem;
        padding: 0.4rem;
    }
    
    .filter-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    #search-input {
        width: 100%;
        min-width: 0;
        max-width: 200px;
        margin-top: 0.3rem;
    }
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 0.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.8rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .traits-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 95%;
    }
    
    .modal-grid {
        gap: 1.5rem;
        grid-template-columns: 1fr;
    }
    
    .modal-img-container {
        padding: 1rem;
        border-right: none;
        border-bottom: 4px solid var(--flipprx-black);
    }
    
    .modal-info {
        padding: 1rem;
    }
    
    .modal-info h2 {
        font-size: 1.6rem;
    }
    
    .stat-card span {
        font-size: 1.3rem;
    }
    
    .distribution-legend {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        font-size: 0.75rem;
    }
    
    .load-more-btn {
        padding: 0.7rem 1.4rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .logo img {
        height: 28px;
    }
    
    .nft-card {
        border-radius: 12px;
        box-shadow: 3px 3px 0 var(--flipprx-black);
    }
    
    .nft-info {
        padding: 0.8rem;
    }
    
    .nft-info h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .traits-preview {
        margin-top: 0.4rem;
        gap: 0.3rem;
    }
    
    .trait-tag {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .rarity-badge {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .modal-content {
        border-radius: 16px;
        box-shadow: 5px 5px 0 var(--flipprx-black);
    }
    
    .modal-img-container img {
        max-height: 300px;
        box-shadow: 3px 3px 0 var(--flipprx-black);
    }
    
    .distribution-legend {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .top-badge {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
        top: 0.5rem;
        left: 0.5rem;
    }
    
    .top-badge.top-one {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Error message styling */
.error-message {
    background: white;
    border: 3px solid var(--flipprx-red);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
    box-shadow: 5px 5px 0 var(--flipprx-black);
}

.error-message h3 {
    color: var(--flipprx-red);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.error-message p {
    color: var(--flipprx-black);
    font-size: 1rem;
}

/* Header layout adjustments */
.header-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
}

/* Stats Button */
.stats-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--flipprx-teal);
    color: white;
    border: 3px solid var(--flipprx-black);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0 var(--flipprx-black);
}

.stats-btn:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 var(--flipprx-black);
}

.stats-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--flipprx-black);
}

/* Stats Modal specific styles */
.stats-modal-content {
    max-width: 1000px;
    padding: 2rem;
    overflow-y: auto;
    max-height: 90vh;
}

.stats-modal-content h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--flipprx-black);
    color: var(--flipprx-black);
}

/* Media Queries - Enhanced for mobile */
@media (min-width: 768px) {
    .header-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: auto;
    }
    
    .filters {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .filter-buttons {
        justify-content: flex-start;
    }
    
    #search-input {
        max-width: 200px;
    }
}

@media (max-width: 992px) {
    .header-actions {
        width: 100%;
    }
    
    header .container {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .filters {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.3rem;
        padding: 0.4rem;
    }
    
    .filter-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    #search-input {
        width: 100%;
        min-width: 0;
        max-width: none;
        margin-top: 0.3rem;
    }
}

/* Pixel Creator Badge */
.pixel-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: white;
    border: 3px solid var(--flipprx-black);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 3px 3px 0 var(--flipprx-black);
    transform: rotate(-10deg);
    transition: all 0.3s ease;
}

.pixel-badge:hover {
    transform: rotate(0deg) scale(1.1);
    box-shadow: 4px 4px 0 var(--flipprx-black);
}

.pixel-badge img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* Pixel badge text fallback */
.pixel-badge span {
    font-weight: bold;
    font-size: 12px;
    color: var(--flipprx-black);
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

/* Top 10 Badge Styles */
.top-badge {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    z-index: 10;
    background: var(--flipprx-black);
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    transform: rotate(-10deg);
}

.top-badge.top-one {
    background: gold;
    color: var(--flipprx-black);
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    border: 2px solid var(--flipprx-black);
    box-shadow: 3px 3px 0 var(--flipprx-black);
    animation: pulse-gold 2s infinite;
}

.top-badge.top-three {
    background: linear-gradient(135deg, var(--flipprx-orange), var(--flipprx-yellow));
    color: var(--flipprx-black);
    font-weight: 800;
}

@keyframes pulse-gold {
    0% { transform: rotate(-10deg) scale(1); }
    50% { transform: rotate(-10deg) scale(1.1); }
    100% { transform: rotate(-10deg) scale(1); }
}

/* Adjusting position when pixel badge is present */
.nft-card .nft-img-container .pixel-badge + .top-badge {
    left: auto;
    right: 0.8rem;
}

/* Smoke animation for Burnt background - Enhanced */
@keyframes smoke {
    0% {
        opacity: 0.3;
        transform: translateY(0) scale(1);
    }
    25% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.6;
        transform: translateY(-40px) scale(1.4);
    }
    75% {
        opacity: 0.4;
    }
    100% {
        opacity: 0.1;
        transform: translateY(-80px) scale(1.8);
    }
}

.burnt-background .nft-img-container {
    position: relative;
    overflow: visible !important; /* Allow smoke to be visible outside container */
}

.burnt-background .nft-img-container::before {
    content: '';
    position: absolute;
    bottom: 15px;
    left: calc(50% - 40px);
    width: 100px;
    height: 120px;
    background: radial-gradient(ellipse at center, rgba(80, 80, 80, 0.9) 0%, rgba(80, 80, 80, 0) 70%);
    z-index: 10;
    pointer-events: none;
    border-radius: 50% 50% 0 0;
    animation: smoke 5s infinite ease-out;
    filter: blur(2px);
}

.burnt-background .nft-img-container::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: calc(30% - 30px);
    width: 80px;
    height: 110px;
    background: radial-gradient(ellipse at center, rgba(60, 60, 60, 0.9) 0%, rgba(60, 60, 60, 0) 70%);
    z-index: 10;
    pointer-events: none;
    border-radius: 50% 50% 0 0;
    animation: smoke 4.5s infinite 1s ease-out;
    filter: blur(2px);
}

/* Add additional smoke element for more realistic effect */
.burnt-background .nft-img-container .smoke-effect {
    content: '';
    position: absolute;
    bottom: 5px;
    right: calc(30% - 25px);
    width: 70px;
    height: 100px;
    background: radial-gradient(ellipse at center, rgba(70, 70, 70, 0.9) 0%, rgba(70, 70, 70, 0) 70%);
    z-index: 10;
    pointer-events: none;
    border-radius: 50% 50% 0 0;
    animation: smoke 5.2s infinite 0.5s ease-out;
    filter: blur(2px);
}

/* Create a subtle burn/charred effect at the bottom */
.burnt-background .nft-img-container .charred-effect {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(30, 30, 30, 0.7), rgba(30, 30, 30, 0));
    z-index: 9;
    pointer-events: none;
} 