:root {
  --bg: #0e1116;
  --bg-card: #171c24;
  --bg-elevated: #1e2530;
  --border: #2a3342;
  --text: #e8ecf2;
  --text-dim: #9aa5b5;
  --accent: #4f8cff;
  --accent-2: #7c5cff;
  --success: #2ecc71;
  --danger: #ff5c6c;
  --warn: #f5b942;
  --radius: 14px;
  font-size: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, "Noto Sans Myanmar",
    "Myanmar Text", "Pyidaungsu", sans-serif;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { max-width: 1000px; width: 100%; margin: 0 auto; padding: 0 1.2rem; }
main.container { flex: 1; padding-top: 1.6rem; padding-bottom: 3rem; }
.narrow { max-width: 540px; margin: 0 auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.7rem; margin-bottom: .8rem; }
h2 { font-size: 1.2rem; }
.section-title { margin: 2rem 0 .8rem; color: var(--text); }
.meta { color: var(--text-dim); font-size: .9rem; }
.note { color: var(--text-dim); font-size: .88rem; margin-top: .8rem; }
.empty { color: var(--text-dim); padding: 2rem 0; text-align: center; }

/* ------------------------------------------------------------- header */
.site-header {
  background: rgba(14, 17, 22, .92);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; font-size: .9rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; letter-spacing: .5px;
}
.brand-name { font-size: 1.05rem; }
.site-nav { display: flex; align-items: center; gap: 1.1rem; font-size: .95rem; flex-wrap: wrap; }
.site-nav a { color: var(--text-dim); }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.lang-switch { color: var(--text-dim); font-size: .88rem; }
.lang-switch .sep { margin: 0 .35rem; opacity: .4; }
.lang-switch a.active { color: var(--accent); font-weight: 600; }

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-dim); font-size: .85rem;
  padding: 1.2rem 0; margin-top: auto;
}

/* --------------------------------------------------------------- hero */
.hero { text-align: center; padding: 2.2rem 0 1.6rem; }
.hero h1 {
  font-size: 2.4rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .tagline { color: var(--text-dim); font-size: 1.05rem; }

/* ----------------------------------------------------------- app grid */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.app-card {
  display: flex; gap: .9rem; padding: 1.1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  transition: transform .12s ease, border-color .12s ease;
}
.app-card:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }
.app-card h2 { font-size: 1.05rem; margin-bottom: .15rem; }
.app-card p { color: var(--text-dim); font-size: .88rem; }

.app-icon {
  width: 58px; height: 58px; border-radius: 14px; object-fit: cover; flex-shrink: 0;
}
.app-icon.big { width: 92px; height: 92px; border-radius: 20px; }
.app-icon.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 1.6rem; font-weight: 700;
}
.app-icon.big.placeholder { font-size: 2.4rem; }

.badges { margin-top: .5rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.badge {
  font-size: .72rem; padding: .1rem .55rem; border-radius: 99px;
  border: 1px solid var(--border); color: var(--text-dim);
}
.badge.pro { border-color: var(--accent); color: var(--accent); }
.badge.free { border-color: var(--success); color: var(--success); }

/* ----------------------------------------------------------- app page */
.back-link { display: inline-block; margin-bottom: 1rem; color: var(--text-dim); font-size: .9rem; }
.app-hero { display: flex; gap: 1.2rem; align-items: center; margin-bottom: 1.6rem; }
.app-hero .tagline { color: var(--text-dim); }

.buy-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.buy-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.3rem; text-align: center;
}
.buy-card.highlight { border-color: var(--accent); box-shadow: 0 0 24px rgba(79, 140, 255, .12); }
.buy-card h3 { margin-bottom: .3rem; }
.price { font-size: 1.5rem; font-weight: 700; margin-bottom: .9rem; }
.alt-price { font-size: .9rem; color: var(--text-dim); font-weight: 400; }

.screenshot-row { display: flex; gap: .8rem; overflow-x: auto; padding-bottom: .5rem; }
.screenshot-row img {
  height: 340px; border-radius: 12px; border: 1px solid var(--border); flex-shrink: 0;
}
.description { color: var(--text-dim); white-space: normal; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-block; padding: .6rem 1.3rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text); font-size: .95rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.btn:hover { text-decoration: none; filter: brightness(1.12); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none; color: #fff;
}
.btn-secondary { border-color: var(--success); color: var(--success); background: transparent; }
.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-small { padding: .3rem .8rem; font-size: .82rem; }

/* -------------------------------------------------------------- forms */
.form-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem; margin-top: 1rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.form-card.wide { max-width: 760px; }
.form-card label { display: flex; flex-direction: column; gap: .35rem; font-size: .92rem; font-weight: 600; }
.form-card small { color: var(--text-dim); font-weight: 400; }
.form-card input[type="text"], .form-card input[type="password"],
.form-card input[type="number"], .form-card textarea {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: .55rem .8rem; color: var(--text); font-size: .95rem; font-family: inherit;
}
.form-card input:focus, .form-card textarea:focus { outline: none; border-color: var(--accent); }
.form-card input[type="file"] { color: var(--text-dim); font-size: .85rem; }
.form-card fieldset { border: none; display: flex; flex-direction: column; gap: .5rem; }
.form-card legend { font-weight: 600; font-size: .92rem; margin-bottom: .5rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.checkbox-label { flex-direction: row !important; align-items: center; gap: .5rem !important; }

/* Honeypot field: invisible to humans, tempting to bots */
.hp-field { position: absolute !important; left: -9999px !important; }

.method-option {
  display: flex !important; flex-direction: row !important; align-items: center;
  gap: .7rem !important; padding: .7rem .9rem;
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.method-option:has(input:checked) { border-color: var(--accent); background: rgba(79, 140, 255, .07); }
.method-name { flex: 1; }
.method-amount { color: var(--text-dim); font-weight: 400; }

.order-summary {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-elevated); border-radius: 10px; padding: .8rem 1rem;
  margin-bottom: 1rem; font-size: .95rem;
}

/* ------------------------------------------------------- payment page */
.pay-steps { margin: 0 0 1rem 1.2rem; color: var(--text-dim); font-size: .93rem; }
.pay-steps li { margin-bottom: .3rem; }
.pay-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.3rem;
}
.pay-row {
  display: flex; justify-content: space-between; align-items: center; gap: .8rem;
  padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .95rem;
}
.pay-row:last-child { border-bottom: none; }
.pay-row > span { color: var(--text-dim); }
.pay-row .amount { color: var(--warn); font-size: 1.1rem; }
.copy-btn {
  border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-dim);
  border-radius: 6px; padding: .15rem .6rem; font-size: .78rem; cursor: pointer;
}
.copy-btn:hover { color: var(--text); }
.method-note { color: var(--text-dim); font-size: .88rem; padding-top: .6rem; }
.qr-block { text-align: center; padding-top: 1rem; }
.qr-block img { max-width: 240px; border-radius: 12px; background: #fff; padding: 8px; }
.qr-block p { color: var(--text-dim); font-size: .9rem; margin-bottom: .5rem; }

/* --------------------------------------------------------- status page */
.status-panel {
  text-align: center; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2.2rem 1.6rem; margin-top: 1rem;
}
.status-panel.success { border-color: var(--success); }
.status-panel.error { border-color: var(--danger); }
.status-panel h1 { font-size: 1.35rem; margin: .8rem 0 .5rem; }
.status-panel p { color: var(--text-dim); font-size: .93rem; }
.status-panel .btn { margin: 1.2rem 0 .6rem; }
.check {
  width: 64px; height: 64px; margin: 0 auto; border-radius: 50%;
  background: var(--success); color: #fff; font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
}
.spinner {
  width: 44px; height: 44px; margin: 0 auto;
  border: 4px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.order-code-box {
  margin: 1.1rem auto; padding: .8rem 1rem; max-width: 320px;
  border: 1px dashed var(--accent); border-radius: 10px;
  background: rgba(79, 140, 255, .06);
}
.order-code-box span { display: block; color: var(--text-dim); font-size: .82rem; margin-bottom: .25rem; }
.order-code-box code { font-size: 1.25rem; letter-spacing: 2px; color: var(--accent); margin-right: .5rem; }
.size-hint { font-weight: 400; font-size: .85em; opacity: .8; }

.unlock-box {
  margin-top: 1.2rem; padding: 1rem; border: 1px dashed var(--accent);
  border-radius: 10px; background: rgba(79, 140, 255, .06);
}
.unlock-box span { color: var(--text-dim); font-size: .85rem; display: block; margin-bottom: .3rem; }
.unlock-box code {
  font-size: 1.15rem; letter-spacing: 1px; color: var(--accent);
  display: inline-block; margin-right: .5rem; word-break: break-all;
}

.flash {
  background: rgba(46, 204, 113, .12); border: 1px solid var(--success);
  color: var(--text); border-radius: 10px; padding: .7rem 1rem;
  margin-bottom: 1rem; font-size: .92rem;
}
.flash.error { background: rgba(255, 92, 108, .1); border-color: var(--danger); }

/* --------------------------------------------------------------- admin */
.login-page { padding-top: 4rem; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.2rem; display: flex; flex-direction: column;
  color: var(--text-dim); font-size: .85rem;
}
.stat-card .stat-num { font-size: 1.7rem; font-weight: 700; color: var(--text); }
.stat-card.has-items { border-color: var(--warn); }
.stat-card.has-items .stat-num { color: var(--warn); }

.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th {
  text-align: left; color: var(--text-dim); font-weight: 600;
  padding: .5rem .7rem; border-bottom: 1px solid var(--border);
}
.data-table td { padding: .55rem .7rem; border-bottom: 1px solid var(--border); }

.filter-row { display: flex; gap: .5rem; margin: .8rem 0 1.2rem; flex-wrap: wrap; }
.chip {
  padding: .25rem .9rem; border-radius: 99px; border: 1px solid var(--border);
  color: var(--text-dim); font-size: .85rem;
}
.chip.active { border-color: var(--accent); color: var(--accent); }
.chip:hover { text-decoration: none; color: var(--text); }

.status-chip {
  font-size: .74rem; padding: .12rem .6rem; border-radius: 99px;
  border: 1px solid var(--border); color: var(--text-dim); vertical-align: middle;
}
.status-chip.submitted { border-color: var(--warn); color: var(--warn); }
.status-chip.paid { border-color: var(--success); color: var(--success); }
.status-chip.rejected { border-color: var(--danger); color: var(--danger); }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin-top: 1rem; }
@media (max-width: 720px) { .detail-grid { grid-template-columns: 1fr; } }
.proof-img { max-width: 100%; border-radius: 12px; border: 1px solid var(--border); }

.action-row { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; align-items: center; }
.action-row form { display: flex; gap: .5rem; align-items: center; }
.action-row input[type="text"] {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  padding: .5rem .8rem; color: var(--text); font-family: inherit;
}

.admin-shots .shot-item { display: flex; flex-direction: column; gap: .4rem; align-items: center; }
.admin-shots img { height: 200px; }
