/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --border: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --green-primary: #10b981;
    --green-secondary: #34d399;
    --green-glow: rgba(16, 185, 129, 0.3);
    --orange-primary: #f59e0b;
    --red-primary: #ef4444;
    --purple-primary: #a855f7;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

/* Global scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Hide scrollbar but keep functionality on mobile */
@media (max-width: 768px) {
    .activity-list::-webkit-scrollbar {
        display: none;
    }
    .activity-list {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* ==================== HEADER ==================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 18px;
    color: var(--green-primary);
    text-decoration: none;
    text-shadow: 0 0 20px var(--green-glow);
}

.nav {
    display: flex;
    gap: 4px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-btn.active {
    color: var(--green-primary);
    background: rgba(16, 185, 129, 0.1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.balances {
    display: flex;
    gap: 16px;
    padding-right: 16px;
    border-right: 1px solid var(--border);
}

.balance-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.balance-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.balance-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.connect-btn {
    background: linear-gradient(135deg, var(--green-primary), #059669);
    border: none;
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.connect-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--green-glow);
}

.connect-btn.connected {
    background: var(--bg-tertiary);
    border: 1px solid var(--green-primary);
}

.notification-btn {
    position: relative;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.notification-btn:hover {
    border-color: var(--green-primary);
    color: var(--text-primary);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--red-primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-badge:empty,
.notif-badge[data-count="0"] {
    display: none;
}

/* ==================== MOBILE NAV ==================== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 8px 4px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 48px));
    z-index: 100;
}

.mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 2px;
    font-size: 9px;
    cursor: pointer;
    border-radius: 8px;
    min-width: 0;
}

.mobile-nav-btn.active {
    color: var(--green-primary);
}

.mobile-nav-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Android nav bar fix */
.android-device .mobile-nav {
    padding-bottom: 56px;
}

/* ==================== MAIN CONTENT ==================== */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    padding-bottom: 100px;
}

.tab-content {
    display: none;
}

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

/* ==================== FEATURED BANNER ==================== */
.featured-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.02));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.featured-text h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--green-primary), var(--green-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.featured-text p {
    color: var(--text-secondary);
    font-size: 14px;
}

.featured-stats {
    display: flex;
    gap: 32px;
}

.feat-stat {
    text-align: center;
}

.feat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.feat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ==================== FILTERS ==================== */
.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--green-primary);
    color: var(--green-primary);
}

.sort-dropdown select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
}

/* ==================== COLLECTIONS GRID ==================== */
.collections-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 380px));
    gap: 20px;
    justify-content: center;
}

.collection-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    max-width: 400px;
}

.collection-card:hover {
    border-color: var(--green-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.collection-banner {
    height: 120px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.collection-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.collection-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-info {
    padding: 20px;
}

.collection-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.collection-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.4;
}

.collection-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.col-stat {
    text-align: center;
}

.col-stat-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.col-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.multiplier-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.1);
    color: var(--green-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 12px;
}

/* ==================== ACTIVITY FEED ==================== */
.activity-feed {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.activity-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-loading {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 20px;
}

.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    align-items: center;
}

.activity-item:hover {
    border-color: var(--green-primary);
    transform: translateX(2px);
}

.activity-icon {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.activity-info {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.activity-type {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.activity-type.sale {
    color: var(--green-primary);
}

.activity-type.listing {
    color: var(--text-secondary);
}

.activity-type.offer {
    color: var(--orange-primary);
}

.activity-type.staked {
    color: var(--purple-primary);
}

.activity-details {
    font-size: 15px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.activity-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--green-primary);
    margin-top: 2px;
}

.activity-price:empty {
    display: none;
}

.activity-time {
    font-size: 13px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 16px;
}

/* ==================== COLLECTION DETAIL VIEW ==================== */
.collection-detail-view {
    width: 100%;
    grid-column: 1 / -1; /* Span full width of parent grid */
}

.collection-detail-header {
    margin-bottom: 32px;
}

.back-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 24px;
}

.back-btn:hover {
    border-color: var(--green-primary);
    color: var(--green-primary);
}

.collection-detail-info {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.collection-detail-avatar {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.collection-detail-text h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.collection-detail-text p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    max-width: 600px;
}

.collection-detail-stats {
    display: flex;
    gap: 16px;
    align-items: center;
}

.collection-detail-stats span {
    color: var(--text-secondary);
    font-size: 14px;
}

.collection-detail-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 8px;
    width: 200px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--green-primary);
}

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

.collection-detail-filters select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
}

.collection-nfts-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 16px;
    width: 100%;
}

/* Staked badge on NFT cards */
.staked-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--purple-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.nft-image {
    position: relative;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .collection-detail-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .collection-detail-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .collection-detail-filters {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
}

/* ==================== NFT GRID ==================== */
.my-nfts-header,
.staking-header {
    margin-bottom: 24px;
}

.my-nfts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.my-nfts-header h2,
.staking-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.staking-sub {
    color: var(--text-secondary);
    margin-top: 8px;
}

.action-btn {
    background: var(--green-primary);
    border: none;
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #059669;
}

.my-nfts-grid,
.staked-nfts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.staked-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.staked-grid .nft-card {
    max-width: 200px;
}

/* Collection sections for 50+ NFTs - Design B Card Stack */
.nft-collection-section {
    grid-column: 1 / -1;
    margin-bottom: 12px;
}

.nft-collection-header {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.nft-collection-header:hover {
    border-color: var(--green-primary);
}

.collection-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.collection-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.collection-header-left > img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.collection-header-text {
    display: flex;
    flex-direction: column;
}

.nft-collection-header .collection-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.nft-collection-header .collection-count-text {
    font-size: 14px;
    color: var(--text-muted);
}

.nft-collection-header .collapse-icon {
    color: var(--text-muted);
    font-size: 24px;
    font-weight: 300;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collection-preview {
    display: flex;
    gap: 6px;
    align-items: center;
}

.preview-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-more {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.nft-collection-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.nft-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.nft-card:hover {
    border-color: var(--green-primary);
    transform: translateY(-2px);
}

.nft-card.staked {
    border-color: var(--purple-primary);
}

.nft-image {
    aspect-ratio: 1;
    background: var(--bg-tertiary);
}

.nft-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nft-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nft-info {
    padding: 12px;
}

.nft-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.nft-price {
    font-size: 13px;
    color: var(--green-primary);
    font-weight: 500;
}

.nft-collection {
    font-size: 11px;
    color: var(--text-muted);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

/* ==================== STAKING STATS ==================== */
.staking-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stake-stat-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stake-stat-box.highlight {
    border-color: var(--green-primary);
    background: rgba(16, 185, 129, 0.05);
}

.stake-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stake-stat-box.highlight .stake-stat-value {
    color: var(--green-primary);
}

.stake-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 4px;
}

.staking-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.stake-action-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.stake-action-btn:hover {
    border-color: var(--text-secondary);
}

.stake-action-btn.primary {
    background: var(--green-primary);
    border-color: var(--green-primary);
}

.stake-action-btn.primary:hover {
    background: #059669;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

/* ==================== LP TAB ==================== */
.lp-container,
.gov-container {
    max-width: 700px;
    margin: 0 auto;
}

.lp-header,
.gov-header {
    text-align: center;
    margin-bottom: 32px;
}

.lp-header h2,
.gov-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.lp-header p,
.gov-header p {
    color: var(--text-secondary);
}

.lp-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.lp-info-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.lp-info-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--green-primary);
}

.lp-info-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 4px;
}

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

.lp-link-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--green-primary), #059669);
    color: white;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.lp-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--green-glow);
}

.lp-multiplier-info {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.lp-multiplier-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.lp-multiplier-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.multiplier-list {
    list-style: none;
}

.multiplier-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.multiplier-list li:last-child {
    border-bottom: none;
}

.mult-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* ==================== GOVERNANCE TAB ==================== */
.gov-power {
    margin-bottom: 32px;
}

.gov-power-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.02));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
}

.gov-power-value {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: var(--green-primary);
}

.gov-power-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.gov-breakdown {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.gov-breakdown h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.power-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.power-row:last-child {
    border-bottom: none;
}

.power-row span:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

.proposals-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.proposals-list {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-height: 90vh;
}

.modal-image {
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    max-height: 90vh;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-info {
    padding: 24px;
    overflow-y: auto;
    max-height: 90vh;
}

.modal-info h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.modal-collection {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.modal-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.trait-tag {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
}

.trait-tag span {
    color: var(--text-muted);
}

.modal-price-section {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.price-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--green-primary);
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.modal-actions > .offer-form {
    width: 100%;
    flex-basis: 100%;
}

.modal-btn {
    flex: 1;
    padding: 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn.primary {
    background: var(--green-primary);
    border: none;
    color: white;
}

.modal-btn.secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.modal-history h4 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

/* ==================== TOAST ==================== */
.toast-container {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 20px;
    min-width: 280px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-color: var(--green-primary);
}

.toast.error {
    border-color: var(--red-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-nav {
        display: flex;
    }
    
    .header {
        padding: 12px 16px;
    }
    
    .balances {
        display: none;
    }
    
    .main {
        padding: 16px;
        padding-bottom: 160px;
    }
    
    .android-device .main {
        padding-bottom: 180px;
    }
    
    .featured-banner {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    
    .featured-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .collections-layout {
        grid-template-columns: 1fr;
    }
    
    .activity-feed {
        position: static;
        max-height: none;
        order: -1; /* Show activity feed before collections on mobile */
        padding: 12px;
    }
    
    .activity-feed .activity-header h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .activity-list {
        flex-direction: row;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 8px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .activity-item {
        flex: 0 0 280px;
        scroll-snap-align: start;
        gap: 12px;
        padding: 12px;
    }
    
    .activity-icon {
        width: 48px;
        height: 48px;
    }
    
    .activity-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .activity-left {
        width: 100%;
    }
    
    .activity-type {
        font-size: 11px;
        margin-bottom: 2px;
    }
    
    .activity-details {
        font-size: 13px;
    }
    
    .activity-price {
        font-size: 14px;
    }
    
    .activity-time {
        font-size: 11px;
        margin-left: 0;
        margin-top: 4px;
    }
    
    .collections-grid {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }
    
    .collection-card {
        max-width: 100%;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-overlay {
        padding: 0;
        align-items: flex-start;
    }
    
    .modal-content {
        max-height: 100vh;
        height: 100vh;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        overflow-y: auto;
    }
    
    .modal-info {
        max-height: none;
        overflow-y: visible;
        padding-bottom: 40px;
    }
    
    .modal-traits {
        max-height: none;
        overflow-y: visible;
    }
    
    .modal-image {
        max-height: 50vh;
    }
    
    .modal-close {
        position: fixed;
        top: 10px;
        right: 10px;
        background: rgba(0,0,0,0.7);
    }
    
    .staking-stats,
    .lp-info-grid {
        grid-template-columns: 1fr;
    }
    
    .collection-nfts-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .nft-collection-content {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px;
    }
    
    .collection-header-left > img {
        width: 40px;
        height: 40px;
    }
    
    .nft-collection-header .collection-name {
        font-size: 14px;
    }
    
    .nft-collection-header .collection-count-text {
        font-size: 12px;
    }
    
    .preview-thumb,
    .preview-more {
        width: 32px;
        height: 32px;
    }
    
    /* Hide main page elements when viewing collection detail on mobile */
    .hide-in-detail {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .my-nfts-grid,
    .staked-nfts-grid,
    .collection-nfts-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    
    .nft-collection-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    
    .nft-collection-header {
        padding: 12px;
    }
    
    .collection-header-top {
        margin-bottom: 10px;
    }
    
    .collection-header-left > img {
        width: 36px;
        height: 36px;
    }
    
    .nft-collection-header .collection-name {
        font-size: 14px;
    }
    
    .preview-thumb,
    .preview-more {
        width: 28px;
        height: 28px;
        border-radius: 6px;
    }
    
    .preview-more {
        font-size: 10px;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .connect-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ==================== LISTING MODAL ==================== */
.listing-modal {
    max-width: 420px;
    width: 90%;
}

.listing-modal-body {
    padding: 32px;
}

.listing-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.listing-modal-header h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.listing-modal-header p {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
}

.listing-input-group {
    margin-bottom: 20px;
}

.listing-input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.listing-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.listing-input-wrap input {
    width: 100%;
    padding: 14px 70px 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: white;
    font-size: 18px;
    font-weight: 500;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.listing-input-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.listing-input-wrap input::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.input-suffix {
    position: absolute;
    right: 16px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
}

.input-hint {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 11px;
    opacity: 0.7;
}

.listing-fee-note {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    text-align: center;
    margin: 24px 0;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
}

.listing-fee-note span {
    margin-right: 6px;
}

.listing-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.listing-actions .modal-btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
}

/* Listed badge */
.listed-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* ==================== COLLECTION VIEW ENHANCEMENTS ==================== */
.view-toggle {
    display: flex;
    gap: 0;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 4px;
    border: 1px solid var(--border);
}

.view-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.view-btn:hover {
    color: white;
}

.view-btn.active {
    background: var(--primary);
    color: white;
}

.jump-btn {
    padding: 10px 16px;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.jump-btn:hover {
    background: #059669;
}

.load-more-container {
    display: flex;
    justify-content: center;
    padding: 32px 0;
}

.load-more-btn {
    padding: 14px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
}

.load-more-btn:hover {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.1);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nft-price {
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    margin-top: 2px;
}

.collection-detail-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
/* ==================== LEADERBOARD ==================== */
.leaderboard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.leaderboard-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.leaderboard-header p {
    color: #888;
}

.leaderboard-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #2a2a3e;
    padding-bottom: 1rem;
}

.lb-tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
}

.lb-tab-btn:hover {
    border-color: #00d4aa;
    color: #fff;
}

.lb-tab-btn.active {
    background: linear-gradient(135deg, #00d4aa 0%, #00a080 100%);
    border-color: #00d4aa;
    color: #000;
    font-weight: 600;
}

.lb-content {
    display: none;
}

.lb-content.active {
    display: block;
}

.lb-table {
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
}

.lb-header-row {
    display: grid;
    grid-template-columns: 60px 1fr 150px 150px;
    padding: 1rem 1.5rem;
    background: #252540;
    font-weight: 600;
    color: #888;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.lb-body {
    max-height: 500px;
    overflow-y: auto;
}

.lb-row {
    display: grid;
    grid-template-columns: 60px 1fr 150px 150px;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #2a2a3e;
    align-items: center;
    transition: background 0.2s;
}

.lb-row:hover {
    background: #252540;
}

.lb-row:last-child {
    border-bottom: none;
}

.lb-rank {
    font-weight: 700;
    color: #00d4aa;
}

.lb-row:nth-child(1) .lb-rank { color: #ffd700; }
.lb-row:nth-child(2) .lb-rank { color: #c0c0c0; }
.lb-row:nth-child(3) .lb-rank { color: #cd7f32; }

.lb-address {
    font-family: monospace;
    font-size: 0.9rem;
}

.lb-address a {
    color: inherit;
    text-decoration: none;
}

.lb-address a:hover {
    color: #00d4aa;
}

.lb-value {
    text-align: right;
    font-weight: 500;
}

.lb-loading {
    padding: 2rem;
    text-align: center;
    color: #888;
}

/* ==================== NOTIFICATION DROPDOWN ==================== */
.notif-container {
    position: relative;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    max-height: 400px;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.notif-dropdown.show {
    display: block;
}

.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #2a2a3e;
}

.notif-dropdown-header h4 {
    margin: 0;
    font-size: 1rem;
}

.notif-clear-btn {
    background: transparent;
    border: none;
    color: #00d4aa;
    cursor: pointer;
    font-size: 0.8rem;
}

.notif-clear-btn:hover {
    text-decoration: underline;
}

.notif-list {
    max-height: 340px;
    overflow-y: auto;
}

.notif-item {
    padding: 1rem;
    border-bottom: 1px solid #2a2a3e;
    cursor: pointer;
    transition: background 0.2s;
}

.notif-item:hover {
    background: #252540;
}

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

.notif-item.sale {
    border-left: 3px solid #00d4aa;
}

.notif-item.offer {
    border-left: 3px solid #ffd700;
}

.notif-item.outbid {
    border-left: 3px solid #ff4444;
}

.notif-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notif-desc {
    font-size: 0.85rem;
    color: #888;
}

.notif-time {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

.notif-empty {
    padding: 2rem;
    text-align: center;
    color: #666;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .lb-header-row,
    .lb-row {
        grid-template-columns: 40px 1fr 100px;
    }
    
    .lb-header-row span:last-child,
    .lb-row span:last-child {
        display: none;
    }
    
    .notif-dropdown {
        position: fixed;
        top: 60px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}
/* ==================== RARITY BADGE ==================== */
.rarity-badge {
    position: absolute;
    top: 0;
    left: 0;
    padding: 3px 24px 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #000;
    z-index: 2;
    clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%);
}

/* ==================== MODAL TRAITS ==================== */
.modal-traits {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
    max-height: 200px;
    overflow-y: auto;
}

.trait-item {
    background: #252540;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}

.trait-item.rarity-trait {
    border: 1px solid #00d4aa33;
    background: #1a2a2e;
}

.trait-label {
    display: block;
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.trait-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.empty-traits {
    color: #666;
    text-align: center;
    padding: 1rem;
}

/* ==================== LEADERBOARD ==================== */
.leaderboard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.leaderboard-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.leaderboard-header p {
    color: #888;
}

.leaderboard-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #2a2a3e;
    padding-bottom: 1rem;
}

.lb-tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
}

.lb-tab-btn:hover {
    border-color: #00d4aa;
    color: #fff;
}

.lb-tab-btn.active {
    background: linear-gradient(135deg, #00d4aa 0%, #00a080 100%);
    border-color: #00d4aa;
    color: #000;
    font-weight: 600;
}

.lb-content {
    display: none;
}

.lb-content.active {
    display: block;
}

.lb-table {
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
}

.lb-header-row {
    display: grid;
    grid-template-columns: 60px 1fr 150px 150px;
    padding: 1rem 1.5rem;
    background: #252540;
    font-weight: 600;
    color: #888;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.lb-body {
    max-height: 500px;
    overflow-y: auto;
}

.lb-row {
    display: grid;
    grid-template-columns: 60px 1fr 150px 150px;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #2a2a3e;
    align-items: center;
    transition: background 0.2s;
}

.lb-row:hover {
    background: #252540;
}

.lb-row:last-child {
    border-bottom: none;
}

.lb-rank {
    font-weight: 700;
    color: #00d4aa;
}

.lb-row:nth-child(1) .lb-rank { color: #ffd700; }
.lb-row:nth-child(2) .lb-rank { color: #c0c0c0; }
.lb-row:nth-child(3) .lb-rank { color: #cd7f32; }

.lb-address {
    font-family: monospace;
    font-size: 0.9rem;
}

.lb-address a {
    color: inherit;
    text-decoration: none;
}

.lb-address a:hover {
    color: #00d4aa;
}

.lb-value {
    text-align: right;
    font-weight: 500;
}

.lb-loading {
    padding: 2rem;
    text-align: center;
    color: #888;
}

/* ==================== NOTIFICATION DROPDOWN ==================== */
.notif-container {
    position: relative;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    max-height: 400px;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.notif-dropdown.show {
    display: block;
}

.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #2a2a3e;
}

.notif-dropdown-header h4 {
    margin: 0;
    font-size: 1rem;
}

.notif-clear-btn {
    background: transparent;
    border: none;
    color: #00d4aa;
    cursor: pointer;
    font-size: 0.8rem;
}

.notif-clear-btn:hover {
    text-decoration: underline;
}

.notif-list {
    max-height: 340px;
    overflow-y: auto;
}

.notif-item {
    padding: 1rem;
    border-bottom: 1px solid #2a2a3e;
    cursor: pointer;
    transition: background 0.2s;
}

.notif-item:hover {
    background: #252540;
}

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

.notif-item.sale {
    border-left: 3px solid #00d4aa;
}

.notif-item.offer {
    border-left: 3px solid #ffd700;
}

.notif-item.outbid {
    border-left: 3px solid #ff4444;
}

.notif-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notif-desc {
    font-size: 0.85rem;
    color: #888;
}

.notif-time {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

.notif-empty {
    padding: 2rem;
    text-align: center;
    color: #666;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .lb-header-row,
    .lb-row {
        grid-template-columns: 40px 1fr 100px;
    }
    
    .lb-header-row span:last-child,
    .lb-row span:last-child {
        display: none;
    }
    
    .notif-dropdown {
        position: fixed;
        top: 60px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}


/* ==================== RARITY BADGE ==================== */
.rarity-badge {
    position: absolute;
    top: 0;
    left: 0;
    padding: 3px 24px 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #000;
    z-index: 2;
    clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%);
}

/* ==================== MODAL TRAITS ==================== */
.modal-traits {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
    max-height: 200px;
    overflow-y: auto;
}

.trait-item {
    background: #252540;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}

.trait-item.rarity-trait {
    border: 1px solid #00d4aa33;
    background: #1a2a2e;
}

.trait-label {
    display: block;
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.trait-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.empty-traits {
    color: #666;
    text-align: center;
    padding: 1rem;
}

/* ==================== TRAIT FILTERS ==================== */
.trait-filters {
    margin-bottom: 1rem;
}

.trait-filter-toggle {
    background: #252540;
    border: 1px solid #2a2a3e;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.trait-filter-toggle:hover {
    border-color: #00d4aa;
}

.trait-filter-dropdowns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #1a1a2e;
    border-radius: 8px;
    align-items: center;
}

.trait-filter-select {
    background: #252540;
    border: 1px solid #2a2a3e;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    min-width: 140px;
    cursor: pointer;
}

.trait-filter-select:hover {
    border-color: #00d4aa;
}

.trait-filter-select:focus {
    outline: none;
    border-color: #00d4aa;
}

.clear-filters-btn {
    background: transparent;
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.clear-filters-btn:hover {
    background: #ff4444;
    color: #fff;
}

/* ==================== LEADERBOARD ==================== */
.leaderboard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.leaderboard-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.leaderboard-header p {
    color: #888;
}

.leaderboard-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #2a2a3e;
    padding-bottom: 1rem;
}

.lb-tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
}

.lb-tab-btn:hover {
    border-color: #00d4aa;
    color: #fff;
}

.lb-tab-btn.active {
    background: linear-gradient(135deg, #00d4aa 0%, #00a080 100%);
    border-color: #00d4aa;
    color: #000;
    font-weight: 600;
}

.lb-content {
    display: none;
}

.lb-content.active {
    display: block;
}

.lb-table {
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
}

.lb-header-row {
    display: grid;
    grid-template-columns: 60px 1fr 150px 150px;
    padding: 1rem 1.5rem;
    background: #252540;
    font-weight: 600;
    color: #888;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.lb-body {
    max-height: 500px;
    overflow-y: auto;
}

.lb-row {
    display: grid;
    grid-template-columns: 60px 1fr 150px 150px;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #2a2a3e;
    align-items: center;
    transition: background 0.2s;
}

.lb-row:hover {
    background: #252540;
}

.lb-row:last-child {
    border-bottom: none;
}

.lb-rank {
    font-weight: 700;
    color: #00d4aa;
}

.lb-row:nth-child(1) .lb-rank { color: #ffd700; }
.lb-row:nth-child(2) .lb-rank { color: #c0c0c0; }
.lb-row:nth-child(3) .lb-rank { color: #cd7f32; }

.lb-address {
    font-family: monospace;
    font-size: 0.9rem;
}

.lb-address a {
    color: inherit;
    text-decoration: none;
}

.lb-address a:hover {
    color: #00d4aa;
}

.lb-value {
    text-align: right;
    font-weight: 500;
}

.lb-loading {
    padding: 2rem;
    text-align: center;
    color: #888;
}

/* ==================== NOTIFICATION DROPDOWN ==================== */
.notif-container {
    position: relative;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    max-height: 400px;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.notif-dropdown.show {
    display: block;
}

.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #2a2a3e;
}

.notif-dropdown-header h4 {
    margin: 0;
    font-size: 1rem;
}

.notif-clear-btn {
    background: transparent;
    border: none;
    color: #00d4aa;
    cursor: pointer;
    font-size: 0.8rem;
}

.notif-clear-btn:hover {
    text-decoration: underline;
}

.notif-list {
    max-height: 340px;
    overflow-y: auto;
}

.notif-item {
    padding: 1rem;
    border-bottom: 1px solid #2a2a3e;
    cursor: pointer;
    transition: background 0.2s;
}

.notif-item:hover {
    background: #252540;
}

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

.notif-item.sale {
    border-left: 3px solid #00d4aa;
}

.notif-item.offer {
    border-left: 3px solid #ffd700;
}

.notif-item.outbid {
    border-left: 3px solid #ff4444;
}

.notif-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notif-desc {
    font-size: 0.85rem;
    color: #888;
}

.notif-time {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

.notif-empty {
    padding: 2rem;
    text-align: center;
    color: #666;
}

/* Mobile adjustments for new features */
@media (max-width: 768px) {
    .trait-filter-dropdowns {
        flex-direction: column;
        align-items: stretch;
    }
    
    .trait-filter-select {
        width: 100%;
    }
    
    .lb-header-row,
    .lb-row {
        grid-template-columns: 40px 1fr 100px;
    }
    
    .lb-header-row span:last-child,
    .lb-row span:last-child {
        display: none;
    }
    
    .notif-dropdown {
        position: fixed;
        top: 60px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}

/* ==================== USER PROFILES ==================== */
.user-profile-view {
    padding: 1rem;
}

.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00d4aa 0%, #00a080 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #000;
}

.profile-text h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
}

.profile-link {
    color: #00d4aa;
    text-decoration: none;
    font-size: 0.85rem;
}

.profile-link:hover {
    text-decoration: underline;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #1a1a2e;
    border-radius: 12px;
}

.profile-stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #00d4aa;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.25rem;
}

.profile-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #2a2a3e;
    padding-bottom: 1rem;
}

.profile-tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-tab-btn:hover {
    border-color: #00d4aa;
    color: #fff;
}

.profile-tab-btn.active {
    background: linear-gradient(135deg, #00d4aa 0%, #00a080 100%);
    border-color: #00d4aa;
    color: #000;
    font-weight: 600;
}

.profile-content {
    min-height: 200px;
}

.profile-nfts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.profile-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.activity-item-name {
    color: #fff;
}

.address-link {
    color: inherit;
    text-decoration: none;
}

.address-link:hover {
    color: #00d4aa;
}

@media (max-width: 768px) {
    .profile-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .profile-stat {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

/* ==================== COLLECTION STATS ==================== */
.collection-detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.collection-detail-stats span {
    background: #252540;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #ccc;
}

.collection-detail-stats span:first-child {
    color: #00d4aa;
}

#collectionFloor {
    color: #ffd700 !important;
}

#collectionVolume {
    color: #00d4aa !important;
}

/* ==================== MOBILE MODAL FIX - FINAL OVERRIDE ==================== */
@media (max-width: 768px) {
    .modal-overlay.active {
        padding: 0;
        align-items: flex-start;
    }
    
    .modal-content {
        max-height: 100vh;
        height: 100vh;
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        overflow-y: auto;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-image {
        max-height: 50vh;
        aspect-ratio: auto;
    }
    
    .modal-info {
        max-height: none;
        overflow-y: visible;
        padding: 20px;
        padding-bottom: 60px;
    }
    
    .modal-traits {
        max-height: none !important;
        overflow-y: visible !important;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-close {
        position: fixed;
        top: 12px;
        right: 12px;
        background: rgba(0,0,0,0.8);
        z-index: 1001;
    }
}
