:root {
    /* Light Theme Colors */
    --primary: #4f46e5;
    /* Indigo */
    --primary-hover: #4338ca;
    --secondary: #10b981;
    /* Emerald */
    --accent: #f59e0b;
    /* Amber */
    --background: #f8fafc;
    --surface: rgba(255, 255, 255, 0.8);
    /* Glassmorphism base */
    --text: #1e293b;
    --text-light: #64748b;
    --border: rgba(226, 232, 240, 0.8);

    /* Gradients */
    --gradient-main: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
    --gradient-hover: linear-gradient(135deg, #4338ca 0%, #7e22ce 100%);
    --gradient-text: linear-gradient(to right, #4f46e5, #9333ea, #ec4899);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.3);

    /* Spacing */
    --radius: 1rem;
    --header-height: 80px;
}

[data-theme="dark"] {
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --secondary: #34d399;
    --accent: #fbbf24;
    --background: #0f172a;
    --surface: rgba(30, 41, 59, 0.7);
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --border: rgba(51, 65, 85, 0.7);

    --gradient-main: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
.navbar {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.6);
}

.navbar .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-main);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: var(--shadow-glow);
}

.logo-text {
    background: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: transform 0.2s;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--surface);
    backdrop-filter: blur(12px);
    padding: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s;
    z-index: 99;
    display: none;
    flex-direction: column;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Tool Cards */
.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.like-wrapper {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    z-index: 10;
}

.like-btn {
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.like-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.8);
}

.heart-icon {
    fill: transparent;
    stroke: #64748b;
    stroke-width: 2px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.like-btn.liked .heart-icon {
    fill: #ef4444;
    stroke: #ef4444;
    transform: scale(1.1);
}

.like-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.tool-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.tool-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.tool-desc {
    color: var(--text-light);
    flex-grow: 1;
}

.tool-link {
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Tool Layout */
.tool-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    padding: 2rem 0;
}

.tool-main {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    backdrop-filter: blur(8px);
}

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tool-workspace {
    margin-bottom: 2rem;
}

.tool-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    backdrop-filter: blur(8px);
}

.sidebar-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Section Titles */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: var(--gradient-text);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Footer */
.footer {
    background: rgba(15, 23, 42, 0.95);
    color: #f1f5f9;
    padding: 3rem 0 1rem;
    margin-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand p {
    color: #94a3b8;
    margin-top: 1rem;
}

.footer-col h4 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #6366f1;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #94a3b8;
}

/* Forms */
input,
textarea,
select {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

/* Responsive */
@media (max-width: 1024px) {
    .tool-layout {
        grid-template-columns: 1fr;
    }

    .tool-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}