/* Dragon Vault - Core Styles */

:root {
  --bg: #0b1220;
  --bg-2: #111b2d;
  --card: rgba(20, 31, 49, 0.88);
  --border: rgba(148, 163, 184, 0.16);
  --purple: #4f8fbd;
  --pink: #5e9b91;
  --cyan: #8bb7c8;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.45);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background effects */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 143, 189, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 143, 189, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.bg-glow-1 {
  top: -200px;
  left: -100px;
  background: var(--purple);
}

.bg-glow-2 {
  bottom: -200px;
  right: -100px;
  background: var(--pink);
}

/* Glass */
.glass {
  background: var(--card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
}

/* Typography */
.gradient-text {
  background: linear-gradient(135deg, #6b9ebd, #6fa69b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, #4f8fbd, #5e9b91);
  color: white;
  box-shadow: 0 4px 20px -5px rgba(79, 143, 189, 0.4);
}

.btn-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px -5px rgba(79, 143, 189, 0.55);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* Inputs */
input, select, textarea {
  background: #12121c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(79, 143, 189, 0.15);
}

input::placeholder, textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Product cards */
.product-card {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(79, 143, 189, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.35s;
  z-index: 1;
  pointer-events: none;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -18px rgba(79, 143, 189, 0.35);
}

.product-card:hover::before {
  opacity: 1;
}

.product-card .card-img {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-card .card-body {
  padding: 16px;
  position: relative;
  z-index: 2;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

/* Admin sidebar */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  min-height: 70vh;
}

.admin-nav button {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-nav button:hover,
.admin-nav button.active {
  background: rgba(79, 143, 189, 0.15);
  color: white;
}

/* Scrollbar */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: #0a0a12; }
::-webkit-scrollbar-thumb { background: #2a2a3a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a4a; }

/* Utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

/* Refined storefront palette and payment QR presentation */
body { background: var(--bg); }
.glass { box-shadow: 0 10px 30px rgba(2, 8, 23, .12); }
.payment-qr, .payment-qr-preview {
  display: block;
  width: min(100%, 240px);
  max-height: 280px;
  object-fit: contain;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 14px;
}
.payment-qr-preview { width: 180px; margin-top: 8px; }

.product-featured-badge { background: #365f79; color: #e5f1f8; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .04em; }

/* Global spacing and refined black / midnight-blue design */
:root {
  --bg: #05080f;
  --bg-2: #0a1220;
  --card: rgba(15, 25, 42, .92);
  --border: rgba(133, 158, 190, .16);
  --purple: #477fa8;
  --pink: #648eaa;
  --cyan: #82a9bf;
  --text: #f1f5f9;
  --muted: rgba(226, 232, 240, .62);
}
body { background: #05080f; color: #eef3f9; line-height: 1.6; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.015em; }
h2, h3 { margin-bottom: 1rem; }
label { display: block; line-height: 1.45; margin-bottom: .45rem; }
input, select, textarea { margin-top: .2rem; margin-bottom: .55rem; line-height: 1.5; }
p { line-height: 1.7; }
.glass { background: rgba(13, 22, 37, .92); border-color: rgba(123, 153, 186, .17); }
.btn-primary { background: linear-gradient(135deg, #376b91, #477e85); box-shadow: 0 5px 18px rgba(25, 66, 96, .22); }
.gradient-text { background: linear-gradient(135deg, #6c9fc0, #78aaa3); -webkit-background-clip: text; }
.payment-qr, .payment-qr-preview { display:block; width:min(100%,240px); max-height:280px; object-fit:contain; padding:10px; background:#fff; border:1px solid rgba(148,163,184,.25); border-radius:14px; }
.payment-qr-preview { width:180px; margin-top:8px; }


/* Dragon Vault — high contrast black / white / midnight-blue finish */
:root {
  --bg: #030508;
  --bg-2: #080d16;
  --card: rgba(10, 17, 29, .97);
  --border: rgba(154, 177, 205, .18);
  --purple: #3c78a1;
  --pink: #426f89;
  --cyan: #8fb8d1;
  --text: #ffffff;
  --muted: #c1cbd7;
}
html { background: #030508; }
body {
  background: #030508 !important;
  color: #fff !important;
  line-height: 1.7;
  letter-spacing: .005em;
}
.bg-grid {
  background-image:
    linear-gradient(rgba(110, 151, 190, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 151, 190, .025) 1px, transparent 1px);
}
.bg-glow { opacity: .07; }
.glass {
  background: rgba(9, 16, 28, .96);
  border-color: rgba(137, 165, 197, .16);
}
h1, h2, h3, h4, h5, h6 {
  color: #fff;
  line-height: 1.32;
  letter-spacing: -.012em;
}
p { color: #e2e8f0; line-height: 1.75; }
label, small, .text-white\/20, .text-white\/30, .text-white\/40,
.text-white\/50, .text-white\/60, .text-white\/70 {
  color: #c5cfdb !important;
}
input, select, textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0 0 14px;
  padding: 12px 15px !important;
  border-radius: 11px;
  border: 1px solid rgba(142, 166, 195, .2);
  background: #070b12 !important;
  color: #fff !important;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: .01em;
}
input::placeholder, textarea::placeholder {
  color: #aab6c5 !important;
  opacity: 1;
}
input:focus, select:focus, textarea:focus {
  border-color: #527fa6;
  box-shadow: 0 0 0 3px rgba(64, 118, 160, .18);
}
input[type="checkbox"] {
  display: inline-block;
  width: 17px !important;
  min-height: 17px;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #5b91b8;
}
input[type="file"] {
  padding: 10px 12px !important;
  color: #e8eef5 !important;
}
textarea { min-height: 90px; resize: vertical; }
.admin-product-fields { gap: 15px 16px !important; }
.admin-field { margin-bottom: 0 !important; }
.admin-textarea { margin-top: 4px !important; margin-bottom: 18px !important; }
.admin-featured-toggle { min-height: 44px; margin: 0 !important; padding: 4px 0; }
#admin-tab-products .glass { padding: 26px !important; }
#admin-tab-products #form-title { margin-bottom: 22px !important; }
#admin-tab-products label { margin-bottom: 8px; }
.btn-primary {
  background: linear-gradient(135deg, #28577d, #315d70);
  color: #fff !important;
}
.btn-ghost { color: #fff !important; }
.gradient-text {
  background: linear-gradient(120deg, #eaf4ff, #a9c8df);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.product-card {
  border: 1px solid rgba(140, 168, 201, .14);
  background: linear-gradient(160deg, #0d1726, #080d15);
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}
.product-card:hover {
  transform: translateY(-5px) scale(1.012);
  border-color: rgba(105, 157, 202, .45);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .42), 0 0 0 1px rgba(82, 131, 174, .08);
}
.product-detail-enter { animation: detailReveal .48s cubic-bezier(.2,.75,.25,1) both; }
.product-detail-enter .product-detail-image { animation: detailImageReveal .65s cubic-bezier(.2,.75,.25,1) both; }
.product-detail-enter .product-detail-content { animation: detailContentReveal .55s .06s cubic-bezier(.2,.75,.25,1) both; }
@keyframes detailReveal {
  from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes detailImageReveal {
  from { opacity: .35; transform: scale(1.045); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes detailContentReveal {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .product-detail-enter, .product-detail-enter * { animation-duration: .01ms !important; }
  .product-card { transition: none; }
}

/* Dark backdrop and storefront actions */
.site-background { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: #000 url('../assets/background.jpg') center center / cover no-repeat; }
.store-logo { display: block; width: 54px; height: 54px; object-fit: contain; border-radius: 12px; }
.navbar.glass { background: transparent !important; border: 0 !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.navbar .brand-name { font-size: 17px; font-weight: 800; color: #fff; }
.product-price { margin-bottom: 12px; }
.product-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.product-actions .btn { min-width: 0; min-height: 42px; padding: 8px 4px; font-size: 13px; white-space: nowrap; }
.nav-pair,.nav-box,.custom-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.nav-box{padding:7px 12px;border:1px solid #303641;border-radius:12px;background:#11151dbb;color:white;text-decoration:none;transition:box-shadow .2s}.nav-box:hover{box-shadow:0 0 15px #7199c455}.nav-box .store-logo{width:38px;height:38px}.custom-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin:12px 0}.custom-fields label{display:block;font-size:13px}.custom-fields input,.custom-fields select,.custom-fields textarea{width:100%;margin-top:5px}.custom-preview,.custom-section-editor{border:1px solid #ffffff25;border-radius:12px;padding:16px;margin:16px 0}.custom-sections article{text-align:center;padding:20px;margin-bottom:16px}.custom-sections img,.custom-preview img.section-image{max-width:100%;max-height:300px;margin:12px auto;display:block}.custom-actions .btn{padding:10px 16px}.custom-preview{overflow-wrap:anywhere}.custom-preview .nav-pair{margin-bottom:20px}.navbar .brand-name{white-space:normal}@media(max-width:600px){.nav-pair{gap:5px}.nav-box{padding:5px 7px;gap:5px}.nav-box .store-logo{width:28px;height:28px}.navbar .brand-name{max-width:105px;overflow-wrap:anywhere}.navbar{height:auto;min-height:64px}.navbar>div{gap:5px}}
.stat-panel{display:flex;flex-wrap:wrap;width:100%;margin:30px auto 0;border:1px solid;overflow:hidden;align-items:stretch}.stat-cell{flex:1 1 130px;min-width:0;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:16px 10px;overflow-wrap:anywhere;border-right:1px solid #ffffff15}.stat-cell:last-child{border-right:0}.browse-products{display:block;width:fit-content;margin:30px auto 0;padding:12px 22px;background:#f4f4f5;color:#111;border-radius:12px;font-weight:700;cursor:pointer}.browse-products:hover{background:#d4d4d8}#products-grid{scroll-margin-top:100px}#custom-heading{overflow-wrap:anywhere;max-width:100%}.custom-preview .stat-panel{margin-top:20px}@media(max-width:480px){.stat-cell{flex-basis:100px}.stat-panel{max-width:100%}}

