/* UI/UX Enhancements - v1.2.3 */

/* ===========================
   STATISTICS SECTION
   =========================== */
.stats-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-box {
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition-normal);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.stat-box:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-box:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-box:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-box:nth-child(4) {
    animation-delay: 0.4s;
}

.stat-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary-green);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-green);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    word-wrap: break-word;
    text-align: center;
    line-height: 1.2;
}

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

/* ===========================
   BESTSELLER BADGE
   =========================== */
.bestseller-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    animation: pulse 2s infinite;
    z-index: 10;
}

.bestseller-badge i {
    animation: fireFlicker 1.5s infinite;
}

@keyframes fireFlicker {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.1);
        filter: brightness(1.3);
    }
}

/* ===========================
   SERVICE RATINGS
   =========================== */
.service-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.75rem 0;
}

.service-rating .stars {
    display: flex;
    gap: 0.25rem;
    color: #ffc107;
    font-size: 0.9rem;
}

.service-rating .stars i {
    animation: starShine 2s ease-in-out infinite;
}

.service-rating .stars i:nth-child(1) { animation-delay: 0s; }
.service-rating .stars i:nth-child(2) { animation-delay: 0.1s; }
.service-rating .stars i:nth-child(3) { animation-delay: 0.2s; }
.service-rating .stars i:nth-child(4) { animation-delay: 0.3s; }
.service-rating .stars i:nth-child(5) { animation-delay: 0.4s; }

@keyframes starShine {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

.rating-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===========================
   POPULARITY INDICATOR
   =========================== */
.popularity-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--primary-green);
}

.popularity-indicator i {
    animation: chartGrow 2s ease-in-out infinite;
}

@keyframes chartGrow {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(1.2);
    }
}

/* ===========================
   PRICE COMPARISON
   =========================== */
.price-original {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: line-through;
    display: block;
    margin-bottom: 0.25rem;
}

.plan-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* ===========================
   NAVIGATION SEARCH
   =========================== */
.nav-search {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 200px;
    transition: var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    width: 250px;
}

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

.search-icon {
    position: absolute;
    right: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
}

/* ===========================
   NOTIFICATION BELL (Ready for future)
   =========================== */
.notification-bell {
    position: relative;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition-fast);
}

.notification-bell:hover {
    color: var(--primary-green);
    transform: rotate(15deg);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3b30;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    animation: notificationPulse 2s infinite;
}

@keyframes notificationPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 5px rgba(255, 59, 48, 0);
    }
}

/* ===========================
   NO SEARCH RESULTS
   =========================== */
.no-search-results {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
    animation: fadeInUp 0.5s ease forwards;
}

.no-search-results i {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-search-results h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-search-results p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .stat-box {
        padding: 1.5rem 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .bestseller-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .search-input {
        width: 150px;
    }
    
    .search-input:focus {
        width: 180px;
    }
    
    .service-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-search {
        width: 100%;
        margin: 1rem 0;
    }
    
    .search-input {
        width: 100%;
    }
    
    .search-input:focus {
        width: 100%;
    }
}
