/* ============ CSS VARIABLES ============ */
:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --accent: #00c853;
    --accent-dark: #00a844;
    --bg: #f8f9fa;
    --bg-card: #ffffff;
    --text: #202124;
    --text-secondary: #5f6368;
    --text-light: #9aa0a6;
    --border: #e0e0e0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --star-color: #fbbc04;
    --danger: #ea4335;
    --success: #34a853;
    --warning: #fbbc04;
    --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: var(--primary); text-decoration: none; transition: all 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

/* ============ LAYOUT ============ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.main-content { min-height: calc(100vh - 300px); padding: 30px 0; }

/* ============ HEADER ============ */
.header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: 700; color: var(--text); }
.logo img { width: 36px; height: 36px; }
.logo span.highlight { color: var(--primary); }
.header-search { flex: 1; max-width: 500px; position: relative; }
.header-search input { width: 100%; padding: 10px 40px 10px 16px; border: 2px solid var(--border); border-radius: 24px; font-size: 0.95rem; outline: none; transition: border-color 0.2s; background: var(--bg); }
.header-search input:focus { border-color: var(--primary); background: #fff; }
.header-search button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: var(--primary); border: none; color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a { padding: 8px 16px; border-radius: 20px; color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; transition: all 0.2s; }
.nav-links a:hover, .nav-links a.active { background: var(--primary-light); color: var(--primary); }
.btn-submit { background: var(--accent) !important; color: #fff !important; }
.btn-submit:hover { background: var(--accent-dark) !important; }

/* ============ HERO ============ */
.hero { background: linear-gradient(135deg, #1a73e8 0%, #6c5ce7 100%); color: #fff; padding: 50px 0 40px; text-align: center; }
.hero h1 { font-size: 2rem; font-weight: 700; margin-bottom: 10px; }
.hero p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 25px; }
.hero-search { max-width: 550px; margin: 0 auto; position: relative; }
.hero-search input { width: 100%; padding: 14px 50px 14px 20px; border: none; border-radius: 30px; font-size: 1rem; outline: none; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.hero-search button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: var(--primary); border: none; color: #fff; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; }
.hero-stats { display: flex; justify-content: center; gap: 40px; margin-top: 25px; }
.hero-stats .stat { text-align: center; }
.hero-stats .stat-num { font-size: 1.5rem; font-weight: 700; }
.hero-stats .stat-label { font-size: 0.85rem; opacity: 0.8; }

/* ============ CATEGORIES BAR ============ */
.categories-bar { background: #fff; border-bottom: 1px solid var(--border); overflow-x: auto; white-space: nowrap; padding: 12px 0; }
.categories-bar::-webkit-scrollbar { height: 0; }
.categories-list { display: flex; gap: 8px; padding: 0 20px; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 20px; background: var(--bg); color: var(--text-secondary); font-size: 0.85rem; font-weight: 500; white-space: nowrap; transition: all 0.2s; border: 1px solid transparent; }
.cat-chip:hover, .cat-chip.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.cat-chip i { font-size: 0.9rem; }
.cat-chip .count { background: rgba(0,0,0,0.08); padding: 1px 6px; border-radius: 10px; font-size: 0.75rem; }

/* ============ SECTION TITLES ============ */
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--border); }
.section-title h2 { font-size: 1.3rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 10px; }
.section-title h2 i { color: var(--primary); }
.section-title a { font-size: 0.9rem; font-weight: 500; }

/* ============ APP CARDS GRID ============ */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.app-card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: all 0.25s; }
.app-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: var(--primary); }
.app-card-inner { padding: 16px; display: flex; gap: 14px; }
.app-card .app-icon { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; flex-shrink: 0; box-shadow: var(--shadow); }
.app-card .app-info { flex: 1; min-width: 0; }
.app-card .app-name { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.app-card .app-category { font-size: 0.8rem; color: var(--text-light); margin-bottom: 6px; }
.app-card .app-meta { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--text-secondary); }
.app-card .app-rating { display: flex; align-items: center; gap: 3px; color: var(--star-color); font-weight: 600; }
.app-card .app-desc { padding: 0 16px 14px; font-size: 0.85rem; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ============ APP LIST VIEW ============ */
.apps-list .app-card { display: flex; flex-direction: row; }
.apps-list .app-card-inner { flex: 1; }
.apps-list .app-card .app-desc { display: none; }

/* ============ FEATURED SLIDER ============ */
.featured-section { margin-bottom: 30px; }
.featured-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.featured-card { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: var(--radius); padding: 20px; color: #fff; display: flex; align-items: center; gap: 16px; transition: transform 0.2s; cursor: pointer; }
.featured-card:hover { transform: scale(1.02); }
.featured-card .app-icon { width: 80px; height: 80px; border-radius: 18px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.featured-card .app-info h3 { font-size: 1.1rem; margin-bottom: 4px; }
.featured-card .app-info p { opacity: 0.85; font-size: 0.85rem; }
.featured-card .badge { background: rgba(255,255,255,0.2); padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; margin-top: 6px; display: inline-block; }

/* ============ APP DETAIL PAGE ============ */
.app-detail { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.app-header { padding: 30px; display: flex; gap: 24px; align-items: flex-start; border-bottom: 1px solid var(--border); }
.app-header .app-icon-large { width: 120px; height: 120px; border-radius: 24px; box-shadow: var(--shadow-lg); flex-shrink: 0; }
.app-header-info { flex: 1; }
.app-header-info h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.app-header-info .app-developer { color: var(--primary); font-size: 0.95rem; margin-bottom: 10px; }
.app-header-info .app-rating-large { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.app-header-info .rating-num { font-size: 1.8rem; font-weight: 700; color: var(--text); }
.app-header-info .rating-details { font-size: 0.85rem; color: var(--text-secondary); }
.app-meta-row { display: flex; gap: 24px; flex-wrap: wrap; }
.app-meta-item { text-align: center; padding: 8px 0; }
.app-meta-item .meta-value { font-weight: 600; font-size: 0.95rem; }
.app-meta-item .meta-label { font-size: 0.75rem; color: var(--text-light); text-transform: uppercase; }
.btn-download { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; padding: 14px 36px; border-radius: 8px; font-size: 1.05rem; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s; margin-top: 16px; }
.btn-download:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,200,83,0.3); }
.btn-download i { font-size: 1.2rem; }

/* Screenshots */
.screenshots-section { padding: 24px 30px; border-bottom: 1px solid var(--border); }
.screenshots-section h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 16px; }
.screenshots-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.screenshots-scroll::-webkit-scrollbar { height: 6px; }
.screenshots-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.screenshot-img { height: 280px; border-radius: var(--radius-sm); scroll-snap-align: start; cursor: pointer; transition: transform 0.2s; box-shadow: var(--shadow); }
.screenshot-img:hover { transform: scale(1.03); }

/* Description */
.description-section { padding: 24px 30px; border-bottom: 1px solid var(--border); }
.description-section h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 12px; }
.description-content { color: var(--text-secondary); line-height: 1.8; }
.description-content.collapsed { max-height: 200px; overflow: hidden; position: relative; }
.description-content.collapsed::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px; background: linear-gradient(transparent, #fff); }
.btn-readmore { color: var(--primary); font-weight: 500; cursor: pointer; border: none; background: none; margin-top: 8px; }

/* Info Table */
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--bg); }
.info-table td { padding: 10px 0; }
.info-table td:first-child { color: var(--text-light); width: 140px; font-size: 0.9rem; }
.info-table td:last-child { font-weight: 500; }

/* ============ RATING SECTION ============ */
.rating-section { padding: 24px 30px; border-bottom: 1px solid var(--border); }
.rating-overview { display: flex; gap: 30px; align-items: center; margin-bottom: 24px; }
.rating-big { text-align: center; }
.rating-big .big-num { font-size: 3rem; font-weight: 700; line-height: 1; }
.rating-big .big-count { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }
.rating-bars { flex: 1; }
.rating-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.rating-bar-row .bar-label { font-size: 0.85rem; color: var(--text-secondary); width: 16px; }
.rating-bar-row .bar-track { flex: 1; height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.rating-bar-row .bar-fill { height: 100%; background: var(--star-color); border-radius: 4px; transition: width 0.3s; }

/* Rating Form */
.rating-form { background: var(--bg); border-radius: var(--radius-sm); padding: 20px; margin-top: 16px; }
.rating-form h3 { font-size: 1rem; margin-bottom: 12px; }
.star-input { display: flex; gap: 4px; margin-bottom: 12px; direction: rtl; justify-content: flex-end; }
.star-input input { display: none; }
.star-input label { font-size: 2rem; color: var(--border); cursor: pointer; transition: color 0.1s; }
.star-input label:hover, .star-input label:hover ~ label,
.star-input input:checked ~ label { color: var(--star-color); }

/* Reviews */
.review-item { padding: 16px 0; border-bottom: 1px solid var(--bg); }
.review-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.review-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.9rem; }
.review-name { font-weight: 600; font-size: 0.9rem; }
.review-date { font-size: 0.8rem; color: var(--text-light); }
.review-text { font-size: 0.9rem; color: var(--text-secondary); margin-top: 6px; }

/* ============ RELATED APPS ============ */
.related-section { padding: 24px 30px; }
.related-section h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.related-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); transition: all 0.2s; }
.related-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.related-card .r-icon { width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; }
.related-card .r-name { font-size: 0.9rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.related-card .r-rating { font-size: 0.8rem; color: var(--star-color); }

/* ============ STARS ============ */
.stars-container { display: inline-flex; gap: 2px; }
.stars-container .star { color: var(--border); font-size: 1rem; line-height: 1; }
.stars-container .star.filled { color: var(--star-color); }
.stars-container .star.half { background: linear-gradient(90deg, var(--star-color) 50%, var(--border) 50%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stars-container.interactive .star { cursor: pointer; font-size: 1.5rem; transition: transform 0.1s; }
.stars-container.interactive .star:hover { transform: scale(1.2); }

/* ============ FORMS ============ */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; color: var(--text); }
.form-group label .required { color: var(--danger); }
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="email"],
.form-group textarea,
.form-group select { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.95rem; outline: none; transition: border-color 0.2s; background: #fff; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group .help-text { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.file-upload { border: 2px dashed var(--border); border-radius: var(--radius-sm); padding: 20px; text-align: center; cursor: pointer; transition: all 0.2s; }
.file-upload:hover { border-color: var(--primary); background: var(--primary-light); }
.file-upload i { font-size: 2rem; color: var(--text-light); margin-bottom: 8px; }
.file-upload p { font-size: 0.85rem; color: var(--text-secondary); }
.file-upload input { display: none; }
.file-preview { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.file-preview img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 2px solid var(--border); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem; border: none; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #2d9348; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #d33426; color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

/* ============ SUBMIT PAGE ============ */
.submit-page { max-width: 800px; margin: 0 auto; }
.submit-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.submit-card h1 { font-size: 1.4rem; margin-bottom: 6px; }
.submit-card .subtitle { color: var(--text-secondary); margin-bottom: 24px; }

/* ============ ALERTS ============ */
.alert { padding: 14px 20px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; }
.alert-success { background: #e6f4ea; color: #1e7e34; border: 1px solid #b7e4c7; }
.alert-error { background: #fce8e6; color: #c62828; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff8e1; color: #e65100; border: 1px solid #ffe082; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #b3d4fc; }

/* ============ PAGINATION ============ */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 24px 0; }
.page-link { padding: 8px 14px; border-radius: 6px; border: 1px solid var(--border); color: var(--text-secondary); font-size: 0.9rem; transition: all 0.2s; }
.page-link:hover, .page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.dots { padding: 8px 4px; color: var(--text-light); }

/* ============ BREADCRUMB ============ */
.breadcrumb { display: flex; align-items: center; gap: 8px; padding: 16px 0; font-size: 0.85rem; color: var(--text-light); }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }

/* ============ FOOTER ============ */
.footer { background: #1a1a2e; color: #8899a6; padding: 40px 0 20px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer h3 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer p { font-size: 0.9rem; line-height: 1.7; }
.footer a { color: #8899a6; font-size: 0.9rem; display: block; margin-bottom: 8px; }
.footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 0.85rem; }

/* ============ LIGHTBOX ============ */
.lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.lightbox.active { display: flex; }
.lightbox img { max-width: 90%; max-height: 90vh; border-radius: 8px; }
.lightbox-close { position: absolute; top: 20px; right: 20px; color: #fff; font-size: 2rem; cursor: pointer; background: none; border: none; }

/* ============ ADMIN STYLES ============ */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar { width: 250px; background: #1a1a2e; color: #fff; padding: 20px 0; position: fixed; height: 100vh; overflow-y: auto; }
.admin-sidebar .brand { padding: 0 20px 20px; font-size: 1.2rem; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 10px; }
.admin-sidebar a { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: #8899a6; font-size: 0.9rem; transition: all 0.2s; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.05); color: #fff; }
.admin-sidebar a i { width: 20px; text-align: center; }
.admin-main { margin-left: 250px; flex: 1; padding: 24px; background: var(--bg); }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-header h1 { font-size: 1.5rem; }
.admin-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px; }
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.stat-card .stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-card .stat-icon.green { background: #e6f4ea; color: var(--success); }
.stat-card .stat-icon.orange { background: #fff3e0; color: #e65100; }
.stat-card .stat-icon.red { background: #fce8e6; color: var(--danger); }
.stat-card .stat-num { font-size: 1.5rem; font-weight: 700; }
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-secondary); }

/* Admin Table */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { background: var(--bg); padding: 12px; text-align: left; font-size: 0.8rem; text-transform: uppercase; color: var(--text-light); font-weight: 600; }
.admin-table td { padding: 12px; border-bottom: 1px solid var(--bg); font-size: 0.9rem; }
.admin-table tr:hover { background: var(--primary-light); }
.admin-table .app-row { display: flex; align-items: center; gap: 10px; }
.admin-table .app-row img { width: 40px; height: 40px; border-radius: 8px; }
.status-badge { padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.status-badge.pending { background: #fff3e0; color: #e65100; }
.status-badge.approved { background: #e6f4ea; color: #1e7e34; }
.status-badge.rejected { background: #fce8e6; color: #c62828; }
.action-btns { display: flex; gap: 6px; }

/* Admin Login */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.login-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 40px; width: 100%; max-width: 400px; text-align: center; }
.login-card h1 { margin-bottom: 6px; }
.login-card .subtitle { color: var(--text-secondary); margin-bottom: 24px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; }
    .header-search { order: 3; max-width: 100%; }
    .nav-links { gap: 4px; }
    .nav-links a { padding: 6px 10px; font-size: 0.8rem; }
    .hero h1 { font-size: 1.5rem; }
    .hero-stats { gap: 20px; }
    .apps-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .app-header { flex-direction: column; align-items: center; text-align: center; padding: 20px; }
    .app-header .app-icon-large { width: 96px; height: 96px; }
    .app-meta-row { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .related-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
    .screenshots-scroll { gap: 8px; }
    .screenshot-img { height: 200px; }
    .rating-overview { flex-direction: column; }
}

@media (max-width: 480px) {
    .apps-grid { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ============ SCREENSHOT LIGHTBOX ============ */
.screenshot-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9999; align-items: center; justify-content: center; }
.screenshot-modal.show { display: flex; }
.screenshot-modal img { max-height: 90vh; max-width: 90vw; border-radius: 8px; }
.screenshot-modal .close-btn { position: absolute; top: 16px; right: 20px; font-size: 2.5rem; color: #fff; cursor: pointer; background: none; border: none; z-index: 10; }
