@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
    --bg-cream: #F5F7F0;
    --primary-green: #0A7A57;
    --btn-dark: #121212;
    --text-dark: #2D3748;
    --text-light: #FFFFFF;
    --input-bg: #FFFFFF;
    --sidebar-width: 280px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    padding-bottom: 80px; /* For Bottom Nav */
    overflow-x: hidden;
}

/* --- Global Header --- */
header { background-color: var(--primary-green); padding: 15px 5%; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 15px rgba(10, 122, 87, 0.2); border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; margin-bottom: 20px; position: sticky; top: 0; z-index: 100; }
.logo-container { display: flex; align-items: center; text-decoration: none; gap: 12px; }
.logo-container img { height: 40px; filter: brightness(0) invert(1); }
.logo-container h1 { margin: 0; font-size: 20px; font-weight: 700; color: var(--text-light); }
.menu-toggle { color: white; font-size: 24px; cursor: pointer; background: none; border: none; outline: none; }
header nav { display: none; }
@media(min-width: 768px) { header nav { display: flex; align-items: center; gap: 20px; } .menu-toggle { display: none; } .bottom-nav { display: none !important; } body { padding-bottom: 0; } }
.nav-link { text-decoration: none; color: var(--text-light); font-weight: 500; font-size: 14px; opacity: 0.9; }
.nav-link:hover { opacity: 1; text-decoration: underline; }

/* --- Sidebar & Bottom Nav --- */
.sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; opacity: 0; visibility: hidden; transition: 0.3s ease; }
.sidebar-overlay.active { opacity: 1; visibility: visible; }
.sidebar { position: fixed; top: 0; left: -300px; width: var(--sidebar-width); height: 100vh; background: #fff; z-index: 1000; transition: 0.3s ease; box-shadow: 5px 0 15px rgba(0,0,0,0.1); display: flex; flex-direction: column; }
.sidebar.active { left: 0; }
.sidebar-header { background: var(--primary-green); padding: 40px 20px 30px; position: relative; border-bottom-left-radius: 50% 20px; border-bottom-right-radius: 50% 20px; text-align: center; color: white; margin-bottom: 20px; }
.sidebar-close { position: absolute; top: 15px; right: 20px; color: white; font-size: 24px; cursor: pointer; background: none; border: none; }
.sidebar-profile-img { width: 70px; height: 70px; border-radius: 50%; border: 3px solid #fff; margin-bottom: 10px; object-fit: cover; background: #fff; }
.sidebar-name { font-size: 18px; font-weight: 600; margin: 0; }
.sidebar-role { font-size: 12px; opacity: 0.8; margin: 0; }
.sidebar-menu { flex-grow: 1; padding: 0 20px; overflow-y: auto; }
.sidebar-menu a { display: flex; align-items: center; gap: 15px; padding: 12px 15px; color: var(--text-dark); text-decoration: none; font-size: 15px; font-weight: 500; border-radius: 12px; margin-bottom: 5px; transition: 0.2s; }
.sidebar-menu a i { color: var(--primary-green); font-size: 18px; width: 25px; text-align: center; }
.sidebar-menu a:hover, .sidebar-menu a.active { background: var(--bg-cream); color: var(--primary-green); }
.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; display: flex; justify-content: space-around; align-items: center; padding: 10px 0; box-shadow: 0 -5px 20px rgba(0,0,0,0.05); border-top-left-radius: 20px; border-top-right-radius: 20px; z-index: 100; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; color: #888; text-decoration: none; font-size: 11px; font-weight: 500; gap: 5px; transition: 0.3s; }
.bottom-nav a i { font-size: 20px; background: var(--bg-cream); padding: 10px; border-radius: 50%; transition: 0.3s; }
.bottom-nav a.active { color: var(--primary-green); }
.bottom-nav a.active i { background: var(--primary-green); color: white; transform: translateY(-5px); box-shadow: 0 5px 15px rgba(10, 122, 87, 0.3); }

/* --- Main Layout --- */
main { max-width: 1100px; margin: 20px auto; padding: 0 20px; }
.section-title { font-size: 20px; font-weight: 700; color: var(--text-dark); margin-bottom: 20px; }

/* --- App Cards --- */
.app-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
@media(min-width: 768px) { .app-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; } }
.app-card { background: #fff; border-radius: 18px; padding: 15px 10px; text-align: center; box-shadow: 0 8px 20px rgba(0,0,0,0.04); transition: transform 0.3s ease; text-decoration: none; display: block;}
.app-card:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(10, 122, 87, 0.1); }
.app-card img { border-radius: 16px; width: 65px; height: 65px; object-fit: cover; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);}
.app-card h3 { margin: 0 0 4px 0; font-size: 13px; color: var(--text-dark); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 5px;}
.app-card p { font-size: 11px; color: #888; margin: 0; }
.app-card .rating { font-size: 10px; color: #f39c12; margin-top: 5px;}

/* --- Play Store Details Layout --- */
.play-container { background: #fff; border-radius: 24px; padding: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); margin-bottom: 30px; }
@media(max-width: 768px) { .play-container { border-radius: 0; margin: -20px -20px 0 -20px; min-height: 100vh; } }
.play-header { display: flex; gap: 20px; align-items: center; margin-bottom: 25px; }
.play-icon { width: 90px; height: 90px; border-radius: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); object-fit: cover; border: 1px solid #f1f3f4;}
.play-info { display: flex; flex-direction: column; justify-content: center; width: 100%;}
.play-title { font-size: 22px; font-weight: 700; color: #202124; margin: 0 0 4px 0; line-height: 1.2; word-break: break-word;}
.play-dev { font-size: 14px; color: var(--primary-green); font-weight: 600; margin: 0 0 4px 0; text-decoration: none; display: inline-block;}
.play-ads-text { font-size: 11px; color: #5f6368; margin: 0; }
.play-stats { display: flex; justify-content: space-evenly; align-items: center; padding: 15px 0; margin-bottom: 20px; }
.play-stat-item { text-align: center; position: relative; flex: 1; border-right: 1px solid #e8eaed; }
.play-stat-item:last-child { border-right: none; }
.play-stat-val { font-size: 16px; font-weight: 700; color: #202124; display: flex; align-items: center; justify-content: center; gap: 4px; }
.play-stat-label { font-size: 11px; color: #5f6368; margin-top: 4px; font-weight: 500; }
.play-install-btn { width: 100%; background: var(--primary-green); color: #fff; padding: 12px; border-radius: 30px; font-size: 15px; font-weight: 600; text-align: center; border: none; margin-bottom: 25px; cursor: pointer; transition: 0.2s; display: block;}
.play-install-btn:active { transform: scale(0.98); }
.play-screenshots { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 15px; margin-bottom: 20px; scrollbar-width: none; }
.play-screenshots::-webkit-scrollbar { display: none; }
.play-screenshot { width: 130px; height: 230px; border-radius: 12px; object-fit: cover; background: #e8f5e9; flex-shrink: 0; border: 1px solid #e8eaed; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.play-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.play-section-title { font-size: 16px; font-weight: 600; color: #202124; margin: 0; }
.play-about-text { font-size: 13px; color: #5f6368; line-height: 1.6; margin: 0; white-space: pre-line; }

/* --- Forms & Auth --- */
.input-wrapper { background: var(--input-bg); border-radius: 12px; padding: 8px 15px; margin-bottom: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.02); border: 1px solid #eee;}
.input-wrapper label { display: block; font-size: 11px; color: #888; font-weight: 600; margin-bottom: 2px; text-transform: uppercase; }
.input-wrapper input, .input-wrapper textarea, .input-wrapper select { width: 100%; border: none; background: transparent; outline: none; font-size: 14px; color: #333; font-family: 'Poppins', sans-serif; }
.auth-wrapper { display: flex; justify-content: center; align-items: center; min-height: 100vh; background-color: var(--bg-cream); }
.auth-mobile-frame { width: 100%; max-width: 400px; background: var(--bg-cream); position: relative; overflow: hidden; min-height: 100vh; display: flex; flex-direction: column; }
.auth-header-cream { text-align: center; padding: 50px 20px 30px 20px; background: var(--bg-cream); position: relative; }
.auth-header-cream img { height: 50px; margin-bottom: 10px; }
.auth-header-cream h2 { margin: 0; font-size: 26px; font-weight: 700; color: var(--text-dark); }
.auth-back-btn { position: absolute; top: 30px; left: 20px; color: var(--text-dark); font-size: 20px; text-decoration: none; padding: 10px; border-radius: 50%; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.05); width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.auth-box-green { background: var(--primary-green); border-top-left-radius: 40px; border-top-right-radius: 40px; padding: 40px 30px; flex-grow: 1; color: var(--text-light); box-shadow: 0 -10px 30px rgba(10, 122, 87, 0.2); }
.auth-box-green .input-wrapper { border: none; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.auth-options { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 25px; color: #fff;}
.auth-options a { color: #A3D9C1; text-decoration: none; font-weight: 500;}
.auth-options label { display: flex; align-items: center; gap: 5px; cursor: pointer; opacity: 0.9;}
.social-login { text-align: center; margin-top: 30px; }
.social-login p { font-size: 12px; margin-bottom: 15px; color: rgba(255,255,255,0.8);}
.social-icons { display: flex; justify-content: center; gap: 15px; }
.social-icons a { display: inline-flex; justify-content: center; align-items: center; width: 40px; height: 40px; background: #fff; border-radius: 50%; font-size: 18px; text-decoration: none; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: transform 0.2s; }
.social-icons a:hover { transform: translateY(-3px); }
.auth-footer { text-align: center; margin-top: 30px; font-size: 13px; color: rgba(255,255,255,0.8); }
.auth-footer a { color: #fff; font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ========================================= */
/* --- Admin & Developer Dashboard Styles ---*/
/* ========================================= */
.btn { display: inline-block; background-color: var(--btn-dark); color: var(--text-light); text-decoration: none; padding: 12px 25px; border-radius: 25px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: background 0.3s; text-align: center; }
.btn-outline { background-color: transparent; color: var(--text-light); border: 1px solid rgba(255,255,255,0.5); }
.btn-green { background-color: var(--primary-green); color: #fff; }

.dashboard-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-bottom: 25px; }
.stat-card { background: #fff; border-radius: 20px; padding: 20px 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); display: flex; flex-direction: column; align-items: center; text-align: center; justify-content: center; gap: 10px; }
.stat-icon { width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 22px; }
.stat-card-info h3 { margin: 0; font-size: 11px; color: #888; text-transform: uppercase; font-weight: 600;}
.stat-card-info p { margin: 0; font-size: 26px; font-weight: 700; color: var(--text-dark); }

.list-card { background: #fff; border-radius: 16px; padding: 15px; margin-bottom: 15px; display: flex; gap: 15px; align-items: center; box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: 0.2s; }
.list-card:hover { box-shadow: 0 8px 25px rgba(10, 122, 87, 0.1); transform: translateY(-2px); }
.list-card-img { width: 55px; height: 55px; border-radius: 12px; object-fit: cover; border: 1px solid #f1f3f4; }
.list-card-details { flex-grow: 1; overflow: hidden; }
.list-card-title { margin: 0 0 4px 0; font-size: 15px; font-weight: 600; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-card-subtitle { margin: 0; font-size: 12px; color: #666; display: flex; align-items: center; gap: 10px;}
.list-card-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center;}

.badge { padding: 4px 8px; border-radius: 8px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;}
.badge-pending { background: #fdf2ce; color: #f39c12; }
.badge-approved { background: #d5f5e3; color: #27ae60; }
.badge-rejected { background: #fadbd8; color: #e74c3c; }

.btn-sm { padding: 8px 12px; font-size: 12px; border-radius: 10px; cursor: pointer; border: none; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 5px; transition: 0.2s; }
.btn-sm:active { transform: scale(0.95); }
.btn-approve { background: #d5f5e3; color: #27ae60; }
.btn-reject { background: #fadbd8; color: #e74c3c; }
.btn-edit { background: var(--bg-cream); color: var(--text-dark); border: 1px solid #eee; }
.btn-delete { color: #e74c3c; background: transparent; padding: 5px; font-size: 16px; }