:root {
    --bg-color: #f2f2f7;
    --card-bg: #ffffff;
    --primary-color: #007aff;
    --border-color: #e5e5ea;
    --gray-icon: #8e8e93;
    --header-bg: rgba(255, 255, 255, 0.9);
}

body {
    font-family: -apple-system, system-ui, sans-serif;
    background-color: var(--bg-color);
    margin: 0; padding-top: 80px; padding-bottom: 90px;
    overflow-x: hidden;
}

#app-content { padding: 12px; max-width: 500px; margin: 0 auto; }

/* --- Top Bar (Header) Styling --- */
.top-bar {
    position: fixed; top: 0; left: 0; right: 0;
    height: 70px; background-color: var(--header-bg);
    backdrop-filter: blur(15px); border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; padding: 0 12px; gap: 8px; z-index: 1000;
}

.header-left, .header-right { display: flex; gap: 8px; align-items: center; }

/* دروستکردنی بازنەکان ڕێک وەک وێنەکە */
.circle-icon {
    width: 42px; height: 42px; 
    background-color: #e5e5ea; border-radius: 50%; 
    display: flex; justify-content: center; align-items: center; 
    color: #1c1c1e; position: relative; cursor: pointer; flex-shrink: 0;
}

.circle-icon i { font-size: 18px; }

/* بازنەی ناوەڕاستی iPA */
.ipa-circle span { font-size: 13px; font-weight: 700; }

/* Search Bar */
.search-container { flex: 1; position: relative; margin: 0 4px; }
.top-search-input {
    width: 100%; height: 40px; background-color: #e5e5ea;
    border: none; border-radius: 20px; padding: 0 15px 0 40px;
    color: #1c1c1e; font-size: 15px; outline: none;
}
.search-icon { position: absolute; left: 14px; top: 13px; color: var(--gray-icon); font-size: 14px; }

/* Notification Badge */
.badge {
    position: absolute; top: -2px; right: -2px; 
    background-color: #ff3b30; color: white; 
    font-size: 10px; width: 18px; height: 18px;
    border-radius: 50%; display: flex; justify-content: center;
    align-items: center; border: 2px solid white; font-weight: bold;
}

/* --- Sections & Titles --- */
.section-title { font-size: 1rem; font-weight: 700; margin: 15px 0 10px 0; display: flex; align-items: center; gap: 8px; color: #1c1c1e; }
.section-title i { color: var(--gray-icon); font-size: 15px; }

/* Slider */
.main-slider { position: relative; width: 100%; height: 160px; border-radius: 14px; overflow: hidden; margin-bottom: 20px; }
#slider-inner { display: flex; transition: transform 0.4s ease-out; }
#slider-inner img { width: 100%; height: 160px; object-fit: cover; flex-shrink: 0; }
.dots { position: absolute; bottom: 10px; width: 100%; display: flex; justify-content: center; gap: 5px; }
.dot { width: 6px; height: 6px; background: rgba(255,255,255,0.4); border-radius: 50%; }
.dot.active { background: white; width: 14px; border-radius: 10px; }

/* Horizontal Scroll */
.horizontal-scroll { display: flex; overflow-x: auto; gap: 14px; padding: 4px 0; scrollbar-width: none; }
.horizontal-scroll::-webkit-scrollbar { display: none; }

/* App Cards (Grid) */
.app-card { min-width: 65px; text-align: center; }
.app-card img { width: 45px; height: 45px; border-radius: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.06); }
.app-card p { font-size: 0.7rem; margin-top: 6px; font-weight: 500; color: #1c1c1e; }

/* Most Downloaded (Featured) */
.featured-card { position: relative; min-width: 260px; height: 145px; border-radius: 14px; overflow: hidden; margin-right: 12px; }
.featured-card img { width: 100%; height: 100%; object-fit: cover; }
.featured-text {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: white; padding: 15px 12px; font-size: 0.95rem; font-weight: 600;
}

/* Recently Updated List */
.list-item { display: flex; align-items: center; background: var(--card-bg); padding: 10px; border-radius: 12px; margin-bottom: 8px; }
.list-item img { width: 42px; height: 42px; border-radius: 9px; margin-right: 12px; }
.get-btn { margin-left: auto; background: #f0f0f7; color: var(--primary-color); border: none; padding: 5px 16px; border-radius: 20px; font-weight: 700; font-size: 0.8rem; }

hr.line-sep { border: 0; height: 1px; background: var(--border-color); margin: 15px 0; }

/* Bottom Nav */
.bottom-nav {
    position: fixed; bottom: 0; width: 100%; height: 70px;
    background: rgba(255,255,255,0.85); backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-color); display: flex; justify-content: space-around; align-items: center;
}
.nav-item { color: var(--gray-icon); text-align: center; font-size: 0.7rem; }
.nav-item.active { color: var(--primary-color); }
.nav-item i { font-size: 1.2rem; display: block; margin-bottom: 2px; }

/* --- Search Overlay (ئەم بەشە تازەیە و بۆ گونجاندنی دیزاینەکەیە) --- */
.search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #000000; z-index: 2000; padding: 15px;
    display: none; overflow-y: auto;
}

.search-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }

.back-btn {
    width: 40px; height: 40px; background: #1c1c1e; border-radius: 50%;
    color: white; display: flex; justify-content: center; align-items: center;
    cursor: pointer; font-size: 18px;
}

.search-overlay .top-search-input {
    background-color: #1c1c1e !important;
    color: white !important;
}

.nothing-found {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; height: 65vh; text-align: center; color: white;
}

.search-illustration {
    width: 120px; height: 120px; background-color: #1c1c1e; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; margin-bottom: 25px;
}

.search-illustration i { font-size: 50px; color: #4dc3ff; }

.nothing-found h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 8px; }

.nothing-found p { color: #8e8e93; font-size: 0.95rem; max-width: 250px; line-height: 1.4; }

/* --- App Model (Popup) Styling - زیادکراوە --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px);
    display: none; z-index: 9999; justify-content: center; align-items: flex-end;
}

.modal-content {
    background: var(--card-bg); width: 100%; max-width: 500px;
    border-radius: 30px 30px 0 0; padding: 20px;
    animation: slideUp 0.3s ease-out; box-sizing: border-box;
}

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.app-badges { display: flex; gap: 6px; margin-top: 8px; }
.tag { padding: 4px 10px; border-radius: 8px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.tag.free { background: #e1f5fe; color: #0288d1; }
.tag.hacked { background: #fff3e0; color: #ef6c00; }

.install-btn-large {
    width: 100%; background: var(--primary-color); color: white;
    border: none; padding: 16px; border-radius: 16px;
    font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: opacity 0.2s;
}
.install-btn-large:active { opacity: 0.8; }

.main-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    gap: 12px;
    background: #fff;
}

.circle-btn {
    width: 32px;
    height: 32px;
    background: #e5e5ea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1c1c1e;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.search-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    height: 45px;
    background: #e5e5ea;
    border: none;
    border-radius: 25px;
    padding: 0 45px;
    font-size: 0.95rem;
    outline: none;
}

.search-icon {
    position: absolute;
    left: 15px;
    color: #8e8e93;
}

/* ستایلی ئایکۆنی Certificate */
.cert-wrapper {
    position: absolute;
    right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-icon {
    font-size: 1.2rem;
    color: #1c1c1e;
}

.cert-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #34c759; /* ڕەنگی سەوز */
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e5ea;
}

