/* ===== PREMIUM MODERN DESIGN ===== */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #13131d;
    --bg-card: #1a1a27;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b2;
    --border: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

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

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15) 0%, transparent 70%),
                radial-gradient(ellipse at bottom, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

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

/* ===== PREMIUM HEADER ===== */
.main-header {
    backdrop-filter: blur(20px);
    background: rgba(10, 10, 15, 0.8);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

.main-header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-btn {
    padding: 0.7rem 1.3rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.nav-btn.hidden {
    display: none;
}

.lang-switch-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.lang-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.switch {
    position: relative;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-secondary);
    transition: 0.3s;
    border-radius: 24px;
    border: 1px solid var(--border);
}

.slider:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 3px;
    background: var(--text-secondary);
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background: var(--accent);
    border-color: var(--accent);
}

input:checked + .slider:before {
    transform: translateX(24px);
    background: white;
}

.btn-connect {
    padding: 0.85rem 1.8rem;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    border: none;
    color: white;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.btn-connect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-connect:hover::before {
    width: 300px;
    height: 300px;
}

.btn-connect:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-connect.connected {
    background: var(--bg-card);
    color: var(--accent);
    border: 2px solid var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.5rem;
}

.status {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    display: inline-block;
    border: 1px solid var(--border);
}

/* ===== ABOUT SECTION ===== */
.about-section {
    margin: 3rem 0;
    padding: 2.5rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    animation: fadeInUp 0.8s ease;
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.about-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.about-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== NFT GRID ===== */
.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin: 3rem auto;
    padding: 0 2rem;
    max-width: 1600px;
}

.card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    animation: fadeInUp 0.6s ease backwards;
    min-height: 320px;
}

.card-layout {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    min-height: 320px;
    align-items: stretch;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
}

.image-container {
    position: relative;
    width: 300px;
    min-width: 300px;
    height: 300px;
    overflow: hidden;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin: 1.5rem;
}

.img-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.nft-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .nft-image {
    transform: scale(1.1);
}

.img-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent);
    font-size: 2rem;
}

.img-loader.hidden {
    display: none;
}

.card-content {
    flex: 1;
    padding: 2rem 2rem 2rem 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.token-id {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.data-context {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 12px;
    margin: 1rem 0;
    border: 1px solid var(--border);
    flex: 1;
}

.data-context p {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
    word-break: break-word;
}

.data-context strong {
    white-space: nowrap;
    margin-right: 0.25rem;
}

.data-context strong::after {
    content: ':';
}

.data-context i {
    color: var(--accent);
    font-size: 1rem;
    margin-top: 0.2rem;
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    color: white;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.price-tag {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.8rem;
}

.btn-mint {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    border: none;
    color: white;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 15px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.btn-mint::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-mint:hover::before {
    width: 400px;
    height: 400px;
}

.btn-mint:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-glow);
}

.btn-mint:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

/* NFT Detail Modal - Higher z-index to appear above collection modal */
#nft-detail-modal {
    z-index: 15000;
}

.modal.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    border: 1px solid var(--border);
    position: relative;
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-secondary);
}

.close-modal:hover {
    color: var(--text-primary);
    background: var(--accent);
    transform: rotate(90deg);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
}

.modal-content p {
    margin: 0.8rem 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.modal-content strong {
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-danger {
    padding: 0.85rem 1.5rem;
    background: transparent;
    border: 2px solid var(--error);
    color: var(--error);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-danger:hover {
    background: var(--error);
    color: white;
    transform: translateY(-2px);
}

/* ===== NFT DETAIL MODAL - VANTA WAVES EDITION ===== */
#nft-detail-modal {
    z-index: 15000;
}

.nft-detail-wrapper {
    position: relative;
    width: 90vw;
    max-width: 800px;
    height: auto;
    max-height: 80vh;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Vanta Waves Container */
.vanta-waves-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Modal Content Overlay */
.nft-detail-content-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(10, 10, 15, 0.75) 0%,
        rgba(15, 15, 25, 0.7) 100%
    );
    overflow-y: auto;
}

/* Close Button */
.nft-detail-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nft-detail-close:hover {
    background: var(--error);
    border-color: var(--error);
    transform: rotate(90deg);
}

/* Grid Layout */
.nft-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    min-height: 400px;
}

/* Image Section */
.nft-detail-image-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nft-image-wrapper {
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    position: relative;
}

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

/* Download Button on Image */
.nft-download-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    background: rgba(99, 102, 241, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nft-download-btn:hover {
    background: var(--accent);
    border-color: white;
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.5);
}

.nft-download-btn:active {
    transform: scale(0.95);
}

/* Info Section */
.nft-detail-info-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

/* Header */
.nft-detail-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
}

.nft-token-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Stats Compact */
.nft-stats-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 0.8rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item .stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-item .stat-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
}

/* Description Compact */
.nft-description-compact {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nft-description-compact h4 {
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
}

.nft-description-compact p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* Scrollbar for info section */
.nft-detail-info-section::-webkit-scrollbar {
    width: 6px;
}

.nft-detail-info-section::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.nft-detail-info-section::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 3px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nft-detail-wrapper {
        width: 100vw;
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }
    
    .nft-detail-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
        padding-top: 60px;
    }
    
    .nft-image-wrapper {
        max-width: 100%;
    }
    
    .nft-detail-header h2 {
        font-size: 1.2rem;
    }
    
    .nft-stats-compact {
        gap: 0.6rem;
    }
    
    .stat-item {
        padding: 0.6rem;
    }
    
    .stat-item .stat-label {
        font-size: 0.65rem;
    }
    
    .stat-item .stat-value {
        font-size: 0.85rem;
    }
    
    .nft-description-compact {
        padding: 0.8rem;
    }
    
    .nft-description-compact p {
        font-size: 0.8rem;
    }
}

/* Old styles - Remove/Replace */
.nft-detail-left,
.nft-detail-right,
.nft-stats,
.stat-box,
.nft-description {
    display: none;
}

/* My Collection Modal */
#my-collection-modal .modal-content {
    max-width: 1200px;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
}

#my-collection-modal .grid-container {
    margin: 2rem 0 0 0;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Footer */
footer {
    margin-top: 5rem;
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-3px);
}

footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0.5rem 0;
}

/* Currency Symbol */
.currency-symbol {
    color: var(--accent);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .container { 
        padding: 0 0.75rem; 
    }
    
    .main-header h1 {
        font-size: 2rem;
    }
    
    .header-top { 
        flex-direction: column; 
        gap: 1rem;
        text-align: center; 
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .nav-menu {
        width: 100%;
    }
    
    #my-collection-btn,
    #wallet-btn {
        width: 100%;
        justify-content: center;
    }
    
    .lang-switch-container {
        margin: 0 auto;
    }
    
    .about-section h2 {
        font-size: 1.5rem;
    }
    
    .about-section p {
        font-size: 0.95rem;
    }
    
    .grid-container { 
        grid-template-columns: 1fr; 
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .card-layout {
        flex-direction: column;
        gap: 0;
    }
    
    .image-container {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        margin: 0;
        border-radius: 12px 12px 0 0;
    }
    
    .card-content {
        padding: 1.5rem;
    }
    
    .card-content h3 {
        font-size: 1.2rem;
    }
    
    .data-context {
        margin: 1rem 0;
    }
    
    .card-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .price-tag {
        width: 100%;
        text-align: center;
    }
    
    .btn-mint {
        width: 100%;
    }
    
    .modal-content { 
        padding: 1.5rem;
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    #nft-detail-modal .modal-content { 
        grid-template-columns: 1fr;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .nft-detail-left {
        max-height: 50vh;
    }
    
    .nft-detail-left img {
        max-height: 50vh;
        object-fit: contain;
    }
    
    .nft-stats { 
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .stat-box {
        padding: 0.75rem;
    }
    
    #my-collection-modal .modal-content {
        max-width: calc(100vw - 2rem);
    }
    
    #my-collection-modal .grid-container {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-actions button {
        width: 100%;
    }
    
    footer {
        padding: 2rem 0;
    }
    
    .social-links a {
        width: 40px;
        height: 40px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .grid-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .image-container {
        width: 250px;
        min-width: 250px;
        height: 250px;
    }
}

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

.fa-spinner, .fa-circle-notch {
    animation: spin 1s linear infinite;
}

/* ===== PREMIUM COLLECTION MODAL - VANTA CLOUDS EDITION ===== */
#my-collection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

#my-collection-modal.hidden {
    display: none !important;
}

.collection-modal-wrapper {
    position: relative;
    width: 95vw;
    max-width: 1400px;
    height: 90vh;
    max-height: 900px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Vanta Clouds Container */
.vanta-clouds-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Modal Content Overlay */
.collection-modal-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(
        180deg,
        rgba(10, 10, 15, 0.65) 0%,
        rgba(10, 10, 15, 0.55) 30%,
        rgba(10, 10, 15, 0.5) 100%
    );
}

/* Collection Modal Header */
.collection-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 10, 15, 0.5);
}

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

.collection-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.collection-title-group h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.collection-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 2px;
    display: block;
}

.collection-close-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.collection-close-btn:hover {
    background: var(--error);
    border-color: var(--error);
    color: white;
    transform: rotate(90deg);
}

/* Collection Stats Bar */
.collection-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    padding: 20px 32px;
    background: rgba(20, 20, 30, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.collection-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.collection-stat i {
    font-size: 20px;
    color: var(--accent);
    margin-bottom: 4px;
}

.collection-stat span:first-of-type {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.collection-stat span:last-of-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Premium Collection Grid */
.collection-grid-premium {
    flex: 1;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 24px;
    overflow-y: auto;
    align-content: start;
}

/* Scrollbar Styling */
.collection-grid-premium::-webkit-scrollbar {
    width: 8px;
}

.collection-grid-premium::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.collection-grid-premium::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 4px;
}

.collection-grid-premium::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6);
}

/* Premium NFT Card */
.premium-nft-card {
    background: linear-gradient(
        145deg,
        rgba(30, 30, 45, 0.9) 0%,
        rgba(20, 20, 35, 0.95) 100%
    );
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.premium-nft-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #8b5cf6, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-nft-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.35),
        0 0 30px rgba(99, 102, 241, 0.15);
}

.premium-nft-card:hover::before {
    opacity: 1;
}

/* Card Image Container */
.premium-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a27 0%, #0f0f17 100%);
}

.premium-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.premium-nft-card:hover .premium-card-image img {
    transform: scale(1.1);
}

/* Image Overlay */
.premium-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        transparent 30%,
        rgba(0, 0, 0, 0.85) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.premium-nft-card:hover .premium-card-overlay {
    opacity: 1;
}

.view-details-btn {
    padding: 8px 18px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(10px);
    opacity: 0;
}

.premium-nft-card:hover .view-details-btn {
    transform: translateY(0);
    opacity: 1;
}

.view-details-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

/* Card Badge */
.premium-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.4);
}

.premium-card-badge i {
    font-size: 8px;
}

/* Card Info */
.premium-card-info {
    padding: 14px;
}

.premium-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.premium-card-name .token-num {
    color: var(--accent);
}

.premium-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.meta-value.type-badge {
    color: var(--accent);
}

/* Empty State */
.collection-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    width: 100px;
    height: 100px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.empty-icon i {
    font-size: 40px;
    color: var(--accent);
}

.collection-empty-state h3 {
    font-size: 1.4rem;
    color: white;
    margin-bottom: 12px;
}

.collection-empty-state p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 400px;
    line-height: 1.6;
}

/* Loading State - Clean Design */
.collection-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    min-height: 400px;
}

.loading-spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 28px;
}

.loading-spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner-inner {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 3px solid rgba(139, 92, 246, 0.1);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.loading-spinner-core {
    display: none;
}

.loading-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: var(--accent);
    animation: loadingIconPulse 2s ease-in-out infinite;
}

@keyframes loadingIconPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.collection-loading h3 {
    font-size: 1.3rem;
    color: white;
    margin-bottom: 8px;
    font-weight: 600;
}

.collection-loading p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: loadingDot 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingDot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .collection-modal-wrapper {
        width: 100vw;
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }
    
    .collection-modal-header {
        padding: 14px 16px;
    }
    
    .collection-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        border-radius: 10px;
    }
    
    .collection-title-group h2 {
        font-size: 1.1rem;
    }
    
    .collection-subtitle {
        font-size: 0.75rem;
    }
    
    .collection-stats-bar {
        gap: 16px;
        padding: 12px 16px;
    }
    
    .collection-stat i {
        font-size: 16px;
    }
    
    .collection-stat span:first-of-type {
        font-size: 1rem;
    }
    
    .collection-stat span:last-of-type {
        font-size: 0.65rem;
    }
    
    .collection-grid-premium {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px;
    }
    
    .premium-nft-card {
        border-radius: 14px;
    }
    
    .premium-card-info {
        padding: 10px;
    }
    
    .premium-card-name {
        font-size: 0.8rem;
    }
    
    .meta-label {
        font-size: 0.55rem;
    }
    
    .meta-value {
        font-size: 0.75rem;
    }
    
    .premium-card-badge {
        padding: 4px 8px;
        font-size: 0.5rem;
        top: 6px;
        right: 6px;
    }
    
    .view-details-btn {
        padding: 6px 12px;
        font-size: 0.65rem;
    }
    
    .collection-loading {
        padding: 60px 20px;
        min-height: 300px;
    }
    
    .loading-spinner-container {
        width: 80px;
        height: 80px;
    }
    
    .loading-icon {
        font-size: 20px;
    }
    
    .collection-loading h3 {
        font-size: 1.1rem;
    }
    
    .empty-icon {
        width: 70px;
        height: 70px;
    }
    
    .empty-icon i {
        font-size: 28px;
    }
    
    .collection-empty-state h3 {
        font-size: 1.1rem;
    }
    
    .collection-empty-state p {
        font-size: 0.85rem;
    }
}
