/* ToolVersus - Professional, Human Design (Less AI) */

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

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1a202c;
    --dark-lighter: #2d3748;
    --light: #f8f9fb;
    --light-darker: #e2e8f0;
    --text: #2d3748;
    --text-light: #64748b;
    --border: #e2e8f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation - Clean & Professional */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.2s;
    letter-spacing: -0.5px;
}

.logo:hover {
    opacity: 0.8;
}

.nav-center {
    flex: 1;
    max-width: 500px;
}

.quick-search {
    position: relative;
}

.quick-search input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: var(--light);
}

.quick-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--light);
    cursor: pointer;
    transition: background 0.15s;
}

.search-result-item:hover {
    background: var(--light);
}

.search-result-item:last-child {
    border-bottom: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero - More Personality */
.hero h1 {
    letter-spacing: -1px;
}

/* Search Box - Better UX */
.search-box {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.search-box input {
    padding: 1rem 1.25rem;
    border: 2px solid var(--light-darker);
    border-radius: 12px;
    font-size: 1.05rem;
    transition: all 0.2s;
    background: var(--light);
}

.search-box input:focus {
    outline: none;
    border-color: white;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-box button {
    padding: 1.1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Stats - Better Styling */
.stats {
    display: grid;
    gap: 2rem;
    text-align: center;
}

.stat-item h2 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.25rem;
    letter-spacing: -1px;
}

.stat-item p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--dark);
    letter-spacing: -1px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Cards - Better Design */
.comparisons-grid, .tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.75rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.comparison-card, .tool-card {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.comparison-card::before, .tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.comparison-card:hover::before, .tool-card:hover::before {
    transform: scaleX(1);
}

.comparison-card:hover, .tool-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.12);
    transform: translateY(-4px);
}

.comparison-card h3, .tool-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
    font-weight: 700;
    letter-spacing: -0.3px;
}

.comparison-card p, .tool-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.category-card {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 2.5rem 2rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
    position: relative;
}

.category-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 14px;
}

.category-card:hover::after {
    opacity: 0.06;
}

.category-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.12);
    transform: translateY(-4px);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.category-card h3 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.category-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Tags */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.tag-pill {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 25px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.tag-pill:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

/* Badges */
.trending-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
}

/* Footer - Professional */
footer {
    background: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.footer-stats span {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

.footer-stats strong {
    color: white;
    font-weight: 700;
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-tags .tag-pill {
    background: var(--dark-lighter);
    border-color: var(--dark-lighter);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

.footer-tags .tag-pill:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.latest-comparisons-list {
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--dark-lighter);
    color: rgba(255, 255, 255, 0.6);
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.bg-light { background: var(--light); }

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.25rem !important; }
    .hero p { font-size: 1.1rem !important; }
    .section { padding: 3rem 0; }
    .section-title { font-size: 2rem; }
    .navbar .container { flex-direction: column; gap: 1rem; }
    .nav-center { max-width: 100%; width: 100%; }
    .nav-links { gap: 1.25rem; font-size: 0.9rem; }
    .stats { grid-template-columns: 1fr !important; gap: 1.5rem; }
    .comparisons-grid, .tools-grid, .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

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

/* Smooth Animations */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
