:root {
    --bg-main: #050508;
    --bg-card: #0f0f16;
    --bg-hover: #1a1a24;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-neon: #00f3ff;
    --accent-purple: #bc13fe;
    --accent-gradient: linear-gradient(135deg, var(--accent-neon) 0%, var(--accent-purple) 100%);
    --success: #00ff9d;
    --danger: #ff0055;
    --border-light: rgba(0, 243, 255, 0.15);
    --glass-bg: rgba(15, 15, 22, 0.8);
    --shadow-soft: 0 8px 30px rgba(0,0,0,0.7);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body { background-color: var(--bg-main); color: var(--text-primary); font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; width: 100%; }
h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.blur-header { background: var(--glass-bg); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-light); }
.blur-bg { background: var(--bg-card); border: 1px solid var(--border-light); box-shadow: var(--shadow-soft); }
.gradient-text { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.cosmic-glow { text-shadow: 0 0 20px rgba(0, 243, 255, 0.4); }
.cosmic-shadow { box-shadow: 0 0 15px rgba(188, 19, 254, 0.4); }
.w-100 { width: 100%; }
.mt-3 { margin-top: 20px; }
.text-danger { color: var(--danger) !important; }

.app-nav { position: sticky; top: 0; z-index: 100; padding: 16px 0; }
.nav-flex { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.nav-logo { font-size: 24px; font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 26px; }

.nav-links { display: flex; gap: 15px; }
.nav-btn { background: none; border: none; color: var(--text-primary); font-size: 15px; font-weight: 500; cursor: pointer; transition: 0.3s; padding: 8px 12px; border-radius: var(--radius-sm); }
.nav-btn:hover { color: var(--accent-neon); background: rgba(0, 243, 255, 0.05); }

.search-wrapper { position: relative; flex: 1; max-width: 450px; }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; color: var(--accent-neon); }
#main-search { width: 100%; background: rgba(0,0,0,0.5); border: 1px solid var(--border-light); border-radius: var(--radius-pill); padding: 12px 20px 12px 45px; color: var(--text-primary); font-size: 15px; transition: 0.3s; }
#main-search:focus { outline: none; border-color: var(--accent-neon); box-shadow: 0 0 10px rgba(0, 243, 255, 0.2); }

.user-auth { position: relative; }
.user-avatar { width: 42px; height: 42px; border-radius: 50%; cursor: pointer; border: 2px solid var(--accent-purple); transition: 0.3s; object-fit: cover; }
.user-avatar:hover { border-color: var(--accent-neon); box-shadow: 0 0 10px rgba(0, 243, 255, 0.5); }

.dropdown-menu { display: none; position: absolute; right: 0; top: 60px; border-radius: var(--radius-md); min-width: 220px; padding: 10px; z-index: 101; animation: slideDown 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.dropdown-menu button { width: 100%; padding: 12px 16px; text-align: left; background: none; border: none; color: var(--text-primary); cursor: pointer; font-size: 14px; border-radius: var(--radius-sm); transition: 0.2s; }
.dropdown-menu button:hover { background: rgba(0, 243, 255, 0.1); color: var(--accent-neon); }
.divider { height: 1px; background: var(--border-light); margin: 8px 0; }

.store-hero { padding: 60px 20px 40px; }
.hero-title { font-size: 48px; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.hero-subtitle { color: var(--text-secondary); font-size: 18px; max-width: 550px; line-height: 1.6; }

.filter-section { margin-bottom: 30px; }
.categories-slider { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.categories-slider::-webkit-scrollbar { display: none; }
.cat-chip { padding: 10px 22px; background: rgba(0,0,0,0.4); border: 1px solid var(--border-light); border-radius: var(--radius-pill); color: var(--text-secondary); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all 0.3s ease; }
.cat-chip:hover { border-color: var(--accent-purple); color: var(--text-primary); box-shadow: 0 0 10px rgba(188, 19, 254, 0.2); }
.cat-chip.active { background: var(--accent-gradient); color: #fff; border-color: transparent; box-shadow: 0 0 15px rgba(0, 243, 255, 0.4); }

.section-header { margin-bottom: 24px; }
.section-title { font-size: 24px; font-weight: 700; letter-spacing: 0.5px; }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 60px; }

.store-card { display: flex; align-items: center; padding: 16px; background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--border-light); cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); text-decoration: none; position: relative; overflow: hidden; }
.store-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0,243,255,0.05), transparent); opacity: 0; transition: 0.3s; pointer-events: none; }
.store-card:hover { transform: translateY(-4px); border-color: var(--accent-neon); box-shadow: 0 8px 25px rgba(0, 243, 255, 0.15); }
.store-card:hover::before { opacity: 1; }

.store-icon-wrapper { position: relative; flex-shrink: 0; }
.store-icon { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; border: 1px solid rgba(255,255,255,0.05); }

.store-info { flex: 1; min-width: 0; margin-left: 16px; display: flex; flex-direction: column; justify-content: center; }
.store-title { font-size: 16px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.store-meta { display: flex; gap: 10px; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.meta-chip { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,0.05); padding: 2px 6px; border-radius: 4px; }
.store-desc { font-size: 13px; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }

.store-action { margin-left: 16px; flex-shrink: 0; }
.btn-get { background: transparent; color: var(--accent-neon); border: 1px solid var(--accent-neon); padding: 8px 20px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.3s; }
.store-card:hover .btn-get { background: var(--accent-gradient); color: #fff; border-color: transparent; box-shadow: 0 0 10px rgba(188, 19, 254, 0.4); }

.skeleton-card { height: 104px; background: var(--bg-hover); border-radius: var(--radius-md); animation: pulse 1.5s infinite ease-in-out; border: 1px solid transparent; }
@keyframes pulse { 0% { opacity: 0.4; } 50% { opacity: 0.7; } 100% { opacity: 0.4; } }

#details-view, #page-view { padding-top: 30px; padding-bottom: 60px; min-height: 85vh; animation: fadeIn 0.4s ease; }
.back-nav { margin-bottom: 30px; }
.btn-back { display: inline-flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.3); border: 1px solid var(--border-light); color: var(--text-primary); padding: 10px 20px; border-radius: var(--radius-pill); font-weight: 600; cursor: pointer; transition: 0.3s; }
.btn-back:hover { background: var(--accent-purple); border-color: transparent; box-shadow: 0 0 15px rgba(188, 19, 254, 0.3); }

.detail-header { display: flex; gap: 30px; align-items: center; margin-bottom: 40px; }
.detail-icon { width: 140px; height: 140px; border-radius: 24px; object-fit: cover; border: 2px solid var(--border-light); box-shadow: 0 0 30px rgba(0, 243, 255, 0.1); flex-shrink: 0; }
.detail-meta { flex: 1; }
.detail-title { font-size: 36px; font-weight: 800; margin-bottom: 10px; }
.detail-publisher { color: var(--accent-neon); font-size: 16px; font-weight: 600; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }

.btn-primary { background: var(--accent-gradient); color: white; border: none; padding: 16px 36px; border-radius: var(--radius-pill); font-size: 16px; font-weight: 800; cursor: pointer; transition: all 0.3s; display: inline-flex; align-items: center; justify-content: center; letter-spacing: 0.5px; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 243, 255, 0.4); }

.detail-stats { display: flex; gap: 40px; padding: 25px 0; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); margin-bottom: 40px; }
.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-val { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.stat-lbl { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; }

.detail-about h3 { font-size: 22px; font-weight: 800; margin-bottom: 16px; color: var(--accent-neon); }
.detail-about p { color: #cbd5e1; line-height: 1.8; font-size: 16px; margin-bottom: 16px; }
.detail-about li { color: #cbd5e1; line-height: 1.8; font-size: 16px; margin-left: 24px; margin-bottom: 10px; }

.progress-box { background: rgba(0,0,0,0.5); border: 1px solid var(--border-light); border-radius: var(--radius-pill); height: 10px; width: 100%; max-width: 350px; overflow: hidden; margin-top: 20px; display: none; }
.progress-fill { background: var(--accent-gradient); height: 100%; width: 0%; transition: width 0.2s ease; box-shadow: 0 0 10px var(--accent-neon); }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(8px); z-index: 200; align-items: center; justify-content: center; padding: 20px; animation: fadeIn 0.3s; }
.modal-box { padding: 40px; border-radius: var(--radius-lg); width: 100%; max-width: 500px; position: relative; max-height: 90vh; overflow-y: auto; border: 1px solid var(--accent-purple); }
.btn-close { position: absolute; top: 20px; right: 20px; background: rgba(255,255,255,0.05); border: none; color: white; width: 40px; height: 40px; border-radius: 50%; font-size: 20px; cursor: pointer; transition: 0.3s; }
.btn-close:hover { background: var(--danger); transform: rotate(90deg); }
.modal-title { font-size: 26px; margin-bottom: 25px; text-align: center; font-weight: 800; }
.input-field { width: 100%; padding: 16px; margin-bottom: 16px; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); color: white; border-radius: var(--radius-sm); font-size: 15px; font-family: 'Inter', sans-serif; transition: 0.3s; }
.input-field:focus { outline: none; border-color: var(--accent-neon); box-shadow: 0 0 15px rgba(0, 243, 255, 0.2); background: rgba(0,0,0,0.6); }
.text-area { resize: vertical; min-height: 140px; }

select.input-field option { background: var(--bg-card); color: var(--text-primary); }

.app-footer { background: var(--bg-card); border-top: 1px solid var(--border-light); padding: 60px 0 30px; margin-top: auto; position: relative; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand h2 { font-size: 22px; margin-bottom: 12px; }
.footer-brand p { color: var(--text-secondary); font-size: 15px; max-width: 350px; line-height: 1.6; }
.footer-links { display: flex; flex-direction: column; gap: 14px; align-items: flex-end; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 15px; transition: 0.3s; font-weight: 500; }
.footer-links a:hover { color: var(--accent-neon); text-shadow: 0 0 10px rgba(0,243,255,0.5); transform: translateX(-5px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 25px; text-align: center; color: var(--text-secondary); font-size: 14px; }

.admin-actions { display: flex; gap: 16px; margin-top: 40px; padding-top: 25px; border-top: 1px solid var(--border-light); }
.btn-outline { background: transparent; border: 1px solid var(--border-light); color: var(--text-primary); padding: 12px 24px; border-radius: var(--radius-pill); font-weight: 700; cursor: pointer; transition: 0.3s; flex: 1; text-align: center; }
.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: var(--accent-neon); color: var(--accent-neon); }

@keyframes slideDown { from { opacity: 0; transform: translateY(-15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 850px) {
    .desktop-only { display: none; }
    .nav-flex { flex-wrap: wrap; }
    .search-wrapper { order: 3; max-width: 100%; flex: 0 0 100%; }
    .hero-title { font-size: 36px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-links { align-items: center; }
    .footer-links a:hover { transform: translateY(-2px); }
}
@media (max-width: 480px) {
    .detail-header { flex-direction: column; text-align: center; }
    .detail-icon { width: 120px; height: 120px; }
    .detail-stats { justify-content: center; flex-wrap: wrap; gap: 20px; }
}