@font-face {
    font-family: 'BourbonRough';
    src: url('../assets/founts/BourbonRough.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.section-3 {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-4-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 110%;
    height: 110%;
    z-index: 0;
    background-image: url('../assets/images/Background/Section-4.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: none !important;
    animation: marketplacePulse 25s ease-in-out infinite alternate;
    transform-origin: center center;
}

@keyframes marketplacePulse {
    0% {
        transform: scale(1) translate(0, 0);
    }
    33% {
        transform: scale(1.03) translate(1%, -1%);
    }
    66% {
        transform: scale(1.05) translate(-1%, 1%);
    }
    100% {
        transform: scale(1.04) translate(0.5%, -0.5%);
    }
}

.section-3 .content-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--header-height, 80px) + 20px) calc(20px * var(--scale, 1)) calc(20px * var(--scale, 1));
}

.marketplace-container {
    position: relative;
    z-index: 1;
    max-width: calc(1400px * var(--scale, 1));
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    opacity: 1;
    visibility: visible;
}

.marketplace-header {
    text-align: center;
    margin-bottom: calc(35px * var(--scale, 1));
    opacity: 1;
    transform: translateY(0);
}

.marketplace-title {
    margin-bottom: calc(40px * var(--scale, 1));
    font-family: 'BourbonRough', 'Inter', sans-serif;
}

.marketplace-title .title-main {
    display: block;
    font-size: calc(180px * var(--scale, 1));
    font-weight: 900;
    letter-spacing: calc(12px * var(--scale, 1));
    color: #d43535;
    text-shadow: 
        calc(4px * var(--scale, 1)) calc(4px * var(--scale, 1)) 0px #000000,
        calc(-2px * var(--scale, 1)) calc(-2px * var(--scale, 1)) 0px #000000,
        calc(2px * var(--scale, 1)) calc(-2px * var(--scale, 1)) 0px #000000,
        calc(-2px * var(--scale, 1)) calc(2px * var(--scale, 1)) 0px #000000;
    margin-bottom: calc(15px * var(--scale, 1));
    font-family: 'BourbonRough', 'Inter', sans-serif;
}

.marketplace-title .title-sub {
    display: block;
    font-size: calc(20px * var(--scale, 1));
    font-weight: 700;
    letter-spacing: calc(3px * var(--scale, 1));
    color: #1a1a1a;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    text-shadow: 
        calc(2px * var(--scale, 1)) calc(2px * var(--scale, 1)) calc(4px * var(--scale, 1)) rgba(255, 255, 255, 0.6),
        0 0 calc(15px * var(--scale, 1)) rgba(255, 255, 255, 0.3);
}

.market-stats {
    display: flex;
    justify-content: center;
    gap: calc(30px * var(--scale, 1));
    flex-wrap: wrap;
    font-family: 'Inter', sans-serif;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: calc(10px * var(--scale, 1));
    padding: calc(20px * var(--scale, 1)) calc(30px * var(--scale, 1));
    background: rgba(250, 250, 250, 0.7);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border: none;
    border-radius: calc(12px * var(--scale, 1));
    min-width: calc(180px * var(--scale, 1));
    width: calc(180px * var(--scale, 1));
    height: calc(90px * var(--scale, 1));
    transition: all 0.3s ease;
    box-shadow: 
        0 calc(10px * var(--scale, 1)) calc(40px * var(--scale, 1)) rgba(0, 0, 0, 0.15),
        0 calc(2px * var(--scale, 1)) calc(6px * var(--scale, 1)) rgba(0, 0, 0, 0.1),
        inset 0 calc(1px * var(--scale, 1)) 0 rgba(255, 255, 255, 0.5),
        inset 0 calc(-1px * var(--scale, 1)) 0 rgba(0, 0, 0, 0.05);
}

.stat-item:hover {
    background: rgba(250, 250, 250, 0.8);
    transform: translateY(calc(-2px * var(--scale, 1)));
    box-shadow: 
        0 calc(15px * var(--scale, 1)) calc(50px * var(--scale, 1)) rgba(0, 0, 0, 0.2),
        inset 0 calc(1px * var(--scale, 1)) 0 rgba(255, 255, 255, 0.6);
}

.stat-item .stat-label {
    font-size: calc(13px * var(--scale, 1));
    color: rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: calc(1px * var(--scale, 1));
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.stat-item .stat-value {
    font-size: calc(26px * var(--scale, 1));
    font-weight: 700;
    color: #dc2626;
    font-family: 'BourbonRough', 'Inter', sans-serif;
}

.token-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(30px * var(--scale, 1));
    opacity: 1;
    transform: translateY(0);
    max-width: calc(1100px * var(--scale, 1));
    width: 100%;
    margin: 0 auto;
    margin-top: calc(30px * var(--scale, 1));
}

@media (max-width: 768px) {
    .token-grid {
        gap: calc(15px * var(--scale, 1));
        grid-template-columns: 1fr;
    }
}

.token-card {
    position: relative;
    background: rgba(250, 250, 250, 0.7);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border: none;
    border-radius: calc(16px * var(--scale, 1));
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    visibility: visible !important;
    box-shadow: 
        0 calc(20px * var(--scale, 1)) calc(60px * var(--scale, 1)) rgba(0, 0, 0, 0.2),
        0 calc(2px * var(--scale, 1)) calc(8px * var(--scale, 1)) rgba(0, 0, 0, 0.1),
        inset 0 calc(1px * var(--scale, 1)) 0 rgba(255, 255, 255, 0.5),
        inset 0 calc(-1px * var(--scale, 1)) 0 rgba(0, 0, 0, 0.05);
    min-height: calc(420px * var(--scale, 1));
}

@keyframes cardEntry {
    from {
        opacity: 0;
        transform: translateY(calc(30px * var(--scale, 1))) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Добавляем анимации только если поддерживаются */
@media (prefers-reduced-motion: no-preference) {
    .marketplace-header {
        animation: fadeInDown 0.8s ease-out;
    }
    
    .token-grid {
        animation: fadeInUp 0.8s ease-out 0.4s both;
    }
    
    .token-card {
        animation: cardEntry 0.6s ease-out backwards;
    }
    
    .token-card:nth-child(1) { animation-delay: 0.1s; }
    .token-card:nth-child(2) { animation-delay: 0.2s; }
    .token-card:nth-child(3) { animation-delay: 0.3s; }
}

.token-card:hover {
    transform: translateY(calc(-10px * var(--scale, 1))) scale(1.02);
    background: rgba(250, 250, 250, 0.8);
    box-shadow: 
        0 calc(30px * var(--scale, 1)) calc(80px * var(--scale, 1)) rgba(0, 0, 0, 0.25),
        0 0 calc(60px * var(--scale, 1)) rgba(220, 38, 38, 0.1),
        inset 0 calc(1px * var(--scale, 1)) 0 rgba(255, 255, 255, 0.6);
}

.token-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: calc(2px * var(--scale, 1));
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.8), transparent);
    animation: scanLine 3s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 calc(2px * var(--scale, 1)) calc(10px * var(--scale, 1)) rgba(220, 38, 38, 0.3);
}

.token-card:hover::before {
    opacity: 1;
}

@keyframes scanLine {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

.token-card-inner {
    padding: calc(50px * var(--scale, 1)) calc(25px * var(--scale, 1)) calc(35px * var(--scale, 1));
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    height: 100%;
    justify-content: space-between;
    opacity: 1 !important;
    visibility: visible !important;
}

.token-badge {
    position: absolute;
    top: calc(20px * var(--scale, 1));
    left: calc(25px * var(--scale, 1));
    font-size: calc(24px * var(--scale, 1));
    font-weight: 900;
    letter-spacing: calc(4px * var(--scale, 1));
    color: #2a2a2a;
    text-transform: uppercase;
    font-family: 'BourbonRough', 'Inter', sans-serif;
    opacity: 1 !important;
    visibility: visible !important;
}

.token-amount {
    margin: calc(50px * var(--scale, 1)) 0 calc(30px * var(--scale, 1));
}

.amount-value {
    font-size: calc(56px * var(--scale, 1));
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: calc(8px * var(--scale, 1));
    font-family: 'BourbonRough', 'Inter', sans-serif;
    opacity: 1 !important;
    visibility: visible !important;
}

.amount-label {
    font-size: calc(16px * var(--scale, 1));
    font-weight: 700;
    color: rgba(0, 0, 0, 0.6);
    letter-spacing: calc(3px * var(--scale, 1));
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    opacity: 1 !important;
    visibility: visible !important;
}

.token-price {
    display: flex;
    align-items: center;
    gap: calc(15px * var(--scale, 1));
    padding: calc(15px * var(--scale, 1)) 0;
    background: none;
    border: none;
    margin-bottom: calc(30px * var(--scale, 1));
    justify-content: center;
    opacity: 1 !important;
    visibility: visible !important;
}

.price-label {
    font-size: calc(28px * var(--scale, 1));
    color: rgba(0, 0, 0, 0.6);
    text-transform: uppercase;
    letter-spacing: calc(1.5px * var(--scale, 1));
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

.price-value {
    font-size: calc(28px * var(--scale, 1));
    font-weight: 900;
    color: #dc2626;
    font-family: 'BourbonRough', 'Inter', sans-serif;
}

.btn-buy {
    width: 100%;
    padding: calc(16px * var(--scale, 1)) calc(30px * var(--scale, 1));
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border: none;
    border-radius: calc(10px * var(--scale, 1));
    color: #ffffff;
    font-size: calc(30px * var(--scale, 1));
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: calc(3px * var(--scale, 1));
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-family: 'BourbonRough', 'Inter', sans-serif;
    text-align: center;
    box-shadow: 
        0 calc(6px * var(--scale, 1)) calc(25px * var(--scale, 1)) rgba(220, 38, 38, 0.35),
        0 calc(2px * var(--scale, 1)) calc(8px * var(--scale, 1)) rgba(0, 0, 0, 0.2);
    opacity: 1 !important;
    visibility: visible !important;
}

.btn-buy::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-buy:hover::before {
    left: 100%;
}

.btn-buy:hover {
    transform: translateY(calc(-2px * var(--scale, 1)));
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 
        0 calc(10px * var(--scale, 1)) calc(35px * var(--scale, 1)) rgba(220, 38, 38, 0.5),
        0 0 calc(50px * var(--scale, 1)) rgba(220, 38, 38, 0.3),
        0 calc(4px * var(--scale, 1)) calc(15px * var(--scale, 1)) rgba(0, 0, 0, 0.3);
}

.btn-buy:active {
    transform: translateY(0);
}

.btn-text {
    position: relative;
    z-index: 1;
    opacity: 1 !important;
    visibility: visible !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(calc(30px * var(--scale, 1)));
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(calc(-30px * var(--scale, 1)));
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}