body {
    margin: 0;
    font-family: system-ui, -apple-system, sans-serif;
    background: #f1f5f9;
    padding-bottom: 110px; /* Space for bottom nav */
    color: #334155;
    transition: background 0.3s, color 0.3s;
}

/* --- Header --- */
.topbar {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Circular Logo  */
.logo {
    width: 42px;
    height: 42px;
    margin-right: 12px;
    border-radius: 50%;
    object-fit: cover;
}

.title {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.title b { font-size: 22px; font-weight: 700; }
.title small { font-size: 15px; color: #64748b; }

.loginBtn {
    margin-left: auto;
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
}

/* --- Slider --- */
.slider { padding: 0 10px; }
.slider img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 18px;
    margin: 10px 0;
    display: block;
}

/* --- Search --- */
#search {
    width: calc(100% - 48px); /* Account for padding/margin */
    display: block;
    margin: 10px auto;
    padding: 14px;
    border: none;
    border-radius: 16px;
    background: #e2e8f0;
    font-size: 16px;
}

/* --- Chips --- */
.chips {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 0 14px 10px;
    scrollbar-width: none;
}
.chip {
    background: #e5e7eb;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 18px;
    border: none;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s;
}
.chip.active { background: #2563eb; color: white; }

/* --- Content Grid --- */
#content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 12px;
}

.card {
    background: #fff;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    transition: transform 0.25s;
}
.card:hover { transform: translateY(-3px); }

/* Circular App Icons  */
.icon {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card h4 { margin: 8px 0; font-size: 20px; }

/* Buttons */
.btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}
.open { background: #2563eb; }
.info { background: #64748b; }
.btn:active { transform: scale(0.96); }

/* Favorite Heart Icon */
.fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #cbd5e1;
    transition: color 0.2s;
}
.fav-btn.active { color: #ef4444; } /* Red heart when active */

/* --- Bottom Nav  --- */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: #fff;
    border-radius: 30px;
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 100;
}

.bottom-nav button {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
}
.bottom-nav button svg { stroke: currentColor; }

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px 0;
}
.pagination button {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #e2e8f0;
    cursor: pointer;
}
.pagination button.active { background: #2563eb; color: white; }

/* --- Dark Mode [cite: 22] --- */
body.dark { background: #0f172a; color: #f8fafc; }
body.dark .topbar,
body.dark .bottom-nav,
body.dark .card { background: #1e293b; color: #fff; }
body.dark #search { background: #334155; color: #fff; }
body.dark .chip { background: #334155; color: #fff; }
body.dark .title small { color: #94a3b8; }
body.dark .fav-btn { background: rgba(30, 41, 59, 0.8); }
