@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* =========================================
   1. THEME VARIABLES 
========================================= */
:root {
    --primary: #16A34A;
    --primary-light: #dcfce7;
    --bg: #f8f9fa; 
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --nav-bg: rgba(255, 255, 255, 0.98);
}

[data-theme="dark"] {
    --bg: #0F172A;
    --card-bg: #1E293B;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --nav-bg: rgba(15, 23, 42, 0.98);
    --primary-light: #14532d;
}

/* =========================================
   2. BASE & RESET
========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg); color: var(--text); transition: background-color 0.3s, color 0.3s; padding-bottom: 70px; }
a { text-decoration: none; color: inherit; }
.container { max-width: 900px; margin: 0 auto; padding: 0 15px; }

/* =========================================
   3. HEADER & NAVIGATION
========================================= */
.site-header { position: sticky; top: 0; background: var(--nav-bg); backdrop-filter: blur(10px); z-index: 100; border-bottom: 1px solid var(--border); padding: 15px 0; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 24px; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; display: block; }
.header-actions { display: flex; align-items: center; gap: 15px; }
.theme-btn { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); transition: transform 0.2s;}
.frontend-menu-btn { background: none; border: none; font-size: 24px; color: var(--text); cursor: pointer; display: flex; align-items: center; transition: 0.3s; }

/* =========================================
   4. HOME PAGE TITLES & SLIDER
========================================= */
.section-header { display: flex; justify-content: space-between; align-items: center; margin: 30px 0 15px; text-transform: uppercase; }
.section-title { font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: 0.5px;}
.view-more { background: #3b82f6; color: white; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; display: inline-block; }

/* Banner Slider Fix */
.banner-slider { width: 100%; border-radius: 16px; overflow: hidden; margin: 20px 0 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); background: var(--card-bg); }
.swiper-slide a { display: block; position: relative; width: 100%; padding-top: 50%; }
@media(min-width: 768px) { .swiper-slide a { padding-top: 35%; } }
.swiper-slide img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.swiper-pagination-bullet { background: #ffffff; opacity: 0.5; width: 8px; height: 8px; }
.swiper-pagination-bullet-active { background: var(--primary); opacity: 1; width: 20px; border-radius: 10px; transition: 0.3s; }

/* =========================================
   5. LIST LAYOUT (100% FIXED & RESPONSIVE)
========================================= */
.app-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px;}
.list-card {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 12px 15px;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    width: 100%;
}
.list-card:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-color: var(--primary); }

.list-icon {
    width: 65px;
    height: 65px;
    min-width: 65px; /* Ensures image does not grow */
    border-radius: 14px;
    object-fit: cover;
    margin-right: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background-color: #f1f5f9;
    display: block; /* Fixes layout breaking */
}

.list-content { flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.list-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.list-version { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; font-weight: 500; }
.list-desc { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media(min-width: 768px) { .app-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; } }

/* =========================================
   6. APP DETAILS
========================================= */
.app-header { display: flex; align-items: center; gap: 20px; margin-top: 30px; }
.app-header img { width: 100px; height: 100px; min-width: 100px; border-radius: 22px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); object-fit: cover; display: block;}
.app-header h1 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.app-header p { color: var(--text-muted); font-size: 14px; font-weight: 500;}

.stats-row { display: flex; justify-content: space-between; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 15px; margin: 20px 0; text-align: center; }
.stat-item h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.stat-item p { font-size: 12px; color: var(--text-muted); font-weight: 500;}
.stat-divider { width: 1px; background: var(--border); }

.info-list { background: var(--card-bg); border-radius: 12px; padding: 20px; border: 1px solid var(--border); margin-bottom: 25px; }
.info-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.info-item:last-child { border-bottom: none; padding-bottom: 0;}
.info-item:first-child { padding-top: 0;}
.info-label { color: var(--text-muted); font-weight: 500;}
.info-value { font-weight: 600; text-align: right; color: var(--text); }

.btn-download { display: flex; justify-content: center; align-items: center; gap: 10px; background: var(--primary); color: #ffffff; font-size: 16px; font-weight: 700; padding: 16px; border-radius: 12px; width: 100%; box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3); margin-bottom: 30px; border: none; cursor: pointer; text-decoration: none;}

/* =========================================
   7. FRONTEND SIDEBAR MENU (3-Line)
========================================= */
.frontend-sidebar { position: fixed; top: 0; right: -320px; width: 300px; height: 100vh; background: var(--card-bg); z-index: 2000; transition: right 0.3s ease-in-out; box-shadow: -5px 0 25px rgba(0,0,0,0.1); overflow-y: auto; }
.frontend-sidebar.active { right: 0; }
.fs-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--border); }
.fs-header h2 { font-size: 22px; color: var(--primary); font-weight: 800; text-transform: uppercase; }
.fs-close { background: none; border: none; font-size: 20px; color: var(--text); cursor: pointer; padding: 5px; border-radius: 5px; border: 1px solid var(--border); }
.fs-menu { padding: 10px 0; }
.fs-menu a, .fs-menu button { display: flex; align-items: center; width: 100%; padding: 16px 20px; color: var(--text); text-decoration: none; font-size: 15px; font-weight: 600; background: none; border: none; border-bottom: 1px solid var(--border); cursor: pointer; text-align: left; transition: 0.2s; }
.fs-menu a i.main-icon, .fs-menu button i.main-icon { width: 35px; font-size: 18px; color: var(--text-muted); }
.fs-menu a:hover, .fs-menu button:hover { background: var(--border); }
.fs-dropdown { display: none; background: var(--bg); border-bottom: 1px solid var(--border); }
.fs-dropdown a { padding: 12px 20px 12px 55px; font-size: 14px; border-bottom: none; font-weight: 500; color: var(--text-muted);}
.fs-dropdown a:hover { color: var(--primary); }
.fs-dropdown.active { display: block; }
.caret-icon { margin-left: auto; transition: transform 0.3s; color: var(--text-muted); }
.caret-icon.rotate { transform: rotate(180deg); }
.frontend-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1500; display: none; backdrop-filter: blur(2px); }
.frontend-overlay.active { display: block; }

/* =========================================
   8. MOBILE BOTTOM NAVIGATION
========================================= */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--card-bg); border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding: 10px 0; z-index: 1000;}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); font-weight: 600; text-decoration: none;}
.bottom-nav a i { font-size: 20px; }
.bottom-nav a.active { color: var(--primary); }
@media(min-width: 768px) { .bottom-nav { display: none; } body { padding-bottom: 0; }}

/* =========================================
   9. PREMIUM FOOTER DESIGN
========================================= */
.site-footer { margin-top: 40px; padding-bottom: 90px; }
.footer-seo-box { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.footer-seo-box h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; text-transform: uppercase; color: var(--text); }
.footer-seo-box p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.footer-telegram-banner { background: linear-gradient(135deg, #e0f2fe, #f0f9ff); border-radius: 12px; padding: 30px 20px; text-align: center; margin-bottom: 30px; }
[data-theme="dark"] .footer-telegram-banner { background: linear-gradient(135deg, #0c4a6e, #075985); }
.footer-telegram-banner h3 { font-size: 18px; font-weight: 600; margin-bottom: 15px; color: #0f172a; }
[data-theme="dark"] .footer-telegram-banner h3 { color: #f8fafc; }
.join-btn { display: inline-block; background: #06b6d4; color: white; padding: 10px 25px; border-radius: 6px; font-weight: 600; text-transform: uppercase; text-decoration: none; font-size: 14px; }
.footer-social { display: flex; justify-content: center; gap: 15px; margin-bottom: 20px; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--border); color: var(--text); font-size: 18px; transition: 0.3s; text-decoration: none;}
.footer-social a:hover { background: var(--primary); color: white; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px 25px; margin-bottom: 20px; }
.footer-links a { color: var(--text); font-size: 13px; font-weight: 600; text-transform: uppercase; text-decoration: none;}
.footer-copyright { text-align: center; font-size: 12px; color: var(--text-muted); font-weight: 500; }