/* ========================================
   TENKA Auth Pages (Login / Signup)
   Shared dark premium theme
   ======================================== */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121f;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --accent: #ff4500;
  --accent-glow: rgba(255, 69, 0, 0.3);
  --accent-light: #ff6a33;
  --accent-green: #00c853;
  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --text-muted: #555577;
  --border: #2a2a44;
  --border-focus: #ff4500;
  --error: #ff4444;
  --radius: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Noto Sans JP', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

/* Background glow */
body::before {
  content: '';
  position: fixed;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

/* ========== AUTH CARD ========== */
.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo a {
  text-decoration: none;
}
.auth-logo .logo {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #ff8a00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
}
.auth-logo p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.auth-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 28px;
}

/* ========== FORM ========== */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
}
.form-group input::placeholder {
  color: var(--text-muted);
}

/* Checkbox */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}
.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.form-check label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.form-check a {
  color: var(--accent-light);
  text-decoration: none;
}
.form-check a:hover {
  text-decoration: underline;
}

/* ========== BUTTONS ========== */
.btn-auth {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-submit {
  background: linear-gradient(135deg, var(--accent), #ff6a00);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
  margin-bottom: 12px;
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}
.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-line {
  background: #06C755;
  color: #fff;
}
.btn-line:hover {
  background: #05b34c;
  transform: translateY(-2px);
}

.btn-google {
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
  margin-top: 10px;
}
.btn-google:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========== DIVIDER ========== */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ========== ERROR / SUCCESS ========== */
.auth-error {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  color: var(--error);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: none;
}
.auth-error.show {
  display: block;
}

.auth-success {
  background: rgba(0, 200, 83, 0.1);
  border: 1px solid rgba(0, 200, 83, 0.3);
  color: var(--accent-green);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: none;
}
.auth-success.show {
  display: block;
}

/* ========== LINKS ========== */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.auth-footer a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
}
.auth-footer a:hover {
  text-decoration: underline;
}

.back-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}
.back-link:hover {
  color: var(--text-secondary);
}

/* ========== LOADING ========== */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px;
    border-radius: 12px;
  }
  .auth-container {
    padding: 16px;
  }
}
