:root {
    --primary: #6366f1;
    --accent: #00f2ff;
    --success: #00e676;
    --bg: #050508;
    --surface: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    /* Social Colors */
    --tg: #229ED9;
    --ig: #E1306C;
    --tk: #00f2ea;
    --sc: #FFFC00;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Outfit', sans-serif; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg);
    color: #fff;
    min-height: 100vh;
    padding-bottom: 100px;
    overflow-x: hidden;
    position: relative;
    direction: ltr; /* زیادکرا بۆ چەپ بۆ ڕاست */
}

/* --- BACKGROUND --- */
.cosmic-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; animation: float 10s infinite alternate; }
.orb-1 { top: -10%; left: -20%; width: 350px; height: 350px; background: var(--primary); }
.orb-2 { bottom: 10%; right: -20%; width: 300px; height: 300px; background: var(--accent); animation-delay: -5s; }
@keyframes float { 0% { transform: translate(0,0); } 100% { transform: translate(40px, 60px); } }

/* --- HEADER --- */
.glass-header {
    position: sticky; top: 0; z-index: 50; padding: 15px 20px;
    background: rgba(5, 5, 8, 0.8); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center;
}
.brand { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.brand span { color: var(--accent); text-shadow: 0 0 10px rgba(0, 242, 255, 0.4); }
.user-pill {
    background: rgba(255,255,255,0.05); border: 1px solid var(--border);
    padding: 5px 12px; border-radius: 30px; font-size: 12px; font-weight: 600;
    display: flex; align-items: center; gap: 6px; color: var(--success);
}
.dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; box-shadow: 0 0 8px var(--success); }

/* --- SHARED STYLES --- */
.page-view { display: none; padding: 20px; animation: fadeScale 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.page-view.active { display: block; }
@keyframes fadeScale { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.section-title { font-size: 18px; font-weight: 700; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
.section-title i { color: var(--accent); }

/* --- HOME SECTION STYLES --- */
.welcome-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(0, 242, 255, 0.1));
    border: 1px solid var(--border); border-radius: 24px; padding: 25px; margin-bottom: 25px;
    position: relative; overflow: hidden;
}
.wc-title { font-size: 24px; font-weight: 800; margin-bottom: 5px; }
.wc-sub { color: #94a3b8; font-size: 14px; }
.wc-icon { position: absolute; left: -20px; bottom: -20px; font-size: 100px; color: rgba(255,255,255,0.05); transform: rotate(15deg); } /* right گۆڕا بۆ left و سوڕانەوەکە پێچەوانە کرا */

/* Slider */
.h-scroll { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 15px; margin-bottom: 20px; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }

.trend-card {
    min-width: 280px; height: 160px; border-radius: 26px;
    position: relative; overflow: hidden; text-decoration: none;
    background: rgba(20, 20, 30, 0.6); border: 1px solid var(--border);
    display: flex; align-items: center; padding: 20px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5); transition: 0.3s;
}
.trend-card:active { transform: scale(0.98); }
.trend-blob { position: absolute; width: 100px; height: 100px; border-radius: 50%; left: -20px; top: -20px; filter: blur(40px); opacity: 0.4; } /* right گۆڕا بۆ left */
.t-info { flex: 1; z-index: 2; text-align: left; } /* زیادکرا بۆ ڕێکی دەق */
.t-badge { background: rgba(255,255,255,0.1); color: #fff; font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 8px; display: inline-block; margin-bottom: 8px; border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(5px); }
.t-title { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.t-sub { font-size: 12px; color: #94a3b8; }
.t-img { width: 85px; height: 85px; object-fit: cover; border-radius: 20px; z-index: 2; box-shadow: 0 5px 20px rgba(0,0,0,0.5); border: 2px solid rgba(255,255,255,0.1); transform: rotate(-5deg); } /* سوڕانەوەکە پێچەوانە کرا */
.t-btn { margin-top: 10px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--accent); }

/* Social Grid */
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.social-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 15px; 
    text-decoration: none; display: flex; align-items: center; gap: 12px; transition: 0.3s; position: relative; overflow: hidden;
    cursor: pointer;
}
.social-card:active { transform: scale(0.96); background: rgba(255,255,255,0.05); }
.soc-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; position: relative; z-index: 2; }
.soc-text h4 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 2px; text-align: left; }
.soc-text p { font-size: 10px; color: #94a3b8; text-align: left; }
.soc-arrow { position: absolute; right: 15px; font-size: 12px; color: #555; }

/* --- APPS & GAMES LIST STYLES --- */
.search-bar { position: relative; margin-bottom: 20px; }
.s-input {
    width: 100%; background: var(--surface); border: 1px solid var(--border);
    padding: 14px 15px 14px 45px; border-radius: 18px; color: #fff; transition: 0.3s; font-size: 14px;
} /* پادینگ پێچەوانە کرا */
.s-input:focus { border-color: var(--accent); box-shadow: 0 0 15px rgba(0, 242, 255, 0.15); outline: none; }
.s-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #666; } /* right گۆڕا بۆ left */

.tabs-container { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 15px; scrollbar-width: none; }
.tab-btn {
    background: var(--surface); border: 1px solid var(--border); color: #94a3b8;
    padding: 10px 20px; border-radius: 20px; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: 0.3s;
}
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.app-item {
    display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border);
    border-radius: 20px; padding: 12px; margin-bottom: 12px; text-decoration: none; color: #fff; transition: 0.3s;
}
.app-item:active { background: rgba(255,255,255,0.08); transform: scale(0.98); }
.app-img { width: 55px; height: 55px; border-radius: 14px; margin-right: 15px; object-fit: cover; } /* margin-left گۆڕا بۆ margin-right */
.app-details { flex: 1; text-align: left; } /* زیادکرا بۆ ڕێکی دەق */
.app-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 5px; }
.verified { color: var(--accent); font-size: 12px; }
.app-ver { font-size: 11px; color: #94a3b8; }
.dl-btn {
    background: rgba(255,255,255,0.1); width: 35px; height: 35px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; color: var(--accent); border: 1px solid var(--border);
}

/* --- NAVBAR ISLAND --- */
.nav-island {
    position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 380px; height: 65px;
    background: rgba(20, 20, 30, 0.85); backdrop-filter: blur(25px);
    border: 1px solid var(--border); border-radius: 35px;
    display: flex; justify-content: space-around; align-items: center;
    padding: 0 10px; z-index: 100; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.nav-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 50px; height: 100%; color: #64748b; text-decoration: none; transition: 0.3s; position: relative;
}
.nav-btn i { font-size: 22px; transition: 0.3s; }
.nav-btn span { font-size: 10px; font-weight: 600; opacity: 0; transform: translateY(10px); transition: 0.3s; position: absolute; bottom: 8px; }
.nav-btn.active { color: #fff; }
.nav-btn.active i { transform: translateY(-8px); color: var(--primary); text-shadow: 0 0 15px var(--primary); }
.nav-btn.active span { opacity: 1; transform: translateY(0); }
.nav-btn.active::after {
    content: ''; position: absolute; bottom: 2px; width: 4px; height: 4px;
    background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent);
}

/* --- ADD TO HOME SCREEN POPUP --- */
.ath-popup {
    position: fixed; bottom: -300px; left: 20px; right: 20px;
    background: rgba(20, 20, 30, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--accent); border-radius: 24px;
    padding: 25px 20px; z-index: 9999; text-align: center;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
    transition: 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.ath-popup.active { bottom: 30px; }
.ath-icon {
    width: 70px; height: 70px; display: flex; align-items: center; justify-content: center;
    border-radius: 18px; margin-bottom: 5px; box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
    overflow: hidden; padding: 0; background: transparent; border: 1px solid rgba(255,255,255,0.1);
}
.ath-title { font-weight: 800; color: #fff; font-size: 18px; }
.ath-text { font-size: 14px; color: #94a3b8; line-height: 1.8; text-align: center; }
.ath-text i { margin: 0 5px; color: var(--primary); font-size: 16px; vertical-align: middle; }
.ath-close {
    position: absolute; top: 15px; left: 15px; /* right گۆڕا بۆ left */
    color: #64748b; cursor: pointer; font-size: 20px; transition: 0.3s;
}
.ath-close:active { color: #fff; }
.hidden { display: none; }

/* Footer */
.footer { text-align: center; padding: 20px; color: rgba(255,255,255,0.3); font-size: 12px; }
