/* ================================
   Astracel – Account / Login / Register
   ================================ */

:root{
  --bg: #0e1013;
  --panel: rgba(255,255,255,0.06);
  --panel-soft: rgba(255,255,255,0.04);
  --panel-hover: rgba(255,255,255,0.10);
  --panel-border: rgba(255,255,255,0.14);
  --text: #eef2f6;
  --muted: #a9b1ba;
  --accent: #1bdf91;
  --danger: #ff7b7b;
  --success: #7dffb3;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.03);
  --shadow-soft: 0 8px 24px rgba(0,0,0,0.28);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
}

body{
  min-height: 100%;
  margin: 0;
  padding: 0 0 40px 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 10% -10%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%),
    radial-gradient(1000px 700px at 100% 0%, rgba(86,98,246,0.06), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  background-attachment: fixed, fixed, scroll;
}

* { scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 60%, transparent));
  border-radius: 20px;
}
*::-webkit-scrollbar-track { background: transparent; }

.account-shell{
  width: min(1280px, 94vw);
  margin: 26px auto 0;
}

/* Auth pages */
.auth-wrap{
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 28px;
}

.auth-card{
  width: min(560px, 100%);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 26px;
}

.auth-head{
  text-align: center;
  margin-bottom: 20px;
}

.auth-title{
  margin: 0;
  font-family: "CopperplateGothicBold", ui-sans-serif, system-ui, Arial, sans-serif;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: .4px;
}

.auth-subtitle{
  margin: 10px 0 0 0;
  color: var(--muted);
  line-height: 1.55;
}

/* Forms */
.form-grid{
  display: grid;
  gap: 14px;
}

.form-row{
  display: grid;
  gap: 8px;
}

.form-row label{
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.form-row input,
.form-row select{
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.form-row input::placeholder{
  color: #9ca7b3;
}

.form-row input:focus,
.form-row select:focus{
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent),
    0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--panel-border) 50%, #fff 50%);
  background: rgba(255,255,255,0.06);
}

.field-note{
  margin-top: -2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

/* Messages */
.message{
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.45;
}

.message.error{
  background: rgba(255, 123, 123, 0.10);
  border-color: rgba(255, 123, 123, 0.25);
  color: #ffd0d0;
}

.message.success{
  background: rgba(125, 255, 179, 0.10);
  border-color: rgba(125, 255, 179, 0.25);
  color: #d9ffe8;
}

/* Buttons */
.button-row{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.btn,
button{
  appearance: none;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

.btn:hover,
button:hover{
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08));
  color: var(--accent);
}

.btn-secondary{
  background: rgba(255,255,255,0.04);
}

.bottom-link{
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.bottom-link a{
  color: var(--text);
  text-decoration: none;
}

.bottom-link a:hover{
  color: var(--accent);
}

/* Account page */
.account-dashboard{
  display: grid;
  gap: 18px;
}

.profile-head{
  text-align: center;
  margin-top: 4px;
}

.profile-name{
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
  font-family: "CopperplateGothicBold", Georgia, serif;
  font-style: italic;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: .4px;
}

.profile-id{
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.account-actions{
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.account-link-button{
  display: block;
  text-align: center;
  padding: 14px 18px;
  background: var(--panel-soft);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
  transition: transform .12s ease, background .18s ease, color .18s ease;
  min-width: 180px;
}

.account-link-button.small{
  min-width: 160px;
}

.account-link-button:hover{
  transform: translateY(-1px);
  background: var(--panel-hover);
  color: var(--accent);
}

.account-section-title{
  margin: 2px 0 0 0;
  font-size: clamp(18px, 2.2vw, 24px);
}

.account-section-title.centered{
  text-align: center;
}

/* Favorites */
.favorites-showcase{
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 22px;
}

.favorite-entry{
  text-decoration: none;
  color: var(--text);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  background: var(--panel-soft);
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.favorite-entry:hover{
  transform: translateY(-2px);
  background: var(--panel-hover);
  border-color: color-mix(in srgb, var(--panel-border) 60%, #fff 40%);
}

.favorite-media{
  height: 220px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
}

.favorite-media.no-image{
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)),
    rgba(255,255,255,0.04);
}

.favorite-category{
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.favorite-title{
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.favorite-footer{
  padding: 12px 14px;
  border-top: 1px solid var(--panel-border);
  background: rgba(255,255,255,0.03);
}

.favorite-code{
  font-size: 13px;
  color: var(--muted);
}

.favorite-name{
  margin-top: 4px;
  font-weight: 700;
  line-height: 1.3;
}

.favorite-empty{
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
}

@media (max-width: 1180px){
  .favorites-showcase{
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}

@media (max-width: 900px){
  .favorites-showcase{
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 700px){
  .favorites-showcase{
    grid-template-columns: 1fr;
  }

  .auth-card{
    padding: 18px;
  }

  .favorite-media{
    height: 200px;
  }

  .profile-name{
    font-size: 34px;
  }
}