* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #581c87 50%, #0f172a 100%);
    min-height: 100vh;
    color: #fff;
}

.header {
    background: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: #c084fc;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tool-count {
    color: #d8b4fe;
    font-size: 0.875rem;
}

.admin-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #d8b4fe;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.admin-link:hover {
    background: rgba(168, 85, 247, 0.2);
    color: white;
    border-color: rgba(168, 85, 247, 0.5);
}

.support-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.support-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f0f0f0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.hero {
    text-align: center;
    margin-bottom: 0rem;
    padding: 11px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

/* Statistics Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.stat-card i {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    opacity: 0.8;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.filter-section {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.search-filters {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-box, .sort-box {
    position: relative;
}

.search-input, .sort-select {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 0.75rem;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.sort-select {
    background: rgba(0, 0, 0, 0.6) !important;
    cursor: pointer;
    color: #ffffff !important;
    font-weight: 500;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23c084fc' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.sort-select option {
    background: #0f172a !important;
    color: #ffffff !important;
    padding: 8px 12px;
    border: none;
    font-weight: 500;
}

.sort-select option:hover,
.sort-select option:focus {
    background: #1e293b !important;
    color: #c084fc !important;
}

.sort-select:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(168, 85, 247, 0.5);
}

.search-input::placeholder {
    color: #d8b4fe;
}

.search-input:focus, .sort-select:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #d8b4fe;
    width: 20px;
    height: 20px;
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    color: #e9d5ff;
    position: relative;
    z-index: 1;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.category-btn:active {
    transform: translateY(0);
}

.category-btn.active {
    background: #a855f7;
    color: white;
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.5);
}

.category-btn.active:hover {
    background: #9333ea;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(168, 85, 247, 0.6);
}

.category-icon {
    width: 16px;
    height: 16px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tool-card {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(168, 85, 247, 0.2);
    transition: all 0.3s;
}

.tool-card:hover {
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.2);
    transform: translateY(-4px);
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.tool-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    transition: color 0.3s;
}

.tool-card:hover .tool-title {
    color: #d8b4fe;
}

.tool-price {
    font-size: 0.875rem;
    color: #d8b4fe;
}

.trending-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(168, 85, 247, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    color: #c084fc;
}

.trending-icon {
    width: 14px;
    height: 14px;
}

.tool-description {
    color: #e9d5ff;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
}

.star-icon {
    width: 16px;
    height: 16px;
    color: #fbbf24;
    fill: #fbbf24;
}

.users {
    color: #d8b4fe;
    font-size: 0.875rem;
}

.visit-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.visit-btn:hover {
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}

.visit-btn:active {
    transform: translateY(0);
}

.visit-btn: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;
}

.visit-btn:hover:before {
    left: 100%;
}

.external-icon {
    width: 16px;
    height: 16px;
}

.no-results {
    text-align: center;
    padding: 4rem 0;
    color: #d8b4fe;
    font-size: 1.125rem;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    grid-column: 1 / -1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(168, 85, 247, 0.2);
    border-left-color: #a855f7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 2px dashed rgba(168, 85, 247, 0.3);
}

.no-results i {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #fff;
}

.no-results p {
    color: #e9d5ff;
    opacity: 0.8;
    max-width: 400px;
    margin: 0 auto;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.error-message i {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: #f87171;
}

.error-message h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #fff;
}

.error-message p {
    color: #fca5a5;
    opacity: 0.9;
    max-width: 400px;
    margin: 0 auto 24px auto;
}

.retry-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.footer {
    background: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    margin-top: 4rem;
    padding: 2rem 0;
    text-align: center;
    color: #d8b4fe;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
}

/* Additional dropdown fixes for maximum visibility */
select {
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.8) !important;
}

select option {
    background: #0f172a !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    padding: 8px 12px !important;
}

/* Webkit-specific dropdown styling */
select::-webkit-select-placeholder {
    color: #ffffff !important;
}

/* Firefox-specific dropdown styling */
select:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 #ffffff;
}

.category-btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .search-filters {
        grid-template-columns: 1fr;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Professional Floating Chat Widget */
.floating-chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50px;
    padding: 0.875rem 1.5rem;
    display: flex !important;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
    transition: all 0.3s ease;
    z-index: 9999;
    animation: slideInUp 0.6s ease-out, pulse 3s infinite 2s;
    -webkit-user-select: none;
    user-select: none;
    border: none;
    outline: none;
    min-width: 200px;
    opacity: 1 !important;
    visibility: visible !important;
}

.floating-chat-widget:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(34, 197, 94, 0.6);
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.floating-chat-widget:active {
    transform: translateY(-1px) scale(1.01);
}

.chat-widget-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

.chat-widget-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
    flex-shrink: 0;
}

.chat-widget-text {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    letter-spacing: 0.025em;
}

/* Animations */
@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 8px 25px rgba(34, 197, 94, 0.6), 0 0 0 8px rgba(34, 197, 94, 0.1);
    }
}

/* Focus styles for accessibility */
.floating-chat-widget:focus {
    outline: 3px solid rgba(34, 197, 94, 0.5);
    outline-offset: 2px;
}

/* Mobile responsive design */
@media (max-width: 768px) {
    .floating-chat-widget {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem 1.25rem;
        min-width: 180px;
    }
    
    .chat-widget-text {
        font-size: 0.8125rem;
    }
    
    .chat-widget-icon {
        width: 18px;
        height: 18px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .floating-chat-widget {
        padding: 0.625rem 1rem;
        min-width: 160px;
    }
    
    .chat-widget-content {
        gap: 0.5rem;
    }
    
    .chat-widget-text {
        font-size: 0.75rem;
    }
}