:root {
    --bg-color: #f8fafc; /* Lighter slate bg */
    --card-bg: rgba(255, 255, 255, 0.85);
    --border-color: rgba(0, 0, 0, 0.05);
    --glass-grad: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));
    --text-primary: #0f172a; /* Dark slate */
    --text-secondary: #475569; /* Medium slate */
    --navbar-bg: rgba(255, 255, 255, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main.content-wrapper {
    flex: 1;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
}

/* Background floating glow spheres aesthetics (Subtle for Light Mode) */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -2;
    opacity: 0.12;
    animation: float 20s ease-in-out infinite;
}

.glow-1 {
    width: 450px;
    height: 450px;
    background: #6366f1; /* purple */
    top: -150px;
    left: -100px;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: #ec4899; /* pink */
    bottom: -80px;
    right: -80px;
    animation-delay: -5s;
}

.glow-3 {
    width: 350px;
    height: 350px;
    background: #14b8a6; /* teal */
    top: 40%;
    left: 45%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Navbar top container skeleton style */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    background: var(--navbar-bg);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar {
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    padding: 0.5rem 2rem;
}

.top-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
}

.top-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.top-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

@media (max-width: 968px) {
    .top-nav {
        display: none;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: #6366f1;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #0f172a;
}

.logo-text .accent {
    color: #6366f1;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 380px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.search-input:focus {
    outline: none;
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
}

/* Main Content Wrapper for page grid */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: #0f172a;
}

.text-gradient {
    background: linear-gradient(135deg, #4f46e5 0%, #d946ef 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Scrollable categorization filter pills styling */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filter-tabs::-webkit-scrollbar {
    height: 4px;
}

.tab-btn {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
    padding: 0.625rem 1.25rem;
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.tab-btn:hover {
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-primary);
}

.tab-btn.active {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    color: #4f46e5;
}

/* Ultimate Cards Container grid systems */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5); /* Lighter border for light mode */
    border-radius: 20px;
    padding: 1.5rem;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.08);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% -20%, var(--accent-color), transparent 60%);
    opacity: 0.04; /* Lower for light mode */
    transition: opacity 0.3s ease;
    z-index: 0;
}

.tool-card:hover .card-glow {
    opacity: 0.08;
}

.card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.icon-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.tool-card:hover .icon-box {
    transform: rotate(4deg) scale(1.05);
}

.category-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-secondary);
}

.tool-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.tool-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.card-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    padding-top: 1rem;
    display: flex;
    margin-top: auto;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.2s ease;
    width: 100%;
}

.action-btn i {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.tool-card:hover .action-btn i {
    transform: translate(2px, -2px);
}

.tool-card:hover .action-btn {
    color: var(--accent-color);
}

.footer {
    text-align: center;
    padding: 3rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    background: #ffffff;
}

/* Filter Animation transition triggers */
.tool-card {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
    .hero-title { font-size: 2.5rem; }
    .navbar { padding: 1rem; }
}

/* Like Button Styles */
.like-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}
.like-btn:hover {
    background: rgba(0, 0, 0, 0.02);
    transform: translateY(-1px);
}
.like-btn.liked {
    background: rgba(236, 72, 153, 0.06);
    border-color: rgba(236, 72, 153, 0.2);
    color: #ec4899;
}
.like-btn i {
    width: 18px;
    height: 18px;
}
.actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
