/* ============================================================
   GoldenCraft — Panel Auth Styles  |  Edo-Punk Edition
   Plik: auth.css
   ============================================================ */

/* ===== Layout ===== */
.auth-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  z-index: 10;
}

.auth-back {
  position: fixed;
  top: 20px;
  left: 20px;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  color: #7a7a7a;
  text-decoration: none;
  transition: color .3s, transform .3s;
  z-index: 100;
}
.auth-back:hover {
  color: var(--gold);
  transform: translateX(-3px);
}

/* ===== Auth Box ===== */
.auth-box {
  width: 100%;
  max-width: 460px;
  background: rgba(13, 13, 18, .95);
  border: 2px solid rgba(255, 215, 0, .25);
  border-top: 2px solid rgba(192, 57, 43, .4);
  border-radius: 18px;
  padding: 36px 32px 32px;
  box-shadow:
    0 0 40px rgba(255, 215, 0, .05),
    0 20px 50px rgba(0, 0, 0, .6),
    inset 0 1px 0 rgba(255, 255, 255, .03);
  position: relative;
  overflow: hidden;
}

/* Czerwono-złoty pasek górny */
.auth-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--akane, #C0392B), var(--gold, #FFD700), var(--akane, #C0392B), transparent);
  opacity: .7;
}

/* Kanji dekoracyjne w tle boxa */
.auth-box::after {
  content: '金';
  position: absolute;
  right: -10px; bottom: -20px;
  font-size: 140px;
  color: rgba(255, 215, 0, .025);
  pointer-events: none;
  font-family: sans-serif;
  line-height: 1;
  z-index: 0;
}

/* Wszystkie dzieci ponad pseudo-elementem */
.auth-box > * { position: relative; z-index: 1; }

.panel-box {
  max-width: 520px;
}

/* ===== Logo ===== */
.auth-logo-wrap {
  text-align: center;
  margin-bottom: 20px;
}
.auth-logo {
  max-width: 240px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .8));
  transition: filter .3s;
}
.auth-logo:hover {
  filter: drop-shadow(0 8px 16px rgba(255, 215, 0, .3));
}

/* Japoński napis pod logo */
.auth-jp-sub {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(7px, 1.2vw, 9px);
  color: var(--akane, #C0392B);
  text-align: center;
  letter-spacing: 5px;
  opacity: .45;
  margin-top: -8px;
  margin-bottom: 16px;
}

/* ===== Title & subtitle ===== */
.auth-title {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(13px, 2.8vw, 18px);
  color: var(--gold, #FFD700);
  text-shadow: 2px 2px 0 var(--gold-dark, #B8860B), 0 0 16px rgba(255, 215, 0, .2);
  text-align: center;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(7px, 1.3vw, 9px);
  color: #5a5a6a;
  text-align: center;
  margin-bottom: 22px;
  line-height: 1.6;
}

/* ===== Alerts ===== */
.alert {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(7px, 1.3vw, 9px);
  line-height: 1.7;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  text-align: center;
}
.alert a { color: var(--gold, #FFD700); text-decoration: underline; }

.alert-error {
  background: rgba(192, 57, 43, .08);
  border: 1px solid rgba(192, 57, 43, .3);
  color: #ff6b6b;
}
.alert-success {
  background: rgba(76, 175, 80, .08);
  border: 1px solid rgba(76, 175, 80, .25);
  color: #69f0ae;
}

/* ===== Form ===== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(7px, 1.2vw, 9px);
  color: #7a7a8a;
  letter-spacing: .5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(9px, 1.6vw, 12px);
  color: var(--text, #e9e9e9);
  background: rgba(0, 0, 0, .5);
  border: 2px solid rgba(255, 255, 255, .07);
  border-radius: 10px;
  padding: 13px 16px;
  outline: none;
  transition: border-color .3s, box-shadow .3s;
  width: 100%;
}
.form-group input::placeholder {
  color: #333340;
}
.form-group input:focus {
  border-color: rgba(255, 215, 0, .4);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, .06), 0 0 16px rgba(255, 215, 0, .06);
}

.form-hint {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(5px, 1vw, 7px);
  color: #4a4a5a;
}

/* Password toggle */
.password-wrap {
  position: relative;
}
.password-wrap input {
  padding-right: 48px;
}
.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  opacity: .45;
  transition: opacity .3s;
  padding: 4px;
  line-height: 1;
}
.toggle-pass:hover { opacity: 1; }

/* ===== Button ===== */
.btn {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(9px, 1.6vw, 12px);
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  cursor: pointer;
  transition: all .3s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-gold {
  color: #000;
  background: linear-gradient(180deg, #FFD700, #B8860B);
  box-shadow:
    0 4px 0 #8B6914,
    0 6px 16px rgba(0, 0, 0, .5),
    0 0 20px rgba(255, 215, 0, .12);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .3);
  position: relative;
  overflow: hidden;
}
.btn-gold::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.08) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform .5s;
}
.btn-gold:hover::before { transform: translateX(100%); }
.btn-gold:hover {
  background: linear-gradient(180deg, #FFE44D, #DAA520);
  box-shadow:
    0 4px 0 #8B6914,
    0 6px 20px rgba(0, 0, 0, .5),
    0 0 30px rgba(255, 215, 0, .22);
  transform: translateY(-2px);
}
.btn-gold:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #8B6914, 0 2px 8px rgba(0,0,0,.4);
}

.btn-outline {
  color: #7a7a8a;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 8px 16px;
  font-size: clamp(6px, 1.1vw, 8px);
}
.btn-outline:hover {
  color: var(--gold, #FFD700);
  border-color: rgba(255, 215, 0, .25);
}

.btn-sm {
  padding: 8px 14px;
  font-size: clamp(6px, 1vw, 8px);
}

/* ===== Links ===== */
.auth-links {
  text-align: center;
  margin-top: 18px;
}
.auth-links a {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(7px, 1.2vw, 9px);
  color: #5a5a6a;
  text-decoration: none;
  transition: color .3s;
}
.auth-links a:hover { color: var(--gold, #FFD700); }

.auth-footer {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(6px, 1.1vw, 8px);
  color: #3a3a4a;
  text-align: center;
  margin-top: 24px;
  line-height: 1.7;
}

.auth-note {
  margin-top: 18px;
  padding: 14px;
  background: rgba(192, 57, 43, .04);
  border: 1px solid rgba(192, 57, 43, .12);
  border-radius: 10px;
}
.auth-note p {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(5px, 1vw, 7px);
  color: #5a5a6a;
  line-height: 1.8;
  margin-bottom: 6px;
}
.auth-note p:last-child { margin-bottom: 0; }
.auth-note code {
  color: var(--gold, #FFD700);
  background: rgba(255, 215, 0, .08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: inherit;
}

/* ===== Panel-specific ===== */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-header .auth-title {
  font-size: clamp(11px, 2.2vw, 16px);
  margin-bottom: 0;
  text-align: left;
}

.panel-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .05);
  border-left: 2px solid rgba(192, 57, 43, .3);
  border-radius: 10px;
  margin-bottom: 20px;
}
.panel-label {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(7px, 1.2vw, 9px);
  color: #6a6a7a;
}

.badge {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(5px, .9vw, 7px);
  padding: 4px 8px;
  border-radius: 6px;
}
.badge-warn {
  color: #ffa726;
  background: rgba(255, 167, 38, .08);
  border: 1px solid rgba(255, 167, 38, .2);
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  padding-bottom: 0;
}

.tab {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(6px, 1.1vw, 8px);
  color: #5a5a6a;
  background: none;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  position: relative;
  transition: color .3s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: #9a9aaa; }
.tab.active {
  color: var(--gold, #FFD700);
  border-bottom-color: var(--gold, #FFD700);
}

.tab-content { display: none; }
.tab-content.active { display: flex; }

/* ===== Utility ===== */
.gold { color: var(--gold, #FFD700) !important; }
.text-muted { color: #4a4a5a; font-family: 'Press Start 2P', cursive; font-size: clamp(7px, 1.2vw, 9px); }
:root {
  --gold: #FFD700;
  --gold-dark: #B8860B;
  --akane: #C0392B;
  --bg: #060608;
  --text: #e9e9e9;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .auth-box { padding: 28px 20px 24px; border-radius: 14px; }
  .panel-header { flex-direction: column; align-items: flex-start; }
  .tabs { flex-direction: column; gap: 0; }
  .tab { border-bottom: none; border-left: 2px solid transparent; text-align: left; }
  .tab.active { border-left-color: var(--gold, #FFD700); border-bottom-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
