/* ============================================================
   Heart of Acheron — Main Stylesheet
   Theme: Gothic Dark / Demonic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --blood:     #8B0000;
  --blood-mid: #B22222;
  --blood-glow:#D42020;
  --ember:     #CC4400;
  --ash:       #1a1a1a;
  --coal:      #0d0d0d;
  --bone:      #C8B89A;
  --bone-dim:  #8a7a66;
  --smoke:     #2a2a2a;
  --iron:      #3a3a3a;
  --gold:      #C9A84C;
  --gold-dim:  #8a6e2e;
  --text:      #d4c9b8;
  --text-dim:  #8a7a6a;

  --font-title: 'Cinzel Decorative', serif;
  --font-head:  'Cinzel', serif;
  --font-body:  'Crimson Text', serif;

  --shadow-blood: 0 0 20px rgba(139,0,0,0.5);
  --shadow-glow:  0 0 40px rgba(180,20,20,0.3);
  --border-rune:  1px solid rgba(139,0,0,0.4);
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--coal);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(139,0,0,0.15) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%230d0d0d'/%3E%3Crect x='0' y='0' width='1' height='1' fill='%23111' opacity='0.5'/%3E%3C/svg%3E");
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

a { color: var(--blood-mid); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--blood-glow); }

img { max-width: 100%; }

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(0,0,0,0.95) 0%, rgba(13,13,13,0.85) 100%);
  border-bottom: var(--border-rune);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 70px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--bone);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-brand img { height: 44px; width: auto; filter: drop-shadow(0 0 6px rgba(180,20,20,0.6)); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone-dim);
  transition: color 0.2s, text-shadow 0.2s;
}

.nav-links a:hover {
  color: var(--blood-glow);
  text-shadow: 0 0 10px rgba(180,20,20,0.5);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-user img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--blood);
}

.nav-user-name {
  font-family: var(--font-head);
  font-size: 0.75rem;
  color: var(--bone-dim);
}

.nav-cart-btn {
  position: relative;
}

.nav-cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blood);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 4px;
  margin-left: 2px;
  vertical-align: middle;
  box-shadow: 0 0 6px rgba(180,20,20,0.6);
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.6rem 1.6rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.25s;
}
.btn:hover::before { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, #6b0000 0%, #8B0000 50%, #6b0000 100%);
  color: var(--bone);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  box-shadow: var(--shadow-blood), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #8B0000 0%, #B22222 50%, #8B0000 100%);
  box-shadow: 0 0 30px rgba(180,20,20,0.7), inset 0 1px 0 rgba(255,255,255,0.15);
  color: #fff;
}

.btn-steam {
  background: linear-gradient(135deg, #1a3a5c 0%, #1b4b6e 50%, #1a3a5c 100%);
  color: #c8d8e8;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  box-shadow: 0 0 20px rgba(27,75,110,0.4);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-steam:hover {
  background: linear-gradient(135deg, #1b4b6e 0%, #235f8a 50%, #1b4b6e 100%);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--blood-mid);
  border: 1px solid var(--blood);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.btn-outline:hover {
  background: rgba(139,0,0,0.15);
  color: var(--blood-glow);
  box-shadow: var(--shadow-blood);
}

.btn-gold {
  background: linear-gradient(135deg, #7a5f1e 0%, #C9A84C 50%, #7a5f1e 100%);
  color: var(--coal);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  font-weight: 700;
}
.btn-gold:hover {
  background: linear-gradient(135deg, #C9A84C 0%, #e8c86a 50%, #C9A84C 100%);
  box-shadow: 0 0 25px rgba(201,168,76,0.5);
}

.btn-sm { padding: 0.4rem 1rem; font-size: 0.7rem; }
.btn-lg { padding: 0.9rem 2.4rem; font-size: 0.9rem; }
.btn-full { width: 100%; text-align: center; }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(100,0,0,0.25) 0%, transparent 65%),
    radial-gradient(ellipse at 20% 80%, rgba(50,0,0,0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(80,0,0,0.2) 0%, transparent 50%);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--coal));
  pointer-events: none;
}

.hero-logo {
  width: min(260px, 55vw);
  filter: drop-shadow(0 0 30px rgba(180,20,20,0.7)) drop-shadow(0 0 60px rgba(100,0,0,0.4));
  animation: pulse-glow 4s ease-in-out infinite;
  margin-bottom: 2rem;
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 30px rgba(180,20,20,0.7)) drop-shadow(0 0 60px rgba(100,0,0,0.4)); }
  50%       { filter: drop-shadow(0 0 40px rgba(220,30,30,0.9)) drop-shadow(0 0 80px rgba(140,0,0,0.6)); }
}

.hero-title {
  font-family: var(--font-title);
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 900;
  color: var(--bone);
  text-shadow: 0 0 40px rgba(180,20,20,0.6), 0 2px 4px rgba(0,0,0,0.8);
  letter-spacing: 0.05em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-family: var(--font-head);
  font-size: clamp(0.8rem, 2vw, 1rem);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--blood-mid);
  margin-bottom: 1.5rem;
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--text-dim);
  font-style: italic;
  max-width: 500px;
  margin-bottom: 2.5rem;
}

.rune-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem auto;
  max-width: 400px;
}
.rune-divider::before,
.rune-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--blood), transparent);
}
.rune-divider span {
  color: var(--blood);
  font-size: 1.2rem;
}

/* ── Section ── */
.section { padding: 5rem 2rem; }
.section-dark { background: rgba(0,0,0,0.3); }

.container { max-width: 1100px; margin: 0 auto; }

.section-title {
  font-family: var(--font-title);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--bone);
  text-align: center;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(139,0,0,0.4);
}

.section-sub {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blood-mid);
  text-align: center;
  margin-bottom: 3rem;
}

/* ── Package Cards ── */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.pkg-card {
  background: linear-gradient(135deg, rgba(26,26,26,0.95) 0%, rgba(20,10,10,0.95) 100%);
  border: var(--border-rune);
  position: relative;
  transition: all 0.3s;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  overflow: hidden;
}

.pkg-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(139,0,0,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.pkg-card:hover {
  border-color: var(--blood-mid);
  box-shadow: var(--shadow-glow), inset 0 0 40px rgba(139,0,0,0.05);
  transform: translateY(-4px);
}

.pkg-card.featured {
  border-color: var(--gold-dim);
}
.pkg-card.featured:hover {
  border-color: var(--gold);
  box-shadow: 0 0 40px rgba(201,168,76,0.2);
}

.pkg-featured-badge {
  position: absolute;
  top: 0; right: 16px;
  background: linear-gradient(135deg, #7a5f1e, #C9A84C);
  color: var(--coal);
  font-family: var(--font-head);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%);
}

.pkg-body { padding: 1.75rem; }

.pkg-category {
  font-family: var(--font-head);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blood-mid);
  margin-bottom: 0.5rem;
}

.pkg-name {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: var(--bone);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.pkg-desc {
  font-size: 0.95rem;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.pkg-price {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--blood-glow);
  text-shadow: 0 0 20px rgba(180,20,20,0.5);
  margin-bottom: 1.25rem;
}
.pkg-price sup { font-size: 1rem; vertical-align: super; }

.pkg-footer { padding: 0 1.75rem 1.75rem; }

/* ── Login Page ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(80,0,0,0.2) 0%, transparent 70%);
}

.login-box {
  background: linear-gradient(135deg, rgba(26,26,26,0.98) 0%, rgba(13,8,8,0.98) 100%);
  border: var(--border-rune);
  padding: 3rem 2.5rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  box-shadow: var(--shadow-glow);
}

.login-logo { width: 120px; margin-bottom: 1.5rem; filter: drop-shadow(0 0 20px rgba(180,20,20,0.7)); }
.login-title { font-family: var(--font-title); font-size: 1.6rem; color: var(--bone); margin-bottom: 0.5rem; }
.login-sub { font-size: 0.95rem; color: var(--text-dim); font-style: italic; margin-bottom: 2rem; }

/* ── Checkout ── */
.checkout-wrap {
  padding-top: 100px;
  min-height: 100vh;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .checkout-grid { grid-template-columns: 1fr; }
}

.checkout-form-box,
.checkout-summary {
  background: linear-gradient(135deg, rgba(26,26,26,0.98) 0%, rgba(13,8,8,0.98) 100%);
  border: var(--border-rune);
  padding: 2rem;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.form-group { margin-bottom: 1.5rem; }
.form-label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--iron);
  border-top-color: var(--blood);
  color: var(--text);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: var(--blood-mid);
  box-shadow: 0 0 15px rgba(139,0,0,0.3), inset 0 0 10px rgba(0,0,0,0.5);
}
.form-input::placeholder { color: var(--text-dim); opacity: 0.6; }

.disclaimer-box {
  background: rgba(80,20,0,0.2);
  border: 1px solid rgba(180,80,0,0.4);
  border-left: 3px solid var(--ember);
  padding: 1rem 1.25rem;
  border-radius: 0;
  margin-top: 0.5rem;
}
.disclaimer-box p {
  font-size: 0.88rem;
  color: #d4a070;
  line-height: 1.5;
}
.disclaimer-box strong { color: #e8b88a; }

.summary-pkg-name { font-family: var(--font-head); font-size: 1.1rem; color: var(--bone); margin-bottom: 0.5rem; }
.summary-price { font-family: var(--font-title); font-size: 2.2rem; color: var(--blood-glow); text-shadow: 0 0 20px rgba(180,20,20,0.5); }
.summary-steam { display: flex; align-items: center; gap: 0.75rem; margin-top: 1rem; padding-top: 1rem; border-top: var(--border-rune); }
.summary-steam img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--blood); }
.summary-steam-name { font-size: 0.9rem; color: var(--bone-dim); }

/* ── Orders / Account ── */
.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.orders-table th {
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blood-mid);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: var(--border-rune);
}
.orders-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-dim);
}
.orders-table tr:hover td { background: rgba(139,0,0,0.05); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-family: var(--font-head);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.badge-paid     { background: rgba(0,80,0,0.3);  color: #80d880; border: 1px solid rgba(0,180,0,0.3); }
.badge-delivered{ background: rgba(0,50,150,0.3); color: #80a8ff; border: 1px solid rgba(0,100,255,0.3); }
.badge-pending  { background: rgba(80,60,0,0.3);  color: #d4a840; border: 1px solid rgba(180,140,0,0.3); }
.badge-failed   { background: rgba(80,0,0,0.3);   color: #d46060; border: 1px solid rgba(180,0,0,0.3); }

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: var(--border-rune);
  background: rgba(0,0,0,0.4);
}
.footer-logo { width: 60px; margin-bottom: 1rem; opacity: 0.6; }
.footer-text { font-size: 0.85rem; color: var(--text-dim); }
.footer-disclaimer {
  max-width: 600px;
  margin: 1rem auto 0;
  font-size: 0.75rem;
  color: rgba(138,122,102,0.5);
  font-style: italic;
}

/* ── Flash messages ── */
.flash {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  border-left: 3px solid;
}
.flash-success { background: rgba(0,60,0,0.3); border-color: #4a9; color: #8de; }
.flash-error   { background: rgba(80,0,0,0.3); border-color: var(--blood); color: #d88; }
.flash-info    { background: rgba(0,40,80,0.3); border-color: #468; color: #8ad; }

/* ── Admin ── */
.admin-wrap { padding-top: 90px; min-height: 100vh; }
.admin-title { font-family: var(--font-title); color: var(--bone); font-size: 1.8rem; margin-bottom: 2rem; }
.admin-card {
  background: rgba(26,26,26,0.9);
  border: var(--border-rune);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .packages-grid { grid-template-columns: 1fr; }
}

/* ── PayPal container ── */
#paypal-button-container { margin-top: 1.5rem; }
#paypal-button-container .paypal-button { border-radius: 0 !important; }

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease forwards; }
.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }

/* ── Utility ── */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.text-gold { color: var(--gold); }
.text-blood { color: var(--blood-mid); }
