* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4169E1;
    --secondary-color: #1E3A8A;
    --accent-color: #5B7FFF;
    --royal-blue-dark: #0F1B4D;
    --royal-blue-light: #6B8EFF;
    --text-color: #1a1a2e;
    --text-light: #4a5568;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 2px 8px rgba(65, 105, 225, 0.08);
    --shadow-lg: 0 12px 32px rgba(65, 105, 225, 0.15);
    --shadow-xl: 0 20px 40px rgba(65, 105, 225, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(65, 105, 225, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(65, 105, 225, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.main-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--royal-blue-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: parallax-bg 20s linear infinite;
    opacity: 0.3;
}

header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes parallax-bg {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

@keyframes shimmer {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

header h1 i {
    margin-right: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
    position: relative;
    z-index: 2;
    font-weight: 400;
}

.tagline {
    font-size: 0.95rem;
    opacity: 0.9;
    font-style: italic;
    position: relative;
    z-index: 2;
}

.search-filter-bar {
    margin: 3rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.15);
    transform: translateY(-1px);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.625rem 1.25rem;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(65, 105, 225, 0.3);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    position: relative;
    z-index: 2;
}

.tool-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(65, 105, 225, 0.05), transparent);
    transition: left 0.5s ease;
}

.tool-card:hover::before {
    left: 100%;
}

.tool-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.tool-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.tool-card-category-tag {
    flex-shrink: 0;
    padding: 0.35rem 0.65rem;
    background: var(--border-color);
    color: var(--text-light);
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tool-alternate {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

.tool-proprietary {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.tool-alternate-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.tool-replaces-name {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 0.95rem;
}

.tool-alternate-arrow {
    color: var(--border-color);
    font-size: 0.9rem;
}

.tool-open-source {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.tool-open-source-label {
    color: var(--primary-color) !important;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.tool-name-inline {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.05rem;
}

.tool-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0 0 1rem 0;
}

.tool-title-only {
    margin-bottom: 1rem;
}

.tool-title-only .tool-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.tool-title-only .tool-category {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tool-icon {
    font-size: 2rem;
    color: var(--primary-color);
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(65, 105, 225, 0.1), rgba(65, 105, 225, 0.05));
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(65, 105, 225, 0.1);
    transition: var(--transition);
}

.tool-card:hover .tool-icon {
    background: linear-gradient(135deg, rgba(65, 105, 225, 0.15), rgba(65, 105, 225, 0.1));
    transform: scale(1.1) rotate(5deg);
}

.tool-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.tool-title {
    flex: 1;
}

.tool-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.tool-category {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tool-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tag {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: linear-gradient(135deg, rgba(65, 105, 225, 0.1), rgba(65, 105, 225, 0.05));
    color: var(--primary-color);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(65, 105, 225, 0.15);
    transition: var(--transition);
}

.tag:hover {
    background: linear-gradient(135deg, rgba(65, 105, 225, 0.15), rgba(65, 105, 225, 0.1));
    transform: translateY(-1px);
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

footer {
    background: linear-gradient(135deg, var(--royal-blue-dark), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 3rem 0;
    margin-top: 5rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 -4px 20px rgba(65, 105, 225, 0.1);
}

footer .citation {
    max-width: 640px;
    margin: 0 auto 2rem;
    text-align: left;
    padding: 0 1rem;
}

footer .citation h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    opacity: 0.95;
}

footer .citation p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

footer .citation a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: underline;
    text-underline-offset: 2px;
}

footer .citation a:hover {
    color: white;
}

footer .footer-copy {
    font-size: 0.9rem;
    opacity: 0.85;
    margin: 0;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(65, 105, 225, 0.2);
    position: relative;
    overflow: hidden;
}

.tool-link::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 ease;
}

.tool-link:hover::before {
    left: 100%;
}

.tool-link:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(65, 105, 225, 0.4);
}

.tool-link i {
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        justify-content: flex-start;
    }

    .filter-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

