:root {
    --primary: #2d5a8e;
    --primary-dark: #1e3d5f;
    --accent: #e8a825;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #dddddd;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    padding: 2rem;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo .accent {
    color: var(--accent);
}

.tagline {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-top: 0.25rem;
}

/* Navigation */
nav {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.search-container {
    max-width: 1200px;
    margin: 0 auto 1rem;
}

#search-box {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}

#search-box:focus {
    border-color: var(--primary);
}

.category-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    color: var(--text);
}

.category-btn:hover {
    background: var(--bg);
    border-color: var(--primary);
}

.category-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    width: 100%;
    flex: 1;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.result-count {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* App Grid */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.app-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.app-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.app-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.app-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: contain;
}

.app-card-header h3 {
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
}

.app-description {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.app-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.app-category {
    font-size: 0.75rem;
    background: var(--bg);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-download {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    transition: background 0.2s;
}

.app-download:hover {
    background: var(--primary-dark);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: white;
    padding: 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.footer-section p,
.footer-section li {
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-section a:hover {
    opacity: 1;
}

.copyright {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 1.5rem 1rem;
    }

    .logo h1 {
        font-size: 1.6rem;
    }

    nav {
        padding: 0.75rem 1rem;
    }

    main {
        padding: 1rem;
    }

    .app-grid {
        grid-template-columns: 1fr;
    }
}
