/* =========================================================
   Rappelz Snow NG — Dark Fantasy Winter Theme
   ========================================================= */

@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');

/* --- Variables --- */
:root {
  --bg-void:       #04060f;
  --bg-deep:       #070c1a;
  --bg-panel:      #0b1225;
  --bg-panel2:     #0d1630;
  --border-ice:    #1e3a5f;
  --border-glow:   #2a5a8a;
  --ice-dim:       #3a7ab8;
  --ice:           #5ab4f0;
  --ice-bright:    #8dd4ff;
  --ice-crystal:   #c8ecff;
  --gold:          #c8a84b;
  --gold-bright:   #e8c86a;
  --snow:          #ddeeff;
  --text-body:     #a8c4dc;
  --text-muted:    #4a6a88;
  --red-danger:    #e05555;
  --green-ok:      #55d4a0;
  --shadow-ice:    0 0 40px rgba(90, 180, 240, 0.15);
  --shadow-glow:   0 0 80px rgba(90, 180, 240, 0.25);
  --r:             6px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-void);
  color: var(--text-body);
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Snow Canvas --- */
#snow-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* --- Noise 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: 0;
  opacity: 0.4;
}

/* --- Layout wrapper --- */
.page-wrapper {
  position: relative;
  z-index: 1;
}

/* =========================================================
   NAVIGATION
   ========================================================= */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(4,6,15,0.98) 0%, rgba(4,6,15,0.8) 100%);
  border-bottom: 1px solid var(--border-ice);
  backdrop-filter: blur(12px);
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--ice-bright);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px rgba(141, 212, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-logo .logo-icon { font-size: 1.4rem; }

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

.nav-links a {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-body);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--ice);
  transform: scaleX(0);
  transition: transform 0.25s;
}

.nav-links a:hover { color: var(--ice-bright); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg-deep) !important;
  background: linear-gradient(135deg, var(--ice), var(--ice-bright));
  padding: 0.5rem 1.4rem;
  border-radius: var(--r);
  text-decoration: none;
  transition: filter 0.2s, transform 0.2s;
  box-shadow: 0 0 20px rgba(90,180,240,0.3);
}

.nav-cta:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.nav-cta::after { display: none !important; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 100px 2rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(20, 60, 110, 0.4) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 80%, rgba(10, 30, 60, 0.5) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-void) 0%, var(--bg-deep) 50%, var(--bg-void) 100%);
}

/* decorative ice lines */
.hero-bg::before, .hero-bg::after {
  content: '';
  position: absolute;
  left: 50%; top: 0;
  transform: translateX(-50%);
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--ice-dim), transparent);
}
.hero-bg::before { height: 200px; top: 0; opacity: 0.5; }
.hero-bg::after  { height: 300px; top: 50%; width: 600px; height: 1px;
                   background: linear-gradient(90deg, transparent, var(--border-ice), transparent); opacity: 0.6; }

.hero-content {
  position: relative;
  max-width: 780px;
}

.hero-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ice);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.hero-eyebrow::before, .hero-eyebrow::after {
  content: '';
  width: 50px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ice-dim));
}
.hero-eyebrow::after { transform: scaleX(-1); }

.hero-title {
  font-family: 'Cinzel Decorative', serif;
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 1.05;
  margin-bottom: 0.3rem;
  color: var(--snow);
  text-shadow:
    0 0 60px rgba(141,212,255,0.5),
    0 0 120px rgba(90,180,240,0.2);
  animation: fadeUp 0.8s ease both;
}

.hero-title .title-accent {
  display: block;
  color: var(--ice-bright);
  font-size: 0.65em;
  letter-spacing: 0.18em;
  text-shadow: 0 0 40px rgba(141,212,255,0.8);
}

.hero-sub {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 1.8rem;
  animation: fadeUp 0.8s 0.15s ease both;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-body);
  max-width: 520px;
  margin: 0 auto 3rem;
  animation: fadeUp 0.8s 0.25s ease both;
}

.hero-actions {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.35s ease both;
}

.btn-primary {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bg-void);
  background: linear-gradient(135deg, var(--ice) 0%, var(--ice-bright) 100%);
  padding: 0.9rem 2.6rem;
  border-radius: var(--r);
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(90,180,240,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  display: inline-block;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 50px rgba(90,180,240,0.6);
  filter: brightness(1.1);
}

.btn-secondary {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice-bright);
  background: transparent;
  padding: 0.9rem 2.6rem;
  border-radius: var(--r);
  border: 1px solid var(--border-glow);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  display: inline-block;
}

.btn-secondary:hover {
  background: rgba(90,180,240,0.08);
  border-color: var(--ice);
  transform: translateY(-2px);
}

/* scroll arrow */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.5;
  animation: bounce 2s infinite;
}
.hero-scroll span { display: block; width: 1px; height: 40px; background: linear-gradient(180deg, var(--ice), transparent); }
.hero-scroll i    { font-size: 0.7rem; color: var(--ice); }

/* =========================================================
   FEATURES STRIP
   ========================================================= */
.features-strip {
  background: linear-gradient(90deg, transparent, var(--bg-panel) 20%, var(--bg-panel) 80%, transparent);
  border-top: 1px solid var(--border-ice);
  border-bottom: 1px solid var(--border-ice);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.feat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-body);
}

.feat-item .feat-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(90,180,240,0.1);
  border: 1px solid var(--border-ice);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  color: var(--ice);
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section {
  padding: 7rem 2rem;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 4.5rem;
}

.section-tag {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ice);
  display: block;
  margin-bottom: 0.9rem;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--snow);
  margin-bottom: 0.8rem;
}

.section-lead {
  color: var(--text-body);
  max-width: 540px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.divider {
  width: 60px; height: 2px;
  background: linear-gradient(90deg, var(--ice-dim), var(--ice-bright), var(--ice-dim));
  margin: 1.2rem auto 0;
  border-radius: 2px;
}

/* --- Content Grid --- */
.content-max {
  max-width: 1100px;
  margin: 0 auto;
}

/* =========================================================
   INFO CARDS
   ========================================================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border-ice);
  border-radius: calc(var(--r) * 1.5);
  padding: 2rem 1.8rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(90,180,240,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--ice-dim);
  box-shadow: var(--shadow-ice);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1.2rem;
  display: block;
}

.card-title {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--snow);
  margin-bottom: 0.75rem;
}

.card p { font-size: 0.98rem; color: var(--text-body); }

/* =========================================================
   STATS BAR
   ========================================================= */
.stats-bar {
  background: var(--bg-panel);
  border-top: 1px solid var(--border-ice);
  border-bottom: 1px solid var(--border-ice);
  padding: 3.5rem 2rem;
  position: relative;
  z-index: 1;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
}

.stat-item { text-align: center; }

.stat-number {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--ice-bright);
  display: block;
  text-shadow: 0 0 30px rgba(141,212,255,0.5);
  line-height: 1;
}

.stat-label {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-top: 0.5rem;
}

/* =========================================================
   REGISTER SECTION (page register)
   ========================================================= */
.register-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 1.5rem 4rem;
  background:
    radial-gradient(ellipse 70% 60% at 50% 10%, rgba(20,60,110,0.45) 0%, transparent 65%),
    linear-gradient(180deg, var(--bg-void), var(--bg-deep));
  position: relative;
  z-index: 1;
}

.register-container {
  width: 100%;
  max-width: 500px;
}

.register-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.register-header .eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ice);
  display: block;
  margin-bottom: 0.7rem;
}

.register-header h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  color: var(--snow);
  text-shadow: 0 0 40px rgba(141,212,255,0.4);
}

.register-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-ice);
  border-radius: calc(var(--r) * 2);
  padding: 2.8rem 2.4rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), var(--shadow-ice);
  position: relative;
  overflow: hidden;
}

.register-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ice-dim), var(--ice-bright), var(--ice-dim), transparent);
}

/* Form */
.form-group {
  margin-bottom: 1.4rem;
}

.form-label {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ice-dim);
  display: block;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border-ice);
  border-radius: var(--r);
  padding: 0.85rem 1rem;
  color: var(--snow);
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
  border-color: var(--ice-dim);
  box-shadow: 0 0 0 3px rgba(90,180,240,0.12);
}

.form-input.is-error { border-color: var(--red-danger); }

.form-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  display: block;
}

/* Strength bar */
.strength-bar {
  height: 3px;
  border-radius: 2px;
  background: var(--border-ice);
  margin-top: 0.5rem;
  overflow: hidden;
}

.strength-bar-fill {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.35s, background 0.35s;
}

/* Submit button */
.btn-register {
  width: 100%;
  margin-top: 0.8rem;
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bg-void);
  background: linear-gradient(135deg, var(--ice) 0%, var(--ice-bright) 100%);
  border: none;
  padding: 1rem;
  border-radius: var(--r);
  cursor: pointer;
  box-shadow: 0 0 30px rgba(90,180,240,0.35);
  transition: filter 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-register:hover:not(:disabled) {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(90,180,240,0.5);
}

.btn-register:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-register .btn-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: var(--bg-void);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

.btn-register.loading .btn-spinner { display: inline-block; }
.btn-register.loading .btn-text    { opacity: 0.7; }

/* Alerts */
.alert {
  border-radius: var(--r);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.4rem;
  font-size: 0.95rem;
  display: none;
}

.alert.show { display: block; }

.alert-error {
  background: rgba(224,85,85,0.1);
  border: 1px solid rgba(224,85,85,0.35);
  color: #f08080;
}

.alert-success {
  background: rgba(85,212,160,0.1);
  border: 1px solid rgba(85,212,160,0.35);
  color: var(--green-ok);
}

.alert ul { margin: 0.3rem 0 0 1.1rem; }
.alert li { margin-bottom: 0.2rem; }

/* Login redirect */
.login-redirect {
  text-align: center;
  margin-top: 1.8rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.login-redirect a {
  color: var(--ice);
  text-decoration: none;
  transition: color 0.2s;
}

.login-redirect a:hover { color: var(--ice-bright); }

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  border-top: 1px solid var(--border-ice);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
  background: rgba(4,6,15,0.7);
}

.footer-logo {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1rem;
  font-weight: 900;
  color: var(--ice-bright);
  margin-bottom: 0.5rem;
}

footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

footer a { color: var(--ice-dim); text-decoration: none; }
footer a:hover { color: var(--ice); }

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 700px) {
  nav { padding: 0 1.2rem; }
  .nav-links { gap: 1.2rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .stats-grid { gap: 2.5rem; }
  .register-card { padding: 2rem 1.4rem; }
  .features-strip { gap: 1.5rem; }
}

@media (max-width: 480px) {
  .nav-links .hide-mobile { display: none; }
}
