/* Tools Page Styling */
.left-and-main-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    position: fixed;
    top: 60px;
    width: 100%;
    height: calc(100vh - 60px);
    background-color: #0d1518;
    z-index: 5;
}

.main-container {
    padding: 10px 10px 20px;
    display: flex;
    justify-content: start;
    align-items: center;
    flex-direction: column;
    overflow-y: auto;
}

.tools-hero-section {
    max-width: 800px;
    width: 100%;
    text-align: center;
    padding-top: 20px;
}

.tools-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.tools-icon svg {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.tools-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.tools-title a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.tools-title a:hover {
    opacity: 0.8;
}

.tools-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin: 0 0 48px 0;
    font-weight: 400;
    opacity: 0.9;
}

.tools-search-container {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.tools-search-bar {
    position: relative;
    width: 100%;
    max-width: 800px;
    display: flex;
    align-items: center;
    background: #acacac;
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tools-search-icon {
    position: absolute;
    left: 16px;
    color: #64748b;
    pointer-events: none;
    z-index: 2;
}

.tools-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 16px 16px 16px 48px;
    font-size: 1rem;
    background: transparent;
    color: #1e293b;
    border-radius: 8px;
    font-weight: 400;
}

.tools-search-input::placeholder {
    color: #64748b;
    font-style: italic;
}

.tools-search-button {
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
}

.tools-search-button:hover {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.tools-search-button:active {
    transform: translateY(0);
}

.tools-separator {
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 48px auto 32px;
    box-shadow: 0 1px 3px rgba(255, 255, 255, 0.1);
}

.main-tools-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.main-tools-header-container {
    display: flex;
    justify-content: center;
    width: 100%;
    align-items: center;
    padding: 20px 0;
    gap: 20px;
    flex-wrap: wrap;
}

.tools-filters-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tools-filters-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tools-filters-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Category Dropdown */
.category-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.category-select {
    appearance: none;
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 6px;
    color: #ffffff;
    padding: 10px 35px 10px 15px;
    font-size: 14px;
    cursor: pointer;
    min-width: 200px;
    outline: none;
}

.category-select:focus {
    border-color: #4a9eff;
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

.dropdown-arrow {
    position: absolute;
    right: 12px;
    color: #ffffff;
    pointer-events: none;
}

/* Sort Filters */
.sort-filters {
    display: flex;
    gap: 8px;
}

.sort-filter {
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 6px;
    color: #ffffff;
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sort-filter:hover {
    background: #3a3a3a;
    border-color: #505050;
}

.sort-filter.active {
    background: #4a9eff;
    border-color: #4a9eff;
    color: #ffffff;
}

.sort-filter.active:hover {
    background: #3b82f6;
    border-color: #3b82f6;
}

.sort-icon {
    width: 16px;
    height: 16px;
    color: currentColor;
}

/* Pricing Filters */
.pricing-filters {
    display: flex;
    gap: 8px;
}

.pricing-filter {
    background: #2a2a2a;
    border: 1px solid #404040;
    border-radius: 6px;
    color: #ffffff;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.pricing-filter:hover {
    background: #3a3a3a;
    border-color: #505050;
}

.pricing-filter.active {
    background: #4a9eff;
    border-color: #4a9eff;
    color: #ffffff;
}

.pricing-filter.active:hover {
    background: #3b82f6;
    border-color: #3b82f6;
}



.tools-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 24px;
}

/* Loading Spinner Styles */
.tools-loading {
    display: none; /* Hidden by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    width: 100%;
    min-height: 200px;
}

.loading-spinner {
    margin-bottom: 16px;
}

.spinner-icon {
    color: #4a9eff;
    animation: spin 2s linear infinite;
}

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

.loading-text {
    font-size: 16px;
    color: #a0a0a0;
    font-weight: 500;
    text-align: center;
}

.tool-category {
    display: flex;
    align-items: center;
    justify-content: start;
    flex-direction: column;
    width: 100%;
    min-height: 200px;
    background-color: #2a2a2a;
    border-radius: 12px;
}

.tool-category-header {
    font-size: 20px;
    font-weight: 600;
    padding: 12px;
    cursor: pointer;
}
.category-separator {
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    margin-bottom: 4px;
}

.tool-category-items-container {
    display: flex;
    align-items: start;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    padding: 8px;
    flex: 1;
}

/* When there's no show-more button, reduce spacing and prevent expansion */
.tool-category:not(:has(.tool-category-show-more)) {
    min-height: auto;
}

.tool-category:not(:has(.tool-category-show-more)) .tool-category-items-container {
    flex: none;
    padding: 8px 8px 12px 8px;
    max-height: none;
}

/* Fallback for browsers that don't support :has() */
.tool-category.no-show-more {
    min-height: auto;
}

.tool-category.no-show-more .tool-category-items-container {
    flex: none;
    padding: 8px 8px 12px 8px;
    max-height: none;
}

/* Custom scrollbar styling */
.tool-category-items-container::-webkit-scrollbar,
.tools-search-dropdown::-webkit-scrollbar {
    width: 8px;
}

.tool-category-items-container::-webkit-scrollbar-track,
.tools-search-dropdown::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.tool-category-items-container::-webkit-scrollbar-thumb,
.tools-search-dropdown::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.tool-category-items-container::-webkit-scrollbar-thumb:hover,
.tools-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.tool-category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1 1 300px;
    min-width: 280px;
    max-width: 400px;
    height: 60px;
    background: #363636;
    border: 1px solid #404040;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
}
.tool-category-item-icon-name {
    display: flex;
    align-items: center;
    justify-content: start;
}
.tool-category-item-info {
    display: flex;
    align-items: center;
    justify-content: start;
}
.tool-category-item-upvotes-posts-container {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 4px;
}
.tool-category-item:hover {
    background: #3a3a3a;
}

.tool-category-item-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #a0a0a0;
}

.tool-category-item-stat svg {
    color: #a0a0a0;
}

.tool-category-item-stat span {
    color: #a0a0a0;
}

/* Show More Button */
.tool-category-show-more {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 12px 8px 8px;
}

.show-more-btn {
    background: transparent;
    border: 1px solid #404040;
    border-radius: 6px;
    color: #ffffff;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.show-more-btn:hover {
    background: #3a3a3a;
    border-color: #505050;
}

.show-more-btn:active {
    transform: translateY(1px);
}

.show-more-icon {
    width: 16px;
    height: 16px;
    color: currentColor;
    transition: transform 0.2s ease;
}

.show-more-btn.expanded .show-more-icon {
    transform: rotate(180deg);
}

/* Don't rotate icon for Load More buttons - they should always point down */
.show-more-btn.expanded .show-more-icon:has(+ span:contains("Load More")) {
    transform: rotate(0deg);
}

/* Alternative approach: Use a class-based solution */
.show-more-btn.load-more .show-more-icon {
    transform: rotate(0deg) !important;
}

/* No Tools Found Message */
.no-tools-message {
    width: 100%;
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.no-tools-content {
    text-align: center;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.no-tools-icon {
    color: #666;
    opacity: 0.7;
}

.no-tools-title {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.no-tools-description {
    font-size: 16px;
    color: #a0a0a0;
    line-height: 1.5;
    margin: 0;
}

.clear-filters-btn {
    background: #4a9eff;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.clear-filters-btn:hover {
    background: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.clear-filters-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-tools-header-container {
        gap: 16px;
        padding: 16px 0;
    }
    
    .tools-filters-left,
    .tools-filters-center,
    .tools-filters-right {
        gap: 12px;
    }
    
    .category-select {
        min-width: 180px;
        font-size: 13px;
    }
    
    .sort-filter,
    .pricing-filter {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .main-tools-header-container {
        flex-direction: column;
        gap: 16px;
        padding: 16px 10px;
    }
    
    .tools-filters-left,
    .tools-filters-center,
    .tools-filters-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .category-dropdown {
        width: 100%;
        max-width: 300px;
    }
    
    .category-select {
        width: 100%;
        min-width: auto;
    }
    
    .sort-filters {
        justify-content: center;
        width: 100%;
    }
    
    .pricing-filters {
        justify-content: center;
        width: 100%;
    }
    
    .tool-category {
        height: 400px;
    }
    
    .tool-category.no-show-more {
        height: auto;
        min-height: auto;
    }
    
    .tool-category-items-container {
        max-height: 350px;
    }
    
    .tool-category.no-show-more .tool-category-items-container {
        max-height: none;
    }
    
    .tool-category-item {
        flex: 1 1 280px;
        min-width: 250px;
        max-width: none;
    }
}

@media (max-width: 640px) {
    .tools-filters-center .sort-filters,
    .tools-filters-right .pricing-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
        max-width: 300px;
    }
    
    .sort-filter,
    .pricing-filter {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .main-tools-header-container {
        padding: 12px 8px;
        gap: 12px;
    }
    
    .tools-filters-left,
    .tools-filters-center,
    .tools-filters-right {
        gap: 6px;
    }
    
    .category-select {
        padding: 8px 30px 8px 12px;
        font-size: 12px;
    }
    
    .sort-filter,
    .pricing-filter {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 70px;
    }
    
    .tools-filters-center .sort-filters,
    .tools-filters-right .pricing-filters {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .tool-category {
        height: 500px;
    }
    
    .tool-category.no-show-more {
        height: auto;
        min-height: auto;
    }
    
    .tool-category-items-container {
        max-height: 450px;
    }
    
    .tool-category.no-show-more .tool-category-items-container {
        max-height: none;
    }
    
    .tool-category-item {
        flex: 1 1 100%;
        min-width: 200px;
        max-width: none;
    }
}
