/**
 * UX/UI Improvements CSS
 * Новые стили для улучшения пользовательского опыта
 */

/* ============================================
   HOW IT WORKS SECTION
   ============================================ */
.how-it-works-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.step-card {
    text-align: center;
    padding: 25px 15px;
    background: white;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    transition: all 0.2s ease;
    position: relative;
}

.step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.1);
    border-color: #0066ff;
}

.step-number {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.step-icon {
    font-size: 60px;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.step-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.step-description {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* ============================================
   GUARANTEES SECTION
   ============================================ */
.guarantees-section {
    padding: 80px 0;
    background: white;
}

.guarantee-card {
    padding: 25px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
    height: 100%;
    background: white;
}

.guarantee-card:hover {
    border-color: #0066ff;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.1);
    transform: translateY(-2px);
}

.guarantee-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.guarantee-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2c3e50;
}

.guarantee-text {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */
.testimonials-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.testimonials-section .section-title,
.testimonials-section .section-subtitle {
    color: white;
}

.testimonial-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    padding: 25px;
    transition: all 0.2s ease;
    height: 100%;
}

.testimonial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #D1D5DB;
}

.testimonial-rating {
    font-size: 24px;
    margin-bottom: 15px;
}

.testimonial-text {
    color: #2c3e50;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.author-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.author-meta {
    color: #6c757d;
    font-size: 13px;
}

/* ============================================
   TOP SELLERS SECTION
   ============================================ */
.top-sellers-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.top-seller-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
}

.top-seller-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #0066ff;
}

.seller-rank {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 40px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.seller-rank.gold {
    animation: pulse-gold 2s ease-in-out infinite;
}

@keyframes pulse-gold {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
}

.seller-avatar-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 20px auto 15px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.seller-name-large {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.seller-rating-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.rating-stars {
    font-size: 16px;
}

.rating-value {
    font-size: 18px;
    font-weight: 700;
    color: #ffa726;
}

.seller-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.stat-value-small {
    font-size: 24px;
    font-weight: 700;
    color: #0066ff;
}

.stat-label-small {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.seller-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.seller-badges .badge {
    font-size: 11px;
    padding: 5px 12px;
    font-weight: 600;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-section {
    padding: 80px 0;
    background: white;
}

.faq-accordion .accordion-item {
    border: 2px solid #f0f0f0;
    border-radius: 12px !important;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-accordion .accordion-button {
    font-weight: 600;
    font-size: 16px;
    padding: 20px 25px;
    background: white;
    color: #2c3e50;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.faq-accordion .accordion-button:focus {
    box-shadow: none;
    border-color: #0066ff;
}

.faq-accordion .accordion-body {
    padding: 20px 25px;
    color: #495057;
    line-height: 1.7;
}

/* ============================================
   LISTING DETAIL IMPROVEMENTS
   ============================================ */
.listing-action-sidebar {
    position: static;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

/* Кнопка избранного на странице детального просмотра - НЕ абсолютная */
.favorite-btn-detail {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    background: white !important;
    padding: 12px !important;
}

.favorite-btn-detail:hover {
    background: #FEE2E2 !important;
    transform: none !important;
}

.favorite-btn-detail.active {
    background: #FEE2E2 !important;
    border-color: #EF4444 !important;
}

.favorite-btn-detail i {
    margin-right: 8px;
}

.listing-price-large {
    font-size: 36px;
    font-weight: 700;
    color: #0066ff;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
    display: block;
}

.listing-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.listing-cta-buttons .btn {
    font-weight: 600;
    padding: 14px 20px;
    font-size: 16px;
}

.listing-meta-info {
    border-top: 2px solid #f0f0f0;
    padding-top: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: #6c757d;
    font-size: 14px;
}

.meta-item i {
    font-size: 18px;
    color: #0066ff;
}

.urgency-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 15px;
    display: inline-block;
}

/* Seller card enhanced - НЕ sticky, статичная позиция */
.seller-card-enhanced {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    position: static !important;
    top: auto !important;
}

.seller-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.seller-avatar-medium {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    position: relative;
}

.online-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid white;
}

.online-status.online {
    background: #10B981; /* Зеленый - в сети */
}

.online-status.offline {
    background: #9CA3AF; /* Серый - не в сети */
}

.seller-info-main h5 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.seller-rating-inline {
    color: #ffa726;
    font-size: 14px;
}

.seller-stats-detailed {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

.seller-stat-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.seller-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #0066ff;
}

.seller-stat-label {
    font-size: 12px;
    color: #6c757d;
}

/* ============================================
   SIMILAR LISTINGS SECTION
   ============================================ */
.similar-listings-section {
    margin-top: 60px;
    padding: 40px 0;
    background: #f8f9fa;
    border-radius: 16px;
}

.similar-listing-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.similar-listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.similar-listing-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.similar-listing-content {
    padding: 15px;
}

.similar-listing-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.similar-listing-price {
    font-size: 20px;
    font-weight: 700;
    color: #0066ff;
}

/* ============================================
   BADGES & LABELS
   ============================================ */
.listing-badge-corner {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.badge-new {
    background: linear-gradient(135deg, #00c853 0%, #00e676 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 200, 83, 0.4);
}

.badge-hot {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    animation: pulse-hot 1.5s ease-in-out infinite;
}

@keyframes pulse-hot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.05); }
}

.badge-verified {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.badge-popular {
    background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

/* ============================================
   GAME CARDS WITH COUNTERS
   ============================================ */
.game-card {
    display: block;
    text-align: center;
    padding: 15px 10px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.2s ease;
    position: relative;
}

.game-card:hover {
    transform: translateY(-2px);
    border-color: #0066ff;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
    color: #0066ff;
}

/* Убираем эффект sweep */
.game-card::before {
    display: none;
}

.game-icon-placeholder {
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    background: #F3F4F6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #6B7280;
    transition: all 0.2s ease;
}

.game-card:hover .game-icon-placeholder {
    background: #0066ff;
    color: white;
}

.game-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.game-counter {
    font-size: 11px;
    color: #9CA3AF;
    margin-top: 4px;
}

.game-counter strong {
    color: #0066ff;
    font-weight: 600;
}

/* ============================================
   MICRO-ANIMATIONS - Simplified
   ============================================ */
.listing-item {
    transition: all 0.2s ease;
}

.listing-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Убираем zoom на изображениях */
.listing-item:hover .listing-image img {
    transform: none;
}

.listing-image {
    overflow: hidden;
    border-radius: 12px;
}

.listing-image img {
    transition: none;
}

/* Убираем ripple effect - слишком сложно */
.btn {
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Убираем heart animation */
.favorite-btn.active i {
    color: #ff6b6b;
}

/* ============================================
   LOADING SKELETONS
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 10px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 15px;
}

.skeleton-image {
    width: 100%;
    height: 200px;
}

/* ============================================
   MOBILE IMPROVEMENTS
   ============================================ */
@media (max-width: 768px) {
    .how-it-works-section {
        padding: 50px 0;
    }
    
    .step-card {
        padding: 25px 15px;
    }
    
    .step-icon {
        font-size: 48px;
    }
    
    .testimonials-section,
    .guarantees-section,
    .top-sellers-section {
        padding: 50px 0;
    }
    
    .listing-action-sidebar {
        position: static;
        margin-top: 30px;
    }
    
    .seller-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   STATS IMPROVEMENTS
   ============================================ */
.hero-stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 140px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   ENHANCED HOVER EFFECTS
   ============================================ */
.feature-card,
.listing-item {
    cursor: pointer;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(5deg);
}

/* ============================================
   LIVE ACTIVITY INDICATOR
   ============================================ */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 200, 83, 0.1);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #00c853;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #00c853;
    border-radius: 50%;
    animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* ============================================
   TRUST BADGES
   ============================================ */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6c757d;
}

.trust-badge i {
    font-size: 18px;
    color: #00c853;
}

/* ============================================
   LISTING IMAGE IMPROVEMENTS
   ============================================ */
.listing-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    height: 200px;
}

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

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */
@media (max-width: 576px) {
    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item {
        min-width: 100%;
        text-align: center;
    }
    
    .game-card {
        padding: 20px 10px;
    }
    
    .listing-price-large {
        font-size: 28px;
    }
    
    .how-it-works-section .step-card {
        margin-bottom: 15px;
    }
    
    .top-seller-card {
        margin-bottom: 20px;
    }
}

/* ============================================
   FILTERS SIDEBAR
   ============================================ */
.filters-sidebar {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 100px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.filters-header h5 {
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
    margin-bottom: 8px;
}

.filter-group .form-select,
.filter-group .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.filter-group .form-select:focus,
.filter-group .form-control:focus {
    border-color: #0066ff;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.filter-group .form-check {
    margin-bottom: 8px;
}

.filter-group .form-check-input:checked {
    background-color: #0066ff;
    border-color: #0066ff;
}

/* ============================================
   IMPROVED MOBILE MENU
   ============================================ */
@media (max-width: 991px) {
    .listing-action-sidebar {
        position: static;
        margin-bottom: 30px;
    }
    
    .seller-card-enhanced {
        margin-top: 20px;
    }
    
    .similar-listings-section {
        padding: 30px 15px;
    }
    
    .filters-sidebar {
        position: static;
        margin-bottom: 30px;
    }
}

