/* ========== Reset ========== */
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
  background:#f5f5f7; color:#1d1d1f; line-height:1.55; -webkit-font-smoothing:antialiased;
}
a { color:#0071e3; text-decoration:none; }
a:hover { color:#0055b3; }
img { max-width:100%; display:block; }
input,textarea,select,button { font-family:inherit; font-size:inherit; }

/* ========== Layout ========== */
.container { max-width:1200px; margin:0 auto; padding:32px 24px 64px; }

/* ========== Header ========== */
.site-header {
  position:sticky; top:0; z-index:100;
  background:rgba(255,255,255,.85); backdrop-filter:saturate(180%) blur(20px);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid rgba(0,0,0,.06);
}
.header-inner {
  max-width:1200px; margin:0 auto; padding:12px 24px;
  display:flex; align-items:center; gap:20px;
}
.logo {
  display:flex; align-items:center; gap:8px;
  font-size:19px; font-weight:700; color:#1d1d1f;
}
.logo-icon { font-size:22px; }
.main-nav { display:flex; gap:22px; margin-left:12px; }
.main-nav a { color:#1d1d1f; font-size:14px; font-weight:500; padding:6px 0; position:relative; }
.main-nav a:hover { color:#0071e3; }
.main-nav a::after {
  content:''; position:absolute; left:0; bottom:0; width:0; height:2px;
  background:#0071e3; transition:width .2s;
}
.main-nav a:hover::after { width:100%; }

.header-right { margin-left:auto; display:flex; align-items:center; gap:10px; }
.lang-select {
  appearance:none; -webkit-appearance:none;
  background:#fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M0 2l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.5'/></svg>") no-repeat right 10px center;
  padding:7px 30px 7px 12px; border:1px solid #d2d2d7; border-radius:20px;
  font-size:13px; color:#1d1d1f; cursor:pointer;
}
.lang-select:hover { border-color:#0071e3; }

/* user menu */
.user-menu { position:relative; }
.user-btn {
  display:flex; align-items:center; gap:8px; padding:5px 12px 5px 5px;
  border:1px solid #d2d2d7; border-radius:24px; background:#fff; cursor:pointer;
  font-size:14px; color:#1d1d1f;
}
.user-btn:hover { border-color:#0071e3; }
.user-btn .avatar { width:28px; height:28px; border-radius:50%; object-fit:cover; }
.user-btn .user-name { max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; }
.user-btn .caret { color:#86868b; font-size:12px; }
.dropdown {
  display:none; position:absolute; right:0; top:calc(100% + 8px);
  background:#fff; border:1px solid #e5e5e7; border-radius:12px;
  min-width:200px; padding:6px; box-shadow:0 12px 32px rgba(0,0,0,.12);
}
.dropdown.open { display:block; }
.dropdown a {
  display:block; padding:9px 12px; border-radius:8px;
  color:#1d1d1f; font-size:14px;
}
.dropdown a:hover { background:#f5f5f7; color:#0071e3; }

.avatar { display:inline-flex; align-items:center; justify-content:center; }
.avatar-fallback {
  width:28px; height:28px; border-radius:50%;
  background:linear-gradient(135deg,#0071e3,#00a6ff); color:#fff;
  font-weight:600; font-size:13px;
}

/* ========== Buttons ========== */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:9px 18px; border-radius:24px; border:1px solid transparent;
  background:#f0f0f2; color:#1d1d1f; cursor:pointer;
  font-size:14px; font-weight:500; transition:all .15s;
}
.btn:hover { transform:translateY(-1px); color:#1d1d1f; }
.btn-primary { background:#0071e3; color:#fff; }
.btn-primary:hover { background:#0062c4; color:#fff; }
.btn-light { background:#fff; color:#1d1d1f; }
.btn-light:hover { background:#f0f0f2; }
.btn-ghost { background:transparent; color:#1d1d1f; }
.btn-ghost:hover { background:#f0f0f2; }
.btn-danger { background:#ff3b30; color:#fff; }
.btn-danger:hover { background:#d92a20; color:#fff; }
.btn-lg { padding:12px 28px; font-size:15px; }
.btn-sm { padding:6px 12px; font-size:13px; }

/* ========== Hero ========== */
.hero {
  background:linear-gradient(135deg,#0071e3 0%,#00a6ff 55%,#5ac8fa 100%);
  color:#fff; border-radius:20px; padding:56px 40px; margin-bottom:32px;
  position:relative; overflow:hidden;
}
.hero::before {
  content:''; position:absolute; right:-80px; top:-80px; width:320px; height:320px;
  background:radial-gradient(circle,rgba(255,255,255,.25),transparent 70%);
  border-radius:50%;
}
.hero-content { position:relative; z-index:1; max-width:640px; }
.hero h1 { font-size:38px; font-weight:700; letter-spacing:-.5px; margin-bottom:12px; }
.hero p { font-size:17px; opacity:.92; margin-bottom:24px; }
.hero-actions { display:flex; gap:12px; flex-wrap:wrap; }

/* ========== Grid & Card ========== */
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:18px; }
.card {
  display:flex; gap:14px; padding:18px; background:#fff; border-radius:16px;
  color:inherit; transition:transform .2s, box-shadow .2s;
  border:1px solid rgba(0,0,0,.04);
}
.card:hover { transform:translateY(-3px); box-shadow:0 12px 32px rgba(0,0,0,.09); color:inherit; }
.card-icon {
  width:64px; height:64px; border-radius:16px; flex-shrink:0;
  object-fit:cover; background:linear-gradient(135deg,#e5e5e7,#d2d2d7);
}
.card-body { flex:1; min-width:0; }
.card-title { font-weight:600; font-size:16px; margin-bottom:3px; color:#1d1d1f; }
.card-desc {
  font-size:13px; color:#6e6e73; margin-bottom:10px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.card-meta { font-size:12px; color:#86868b; display:flex; gap:14px; }
.card-article { flex-direction:column; }
.card-cover { width:100%; height:160px; object-fit:cover; border-radius:12px; margin-bottom:12px; }

/* ========== App Detail ========== */
.app-banner-wrap { border-radius:20px; overflow:hidden; margin-bottom:24px; }
.app-banner { width:100%; aspect-ratio:16/9; object-fit:cover; }
.app-head {
  display:flex; gap:22px; align-items:center; margin-bottom:32px; flex-wrap:wrap;
  background:#fff; padding:24px; border-radius:20px;
}
.app-icon {
  width:104px; height:104px; border-radius:24px; object-fit:cover;
  background:linear-gradient(135deg,#e5e5e7,#d2d2d7); flex-shrink:0;
  box-shadow:0 6px 20px rgba(0,0,0,.08);
}
.app-head-info { flex:1; min-width:200px; }
.app-head-info h1 { font-size:28px; font-weight:700; margin-bottom:6px; }
.app-meta { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.badge {
  display:inline-block; padding:4px 12px; border-radius:20px;
  background:#f0f0f2; font-size:13px; color:#1d1d1f;
}
.badge-score { background:#fff3d6; color:#a86400; font-weight:600; }
.section-title { font-size:20px; font-weight:600; margin:32px 0 14px; }
.screens { display:flex; gap:12px; overflow-x:auto; padding-bottom:12px; }
.screens img { height:420px; border-radius:16px; flex-shrink:0; box-shadow:0 8px 24px rgba(0,0,0,.08); }
.desc { background:#fff; padding:22px; border-radius:16px; color:#333; font-size:15px; }

/* ========== Comments ========== */
.comment-form {
  background:#fff; border-radius:16px; padding:20px; margin-bottom:20px;
}
.rating-input { direction:rtl; display:inline-flex; font-size:28px; margin-bottom:8px; }
.rating-input input { display:none; }
.rating-input label { color:#d2d2d7; cursor:pointer; padding:0 2px; transition:color .15s; }
.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label { color:#ff9500; }
.comment-form textarea {
  width:100%; padding:12px 14px; border:1px solid #d2d2d7; border-radius:12px;
  margin:10px 0; resize:vertical; min-height:80px;
}
.comment-form textarea:focus { outline:none; border-color:#0071e3; }
.comment {
  display:flex; gap:12px; padding:16px; background:#fff; border-radius:14px; margin-bottom:10px;
}
.comment .avatar { width:40px; height:40px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.comment .avatar-fallback { width:40px; height:40px; font-size:16px; }
.comment-body { flex:1; }
.comment-head { display:flex; gap:10px; align-items:center; margin-bottom:4px; flex-wrap:wrap; }
.stars { color:#ff9500; }
.stars-dim { color:#e5e5e7; }
.muted { color:#86868b; font-size:13px; }

/* ========== Auth / Forms ========== */
.auth-page { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
.auth-card {
  background:#fff; padding:36px; border-radius:20px; width:100%; max-width:440px;
  box-shadow:0 12px 40px rgba(0,0,0,.08);
}
.auth-card h1 { font-size:26px; margin-bottom:20px; }
.form-row { margin-bottom:16px; }
.form-row label { display:block; font-size:13px; font-weight:500; margin-bottom:6px; color:#6e6e73; }
.form-row input, .form-row textarea, .form-row select {
  width:100%; padding:11px 14px; border:1px solid #d2d2d7; border-radius:12px;
  background:#fff; font-size:14px; transition:border-color .15s;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline:none; border-color:#0071e3; box-shadow:0 0 0 3px rgba(0,113,227,.12);
}
.form-row textarea { resize:vertical; min-height:90px; }
.radio-row { display:flex; gap:18px; margin:10px 0; }
.radio-row label { display:flex; align-items:center; gap:6px; cursor:pointer; font-size:14px; }
.card-form {
  background:#fff; border-radius:16px; padding:24px; margin-bottom:18px;
  border:1px solid rgba(0,0,0,.04);
}
.card-form h3 { font-size:17px; margin-bottom:14px; }
.card-form.danger { border-color:#ffd0cc; }
.card-form.danger h3 { color:#ff3b30; }
.err { color:#ff3b30; margin-top:12px; font-size:14px; }
.ok { color:#28a745; margin-top:12px; font-size:14px; }

/* ========== Admin ========== */
.admin-nav {
  background:#111318; color:#fff; padding:12px 28px;
  display:flex; flex-wrap:wrap; gap:8px; align-items:center;
}
.admin-nav .brand { font-weight:700; margin-right:16px; color:#fff; }
.admin-nav a {
  color:rgba(255,255,255,.72); font-size:14px; padding:7px 12px; border-radius:8px;
}
.admin-nav a:hover, .admin-nav a.active { background:rgba(255,255,255,.1); color:#fff; }
.stat-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:16px; margin-bottom:24px; }
.stat { background:#fff; border-radius:16px; padding:22px; border:1px solid rgba(0,0,0,.04); }
.stat span { display:block; font-size:32px; font-weight:700; color:#0071e3; margin-bottom:4px; }
.stat small { color:#6e6e73; font-size:13px; }
.table {
  width:100%; border-collapse:separate; border-spacing:0;
  background:#fff; border-radius:16px; overflow:hidden; font-size:14px;
}
.table th, .table td { padding:13px 16px; text-align:left; border-bottom:1px solid #f0f0f2; vertical-align:middle; }
.table th { background:#fafafa; font-weight:600; color:#6e6e73; font-size:12px; text-transform:uppercase; letter-spacing:.5px; }
.table tr:last-child td { border-bottom:none; }
.tag { padding:3px 10px; border-radius:20px; font-size:12px; font-weight:500; display:inline-block; }
.tag-pending { background:#fff3cd; color:#8a6d3b; }
.tag-approved { background:#d4edda; color:#155724; }
.tag-rejected { background:#f8d7da; color:#721c24; }
.inline { display:inline-flex; gap:6px; align-items:center; }

/* ========== Footer ========== */
.site-footer {
  background:#fff; border-top:1px solid rgba(0,0,0,.06); padding:32px 24px;
  color:#86868b; font-size:13px;
}
.footer-inner { max-width:1200px; margin:0 auto; text-align:center; }
.footer-langs { margin-top:10px; display:flex; flex-wrap:wrap; gap:10px; justify-content:center; }
.footer-langs a { color:#86868b; font-size:12px; }
.footer-langs a:hover { color:#0071e3; }

/* ========== Misc ========== */
.page-title { font-size:28px; font-weight:700; margin-bottom:20px; }
.empty { color:#86868b; padding:60px 0; text-align:center; }
.empty-page { text-align:center; padding:80px 20px; }
.empty-page h1 { font-size:72px; color:#d2d2d7; margin-bottom:12px; }
.article-detail { background:#fff; padding:32px; border-radius:20px; }
.article-detail h1 { font-size:30px; margin-bottom:18px; }
.article-cover { border-radius:16px; margin-bottom:20px; }
.article-content { font-size:15px; line-height:1.75; color:#333; }
.msg {
  background:#fff; padding:16px 20px; border-radius:14px; margin-bottom:12px;
  border-left:3px solid #0071e3;
}
.msg strong { display:block; margin-bottom:4px; }

/* ========== Responsive ========== */
@media (max-width:768px) {
  .main-nav { display:none; }
  .hero { padding:40px 24px; }
  .hero h1 { font-size:26px; }
  .header-inner { padding:10px 16px; }
  .user-btn .user-name { display:none; }
  .screens img { height:320px; }
  .app-head { flex-direction:column; align-items:flex-start; }
}