/* assets/css/style.css */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --bg-dark: #09090b;
    --bg-dark-card: #18181b;
    --border-dark: rgba(255, 255, 255, 0.08);

    --bg-light: #fafafa;
    --bg-light-card: #ffffff;
    --border-light: rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Outfit', sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease;
    letter-spacing: -0.01em;
}

/* Base Themes */
[data-bs-theme="dark"] {
    background-color: var(--bg-dark);
    color: #f4f4f5;
}

[data-bs-theme="light"] {
    background-color: var(--bg-light);
    color: #18181b;
}

/* Typography Enhancements */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.03em;
}

/* Glassmorphism Navbar */
.glass-nav {
    background: rgba(9, 9, 11, 0.7) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-dark);
    transition: all 0.3s ease;
}

[data-bs-theme="light"] .glass-nav {
    background: rgba(255, 255, 255, 0.8) !important;
    border-bottom: 1px solid var(--border-light);
}

.navbar-brand {
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.4rem;
}

/* Button & Focus Override */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: 99px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
}

.btn-outline-primary {
    border-color: #6366f1;
    color: #6366f1;
    border-radius: 99px;
}

.btn-outline-primary:hover {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}

/* Hero Section */
.hero-section {
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

/* Animated gradient blob background behind hero */
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 10%;
    width: 80vw;
    height: 80vw;
    max-width: 800px;
    max-height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.15) 50%, rgba(9, 9, 11, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(60px);
}

[data-bs-theme="light"] .hero-section::before {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 50%, rgba(250, 250, 250, 0) 70%);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(to right, #ffffff, #a1a1aa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-bs-theme="light"] .hero-title {
    background: linear-gradient(to right, #09090b, #52525b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-wrapper {
    position: relative;
    max-width: 650px;
    margin: 0 auto;
    transition: all 0.3s;
}

.search-wrapper .form-control {
    border-radius: 99px;
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-dark);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    backdrop-filter: blur(10px);
    font-size: 1.1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="light"] .search-wrapper .form-control {
    border: 1px solid var(--border-light);
    background: #fff;
    color: #18181b;
}

.search-wrapper .form-control:focus {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25);
    border-color: #6366f1;
}

#searchResults {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(24, 24, 27, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    display: none;
    text-align: left;
    overflow: hidden;
}

[data-bs-theme="light"] #searchResults {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--border-light);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.search-item {
    display: flex;
    padding: 12px 20px;
    color: var(--bs-body-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-dark);
    transition: all 0.2s;
    align-items: center;
}

[data-bs-theme="light"] .search-item {
    border-bottom-color: var(--border-light);
}

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

.search-item:hover {
    background: rgba(99, 102, 241, 0.1);
    padding-left: 25px;
    /* Slight micro-animation */
}

/* Tool Cards Enhancements */
.tool-card {
    border: 1px solid var(--border-dark);
    background: var(--bg-dark-card);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
}

[data-bs-theme="light"] .tool-card {
    background: var(--bg-light-card);
    border-color: var(--border-light);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(99, 102, 241, 0.3);
}

[data-bs-theme="light"] .tool-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(99, 102, 241, 0.3);
}

.tool-img-wrapper {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.tool-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.tool-card:hover .tool-img {
    transform: scale(1.08);
    /* Zoom effect */
}

.tool-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

/* Subtle gradient border over tool card */
.tool-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 10;
}

/* Badges */
.badge {
    padding: 0.4em 0.8em;
    border-radius: 99px;
    font-weight: 600;
}

.bg-success {
    background-color: #10b981 !important;
    color: #fff !important;
}

.bg-primary {
    background-color: #6366f1 !important;
    color: #fff !important;
}

.bg-warning {
    background-color: #f59e0b !important;
    color: #fff !important;
}

/* Category Labels & Text */
.text-primary {
    color: #818cf8 !important;
}

[data-bs-theme="light"] .text-primary {
    color: #4f46e5 !important;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
}

/* Layout Specific Heights */
.main-content {
    min-height: 85vh;
}

footer {
    border-top: 1px solid var(--border-dark);
}

[data-bs-theme="light"] footer {
    border-top: 1px solid var(--border-light);
    background-color: var(--bg-light-card) !important;
}