/* Main Content Styles */
main {
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

/* Hero Section */
.hero-section {
    padding: 100px 0 80px;
    position: relative;
    background: transparent;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.hero-image {
    position: relative;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-element {
    position: relative;
    width: 300px;
    height: 300px;
}

.chip {
    position: absolute;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 14px;
    color: #00ffff;
    animation: float 6s ease-in-out infinite;
}

.chip:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.chip:nth-child(2) {
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.chip:nth-child(3) {
    bottom: 30%;
    left: 15%;
    animation-delay: 2s;
}

.chip:nth-child(4) {
    bottom: 20%;
    right: 20%;
    animation-delay: 3s;
}

.chip:nth-child(5) {
    top: 40%;
    left: 30%;
    animation-delay: 4s;
}

.chip:nth-child(6) {
    bottom: 10%;
    left: 40%;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.gradient-text {
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Stats Section */
.stats-section {
    background: rgba(15, 15, 35, 0.5);
}

.stat-box {
    padding: 20px;
    border-radius: 15px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 0 10px 20px rgba(0, 255, 255, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00ffff;
    margin-bottom: 0.5rem;
    font-family: 'Orbitron', sans-serif;
}

.stat-label {
    color: #a0a0ff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Search & Filters */
.search-filters {
    background: rgba(11, 2, 35, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #00ffff;
    z-index: 3;
}

.search-input {
    padding-left: 45px;
    padding-right: 40px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    color: #fff;
    border-radius: 10px;
    height: 50px;
}

.search-input:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    color: #fff;
}

.btn-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #666;
    z-index: 3;
}

.btn-clear:hover {
    color: #ff0000;
}

.filter-group {
    margin-bottom: 0;
}

.filter-label {
    color: #a0a0ff;
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: block;
}

.filter-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    color: #fff;
    border-radius: 10px;
    height: 50px;
}

.filter-select:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    color: #fff;
}

.pricing-filter {
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
}

.form-check-input.pricing-check {
    background-color: transparent;
    border: 2px solid rgba(0, 255, 255, 0.5);
    width: 18px;
    height: 18px;
    margin-right: 5px;
}

.form-check-input.pricing-check:checked {
    background-color: #00ffff;
    border-color: #00ffff;
}

.form-check-label {
    color: #fff;
    margin-right: 15px;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-badge {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00ffff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.filter-badge .remove-filter {
    cursor: pointer;
    color: #ff6666;
    margin-left: 5px;
}

.results-count {
    color: #a0a0ff;
    font-size: 0.9rem;
}

/* Tools Grid */
.tools-section {
    background: transparent;
}

.tool-card {
    background: rgba(11, 2, 35, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 0 15px 30px rgba(0, 255, 255, 0.15);
}

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

.tool-card-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.tool-rank {
    background: linear-gradient(135deg, #00ffff, #0088ff);
    color: #000;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
}

.tool-title {
    flex: 1;
    margin: 0 15px;
}

.tool-title h5 {
    color: #fff;
    margin-bottom: 5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #a0a0ff;
}

.tool-rating {
    color: #ffcc00;
    font-weight: 500;
}

.tool-visits {
    color: #00ffff;
}

.tool-card-body {
    padding: 15px 20px;
    flex-grow: 1;
}
.tool-description {
    color: #ccccff;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tool-tag {
    background: rgba(0, 255, 255, 0.1);
    color: #00ffff;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.tool-card-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-pricing {
    font-size: 0.85rem;
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: 500;
    text-transform: capitalize;
}

.pricing-free {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.2);
}

.pricing-paid {
    background: rgba(255, 0, 0, 0.1);
    color: #ff6666;
    border: 1px solid rgba(255, 0, 0, 0.2);
}

.pricing-freemium {
    background: rgba(255, 165, 0, 0.1);
    color: #ffaa00;
    border: 1px solid rgba(255, 165, 0, 0.2);
}

.btn-visit {
    background: linear-gradient(90deg, #00ffff, #0088ff);
    color: #000;
    border: none;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.btn-visit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3);
    color: #000;
}

/* Pagination */
.pagination-container {
    background: rgba(11, 2, 35, 0.8);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.page-item .page-link {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    color: #00ffff;
    margin: 0 5px;
    border-radius: 10px;
    min-width: 45px;
    text-align: center;
    transition: all 0.3s ease;
}

.page-item.active .page-link {
    background: linear-gradient(90deg, #00ffff, #0088ff);
    border-color: #00ffff;
    color: #000;
    font-weight: 700;
}

.page-item:not(.active) .page-link:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00ffff;
    transform: translateY(-2px);
}

.page-item.disabled .page-link {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 255, 255, 0.1);
    color: rgba(0, 255, 255, 0.3);
}

/* Categories Section */
.categories-section {
    background: transparent;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
}

.category-card {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 0 10px 20px rgba(0, 255, 255, 0.1);
}

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

.category-icon {
    font-size: 2.5rem;
    color: #00ffff;
    margin-bottom: 15px;
}

.category-title {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.category-count {
    color: #a0a0ff;
    font-size: 0.9rem;
    background: rgba(0, 255, 255, 0.1);
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

/* How-to Section */
.how-to-section {
    background: transparent;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
}

.how-to-steps {
    margin-top: 30px;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.step-number {
    background: linear-gradient(135deg, #00ffff, #0088ff);
    color: #000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    margin-right: 15px;
    flex-shrink: 0;
}

.step-content h5 {
    color: #00ffff;
    margin-bottom: 5px;
    font-weight: 600;
}

.step-content p {
    color: #ccccff;
    margin-bottom: 0;
}

.feature-card {
    background: rgba(11, 2, 35, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 15px;
    height: 100%;
}

/* Loading Indicator */
#loadingIndicator {
    display: block;
}

.spinner-border.text-neon {
    border-color: #00ffff transparent #00ffff transparent;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0 60px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .tool-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tool-rank {
        margin-bottom: 10px;
    }
    
    .tool-meta {
        flex-wrap: wrap;
    }
    
    .pricing-filter {
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
    }
    
    .form-check-label {
        margin-right: 10px;
    }
}

/* Animation for tool cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

/* Stagger animation for cards */
.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }
.tool-card:nth-child(6) { animation-delay: 0.6s; }
.tool-card:nth-child(7) { animation-delay: 0.7s; }
.tool-card:nth-child(8) { animation-delay: 0.8s; }
.tool-card:nth-child(9) { animation-delay: 0.9s; }
.tool-card:nth-child(10) { animation-delay: 1.0s; }
.tool-card:nth-child(11) { animation-delay: 1.1s; }
.tool-card:nth-child(12) { animation-delay: 1.2s; }
.tool-card:nth-child(13) { animation-delay: 1.3s; }
.tool-card:nth-child(14) { animation-delay: 1.4s; }
.tool-card:nth-child(15) { animation-delay: 1.5s; }

@media (min-width: 992px) {

    /* Whole row vertically aligned */
    .search-filters .row.g-4 > div {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Uniform label styling for Search / Category / Pricing */
    .filter-group {
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .filter-label {
        color: #a0a0ff;
        font-size: 0.9rem;
        margin-bottom: 6px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    /* Search box height consistent with others */
    .search-box {
        height: 50px;
        display: flex;
        align-items: center;
        position: relative;
    }

    .search-input {
        height: 50px !important;
    }

    .search-icon,
    .btn-clear {
        top: 50%;
        transform: translateY(-50%);
    }

    /* Pricing row alignment fix */
    .pricing-filter {
        height: 50px;
        align-items: center;
    }

}
