/* =========================================================
   Eggy Quest Premium Account Dashboard Template
   Static HTML/CSS/JS mockup ready for PHP/database integration.
   ========================================================= */

:root {
  --bg: #070503;
  --panel: rgba(47, 26, 13, .94);
  --panel-2: rgba(62, 34, 17, .96);
  --panel-3: rgba(31, 17, 9, .98);
  --line: rgba(174, 116, 57, .86);
  --line-soft: rgba(255, 222, 147, .13);
  --gold: #f9d88c;
  --cream: #fff2d4;
  --muted: rgba(255, 236, 207, .73);
  --green: #5ed85c;
  --green-dark: #1f653a;
  --blue: #7bdfff;
  --danger: #ffb0a3;
  --ok: #9ef98f;
  --shadow: rgba(0,0,0,.54);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

.account-page {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
  padding: 16px clamp(16px, 3vw, 44px) 26px;
  background:
    radial-gradient(circle at 32% 20%, rgba(242, 171, 72, .18), transparent 29rem),
    radial-gradient(circle at 76% 45%, rgba(49, 181, 94, .16), transparent 25rem),
    radial-gradient(circle at 50% 95%, rgba(34, 120, 150, .10), transparent 26rem),
    linear-gradient(180deg, #08100f 0%, #0d0805 40%, #030202 100%);
}

.account-page::before {
  content: "";
  position: absolute;
  inset: -8%;
  z-index: -5;
  opacity: .24;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.045) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.032) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.036) 75%);
  background-size: 64px 64px;
  background-position: 0 0, 0 32px, 32px -32px, -32px 0;
  transform: rotate(-1.5deg) scale(1.08);
}

.account-page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -4;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.35), transparent 24%, transparent 70%, rgba(0,0,0,.82)),
    radial-gradient(ellipse at center, transparent 0%, transparent 43%, rgba(0,0,0,.68) 100%);
  pointer-events: none;
}

.spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  z-index: -1;
  background: rgba(255, 224, 139, .78);
  box-shadow: 0 0 13px rgba(255, 224, 139, .82);
  animation: sparkDrift 7.5s linear infinite;
}

.spark:nth-child(1) { left: 8%; top: 24%; animation-delay: -1s; }
.spark:nth-child(2) { left: 21%; top: 77%; animation-delay: -4s; }
.spark:nth-child(3) { left: 37%; top: 10%; animation-delay: -2s; }
.spark:nth-child(4) { left: 55%; top: 72%; animation-delay: -5s; }
.spark:nth-child(5) { left: 67%; top: 19%; animation-delay: -3s; }
.spark:nth-child(6) { left: 82%; top: 61%; animation-delay: -6s; }
.spark:nth-child(7) { left: 93%; top: 12%; animation-delay: -2.5s; }

@keyframes sparkDrift {
  0% { transform: translateY(28px); opacity: 0; }
  20% { opacity: .95; }
  100% { transform: translateY(-90px); opacity: 0; }
}

.side-art {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 30px 32px rgba(0,0,0,.55));
  opacity: .92;
  animation: floatArt 6s ease-in-out infinite;
}

.side-art-left {
  left: clamp(-28px, 1vw, 24px);
  top: 110px;
  width: min(225px, 16vw);
}

.side-art-banner {
  right: clamp(-10px, 2vw, 24px);
  top: 76px;
  width: min(185px, 13vw);
  animation-delay: -2s;
}

.side-art-table {
  right: clamp(-16px, 3vw, 50px);
  bottom: 210px;
  width: min(210px, 14vw);
  animation-delay: -3s;
}

@keyframes floatArt {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.logo-wrap {
  position: relative;
  z-index: 8;
  width: min(620px, 74vw);
  margin: 0 auto -26px;
  filter:
    drop-shadow(0 28px 32px rgba(0,0,0,.6))
    drop-shadow(0 0 18px rgba(242,188,93,.18));
}

.logo-wrap img {
  width: 100%;
}

.dashboard {
  position: relative;
  z-index: 5;
  width: min(1080px, 100%);
  margin: 0 auto;
}

/* Reusable panels */

.panel {
  position: relative;
  border: 2px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(65, 36, 18, .96), rgba(28, 15, 8, .98)),
    radial-gradient(circle at 50% 0%, rgba(255, 217, 127, .06), transparent 55%);
  box-shadow:
    0 24px 42px rgba(0,0,0,.42),
    inset 0 0 0 1px rgba(255,255,255,.04);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 222, 150, .08);
  border-radius: 9px;
  pointer-events: none;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 0 16px;
  color: var(--cream);
  font-size: 21px;
  line-height: 1;
  letter-spacing: .055em;
  text-transform: uppercase;
  text-shadow: 0 3px 0 #2b1407, 0 0 18px rgba(255,220,135,.16);
}

.panel-title .leaf {
  color: #6dd357;
  filter: drop-shadow(0 2px 0 #1d421e);
}

/* Top profile bar */

.profile-bar {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 118px;
  padding: 16px 18px;
  border-radius: 16px;
  margin-bottom: 14px;
}

.player-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 112px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 16px 15px rgba(0,0,0,.42));
}

.player-name {
  margin: 0 0 5px;
  font-size: 26px;
  color: #fff3d4;
  text-shadow: 0 3px 0 #2b1407;
}

.level-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.level {
  color: var(--green);
  font-size: 18px;
  font-weight: 900;
  text-shadow: 0 2px 0 #123816;
}

.xp-text,
.member {
  color: var(--muted);
  font-size: 14px;
}

.progress {
  position: relative;
  width: min(320px, 100%);
  height: 12px;
  border: 1px solid rgba(221, 167, 88, .58);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(11, 7, 4, .82);
  box-shadow: inset 0 0 12px rgba(0,0,0,.54);
}

.progress > i {
  display: block;
  height: 100%;
  width: var(--value, 50%);
  border-radius: inherit;
  background: linear-gradient(90deg, #3a9f3a, #75e061);
  box-shadow: 0 0 14px rgba(112,222,89,.35);
}

.profile-actions {
  display: grid;
  grid-template-columns: repeat(4, 88px);
  gap: 12px;
}

.action-tile {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-height: 82px;
  padding: 8px;
  border: 1px solid rgba(192, 126, 60, .76);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(67, 38, 20, .94), rgba(30, 16, 8, .96));
  box-shadow:
    0 15px 24px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.06);
  color: #ffe6ac;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.action-tile:hover,
.action-tile.is-active {
  transform: translateY(-4px);
  border-color: rgba(100, 220, 88, .9);
  box-shadow:
    0 20px 28px rgba(0,0,0,.34),
    0 0 18px rgba(100,220,88,.16);
}

.action-tile .icon {
  font-size: 26px;
  line-height: 1;
}

.action-tile span:last-child {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Core grid */

.core-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr 1fr;
  gap: 14px;
}

.settings-panel,
.stats-panel,
.reward-panel {
  min-height: 500px;
  padding: 22px 18px 18px;
}

.setting-block {
  position: relative;
  padding: 16px 14px 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(178, 116, 56, .72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(53, 29, 15, .78), rgba(26, 14, 8, .84));
}

.setting-block:last-child {
  margin-bottom: 0;
}

.setting-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: #fff1cf;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.setting-title .mini-icon {
  font-size: 22px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 10px;
  margin-top: 8px;
}

.form-row.single {
  grid-template-columns: 1fr;
}

.input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(206, 148, 75, .58);
  border-radius: 6px;
  outline: none;
  background:
    linear-gradient(180deg, rgba(18, 10, 5, .94), rgba(31, 16, 8, .98));
  color: #fff4d6;
  font-size: 14px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.035),
    inset 0 7px 18px rgba(0,0,0,.32);
}

.input::placeholder {
  color: rgba(255, 231, 194, .42);
}

.input:focus {
  border-color: rgba(108, 217, 92, .82);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.045),
    0 0 0 3px rgba(85, 196, 73, .13);
}

.btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  padding: 0 18px;
  border: 1px solid rgba(230, 181, 102, .75);
  border-radius: 6px;
  background:
    linear-gradient(180deg, #1f8d4c, #10602f);
  color: #fff5d7;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 #1f4f2e;
  box-shadow:
    0 10px 18px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.14);
  transition: transform .18s ease, filter .18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 12px rgba(92,222,88,.28));
}

.btn:active {
  transform: translateY(1px);
}

/* Stats */

.stat-list {
  display: grid;
  gap: 0;
  border: 1px solid rgba(161, 104, 50, .34);
  border-radius: 8px;
  overflow: hidden;
}

.stat-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 214, 139, .10);
  background: rgba(20, 11, 6, .16);
}

.stat-row:last-child {
  border-bottom: 0;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 204, 102, .08);
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.32));
}

.stat-label {
  color: #fff2d4;
  font-size: 14px;
}

.stat-value {
  color: #ffe7aa;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.stat-progress {
  grid-column: 2 / 4;
  height: 10px;
  margin-top: 3px;
}

/* Reward chest */

.reward-panel {
  text-align: center;
}

.chest-wrap {
  position: relative;
  width: min(245px, 70%);
  margin: 6px auto 6px;
}

.chest-wrap::before {
  content: "";
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 206, 75, .45), transparent 62%);
  filter: blur(10px);
  animation: chestGlow 2.5s ease-in-out infinite;
}

.chest-img {
  position: relative;
  z-index: 2;
  width: 100%;
  filter:
    drop-shadow(0 18px 18px rgba(0,0,0,.42))
    drop-shadow(0 0 20px rgba(255,195,60,.22));
}

@keyframes chestGlow {
  0%, 100% { opacity: .55; transform: scale(.96); }
  50% { opacity: .95; transform: scale(1.06); }
}

.reward-ready {
  margin: 8px 0 16px;
  color: var(--green);
  font-size: 18px;
  font-weight: 900;
  text-shadow: 0 2px 0 #123816;
}

.claim-btn {
  width: min(280px, 100%);
  min-height: 52px;
  font-size: 19px;
  letter-spacing: .08em;
}

.cooldown {
  margin: 14px 0 18px;
  color: #f7cf87;
  font-size: 15px;
}

.reward-icons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  padding: 11px;
  border: 1px solid rgba(161, 104, 50, .55);
  border-radius: 8px;
}

.reward-icons span {
  display: grid;
  place-items: center;
  min-height: 50px;
  border: 1px solid rgba(221, 161, 80, .38);
  border-radius: 7px;
  background: rgba(17, 9, 5, .5);
  font-size: 27px;
}

/* Patch notes */

.patch-panel {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 20px;
  margin-top: 14px;
  padding: 20px 24px 18px;
  border: 2px solid rgba(120, 78, 38, .72);
  border-radius: 12px;
  background:
    linear-gradient(180deg, #e8c584, #c89954);
  color: #2f1a0c;
  box-shadow:
    0 25px 44px rgba(0,0,0,.36),
    inset 0 0 0 1px rgba(255,255,255,.28);
}

.patch-title {
  grid-column: 1 / -1;
  margin: -3px 0 3px;
  text-align: center;
  color: #3b210d;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}

.patch-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.patch-note {
  padding: 0 20px;
  border-right: 1px solid rgba(74, 40, 15, .28);
}

.patch-note:first-child {
  padding-left: 0;
}

.patch-note:last-child {
  border-right: 0;
}

.patch-date {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 900;
}

.patch-note h3 {
  margin: 0 0 8px;
  color: #205d24;
  font-size: 18px;
}

.patch-note ul {
  margin: 0 0 12px 18px;
  padding: 0;
  font-size: 14px;
  line-height: 1.42;
}

.read-more {
  min-height: 34px;
}

.patch-card {
  align-self: stretch;
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 14px;
  border: 1px solid rgba(92, 51, 23, .35);
  border-radius: 8px;
  background: rgba(255, 233, 179, .32);
  box-shadow: inset 0 0 20px rgba(114,74,32,.14);
  text-align: center;
  transform: rotate(5deg);
}

.patch-card p {
  margin: 0;
  font-weight: 900;
  line-height: 1.3;
}

.patch-card .egg-doodle {
  margin-top: 12px;
  font-size: 46px;
}

/* Form state */

.message {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--gold);
}

.message.is-ok {
  color: var(--ok);
}

.message.is-error {
  color: var(--danger);
}

/* Responsive */

@media (max-width: 1220px) {
  .side-art {
    opacity: .36;
  }

  .dashboard {
    width: min(980px, 100%);
  }

  .profile-actions {
    grid-template-columns: repeat(4, 76px);
  }

  .core-grid {
    grid-template-columns: 1fr 1fr;
  }

  .reward-panel {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .chest-wrap {
    width: min(210px, 46%);
  }
}

@media (max-width: 860px) {
  .account-page {
    overflow-y: auto;
    padding: 12px 12px 24px;
  }

  .logo-wrap {
    width: min(570px, 96vw);
    margin-bottom: -16px;
  }

  .profile-bar {
    grid-template-columns: 1fr;
  }

  .player-card {
    grid-template-columns: 90px 1fr;
  }

  .avatar {
    width: 88px;
  }

  .profile-actions {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .core-grid {
    grid-template-columns: 1fr;
  }

  .settings-panel,
  .stats-panel,
  .reward-panel {
    min-height: auto;
  }

  .patch-panel {
    grid-template-columns: 1fr;
  }

  .patch-list {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .patch-note {
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(74, 40, 15, .24);
    padding-bottom: 16px;
  }

  .patch-note:last-child {
    border-bottom: 0;
  }

  .patch-card {
    transform: none;
  }

  .side-art {
    display: none;
  }
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .player-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .avatar {
    margin: 0 auto;
  }

  .level-line,
  .progress {
    justify-content: center;
    margin-inline: auto;
  }

  .profile-actions {
    grid-template-columns: 1fr 1fr;
  }

  .panel-title {
    font-size: 18px;
  }

  .patch-panel {
    padding: 18px 16px;
  }
}
