:root {
    --bg-color: #f8fafc;
    --header-bg: #ffffff;
    --text-color: #0f172a;
    --text-muted: #64748b;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --accent-btn: #10b981;
    --accent-btn-hover: #059669;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
}

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

/* Top Purple Banner */
.top-banner {
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    text-align: center;
    padding: 8px 15px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Header & Logo */
.main-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 900;
    color: #0f172a;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary);
}

/* Search Box */
.search-box {
    flex: 1;
    max-width: 450px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    background: #f1f5f9;
    outline: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.search-box input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Horizontal Categories Scrollbar */
.categories-bar {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
}

.categories-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
}

.categories-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.cat-pill {
    background: #f1f5f9;
    border: none;
    color: var(--text-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.cat-pill:hover, .cat-pill.active {
    background: var(--primary);
    color: #ffffff;
}

/* Section Title */
.content-area {
    padding: 30px 20px;
}

.section-title {
    margin-bottom: 25px;
}

.section-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.section-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Grid Layout */
.font-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Font Cards (Exact look as freefontdl) */
.font-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.font-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.font-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    background: #f8fafc;
}

.font-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #10b981;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.font-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.font-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.font-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.dl-btn:hover {
    background: var(--primary-hover);
}

footer {
    border-top: 1px solid var(--border-color);
    background: #fff;
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 40px;
}

@media (max-width: 640px) {
    .nav-container {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box {
        max-width: 100%;
    }
    .top-banner-link {
    text-decoration: none;
    display: block;
}
.top-banner-link:hover .top-banner {
    opacity: 0.9;
}
}
