body {
    background-color: #f7f9fa;
}

.hero-home {
    background: transparent;
    color: #111;
    padding: 3rem 0;
    text-align: center;
}

.hero-home h1 {
    font-weight: 800;
    font-size: 2.5rem;
    color: #111;
    margin-bottom: 1rem;
}

.hero-home .lead {
    color: #474747;
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 0 auto;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.search-card:focus-within {
    border-color: #4facfe;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.2);
}

.search-input {
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #333;
    height: 48px;
}

.search-input:focus {
    box-shadow: none;
    background: transparent;
}

.btn-search {
    background: #007bff;
    color: white;
    border-radius: 6px;
    padding: 0 20px;
    height: 40px;
    font-weight: 600;
    border: none;
    transition: background 0.2s;
}

.btn-search:hover {
    background: #0056b3;
    color: white;
}

.color-picker-wrapper {
    position: relative;
    margin-right: 12px;
    margin-left: 8px;
    display: flex;
    align-items: center;
}

#color-picker-input {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-action-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #334155;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 600;
}

.hero-action-link:hover {
    border-color: #a8c1f3;
    color: #1e40af;
}

.most-used-section {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.most-used-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.most-used-card {
    display: block;
    text-decoration: none !important;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
}

.most-used-card strong {
    color: #0f172a;
    display: block;
    margin-bottom: 4px;
}

.most-used-card span {
    font-size: 0.85rem;
    color: #64748b;
}

.most-used-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.12);
}

.home-category-links a {
    color: #2563eb;
}

.home-category-links a:hover {
    color: #1d4ed8;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding-bottom: 2rem;
}

.tool-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    text-decoration: none !important;
    color: #333;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid transparent;
    height: 100%;
    position: relative;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.tool-icon-wrapper {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: white;
    font-size: 1.5rem;
    margin-right: 16px;
}

.icon-bg-1 { background-color: #ff6c6c; }
.icon-bg-2 { background-color: #6c5ce7; }
.icon-bg-3 { background-color: #00b894; }
.icon-bg-4 { background-color: #0984e3; }
.icon-bg-5 { background-color: #fdcb6e; }
.icon-bg-6 { background-color: #e17055; }
.icon-bg-7 { background-color: #636e72; }
.icon-bg-8 { background-color: #d63031; }
.icon-bg-9 { background-color: #00cec9; }

.tool-content {
    padding: 0;
    text-align: left;
}

.tool-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
    color: #111;
}

.tool-desc {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tools-group-title {
    grid-column: 1 / -1;
    margin: 0.5rem 0 0.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
}

.quick-tools-chip {
    display: inline-flex;
    align-items: center;
    margin: 0 8px 8px 0;
    padding: 6px 10px;
    border-radius: 20px;
    border: 1px solid #e1e5ea;
    background: #fff;
    color: #333;
    text-decoration: none !important;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.quick-tools-chip:hover {
    border-color: #c5d0dc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    color: #111;
}

.tool-favorite-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e1e5ea;
    background: #fff;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.tool-favorite-btn.is-favorite,
.tool-favorite-btn[aria-pressed="true"] {
    color: #f59e0b;
    border-color: #fcd34d;
}

body.theme-dark .hero-home h1,
body.theme-dark .tool-title,
body.theme-dark .most-used-card strong {
    color: #e5e7eb;
}

body.theme-dark .hero-home .lead,
body.theme-dark .tool-desc,
body.theme-dark .most-used-card span {
    color: #94a3b8;
}

body.theme-dark .hero-action-link,
body.theme-dark .most-used-card,
body.theme-dark .most-used-section {
    background: #111827;
    border-color: #334155;
    color: #cbd5e1;
}

body.theme-dark .tool-favorite-btn {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}
