/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #f5f5f5;
  --bg-secondary: #e8e8e8;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(245, 245, 245, 0.95);
  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-shadow: rgba(0, 0, 0, 0.08);

  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #999999;

  --accent: #111111;
  --accent-hover: #333333;
  --accent-glow: rgba(0, 0, 0, 0.1);

  --star-empty: #d4d4d4;
  --star-filled: #f5a623;
  --star-hover: #f0c060;

  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;

  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(0, 0, 0, 0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(0, 0, 0, 0.01) 0%, transparent 50%);
  z-index: -1;
  animation: bgShift 20s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(-5%, 3%);
  }
}

/* ===== Auth Overlay ===== */
.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px);
  align-items: center;
  justify-content: center;
}

.auth-overlay.active {
  display: flex;
}

.auth-card {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
  animation: authIn 0.4s ease;
}

@keyframes authIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-brand {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #111, #555);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.05);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 8px 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab:hover {
  color: var(--text-primary);
}

.auth-tab.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-error {
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 500;
  min-height: 20px;
  margin-bottom: 8px;
  text-align: center;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ===== Forgot Password Link ===== */
.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 8px 0 0;
  width: 100%;
  text-align: center;
  transition: var(--transition);
}

.btn-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.forgot-pw-link {
  display: block;
  margin-top: 12px;
}

/* ===== Registration Steps Indicator ===== */
.reg-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
  padding: 0 8px;
}

.reg-step {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.4;
  transition: all 0.3s ease;
}

.reg-step.active {
  opacity: 1;
}

.reg-step.completed {
  opacity: 0.7;
}

.reg-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  border: 2px solid rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.reg-step.active .reg-step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 16px var(--accent-glow);
}

.reg-step.completed .reg-step-num {
  background: rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.reg-step.completed .reg-step-num::after {
  content: '✓';
  position: absolute;
}

.reg-step-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.reg-step.active .reg-step-label {
  color: var(--text-primary);
}

.reg-step-line {
  width: 24px;
  height: 2px;
  background: rgba(0, 0, 0, 0.1);
  margin: 0 6px;
  border-radius: 2px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.reg-step-line.completed {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ===== Registration Step Content ===== */
.reg-step-content {
  display: none;
  animation: regStepIn 0.35s ease;
}

.reg-step-content.active {
  display: block;
}

@keyframes regStepIn {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.reg-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.reg-btn-row .btn {
  flex: 1;
  justify-content: center;
}

/* ===== Field Hint ===== */
.field-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  padding-left: 2px;
}

/* ===== Password Strength Meter ===== */
.pw-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.pw-bar {
  flex: 1;
  height: 4px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.pw-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease, background 0.3s ease;
}

.pw-bar-fill.pw-weak {
  background: var(--danger);
}

.pw-bar-fill.pw-medium {
  background: var(--warning);
}

.pw-bar-fill.pw-strong {
  background: var(--success);
}

.pw-label {
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.pw-label.pw-weak {
  color: var(--danger);
}

.pw-label.pw-medium {
  color: var(--warning);
}

.pw-label.pw-strong {
  color: var(--success);
}

/* ===== Security Question Info Box ===== */
.security-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.security-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.security-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ===== Forgot Password Steps ===== */
.forgot-step {
  display: none;
  animation: regStepIn 0.35s ease;
}

.forgot-step.active {
  display: block;
}

.forgot-user-info {
  margin-bottom: 20px;
}

.forgot-user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
}

.forgot-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #111);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.security-question-display {
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

.forgot-success-icon {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 8px;
  animation: starPop 0.5s ease;
}

.forgot-verified-msg {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

/* Email input type */
input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(255,255,255,0.08);
}

input[type="email"]::placeholder {
  color: var(--text-muted);
}

/* ===== Navigation ===== */
#main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-brand {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #111, #555);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.03);
  padding: 4px;
  border-radius: 10px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.03);
}

.nav-tab.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.tab-icon {
  font-size: 1rem;
}

.nav-tab-admin {
  border-left: 1px solid var(--glass-border);
  margin-left: 4px;
}

/* User info in nav */
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #111);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== Club Selector ===== */
.nav-club-selector {
  position: relative;
  flex-shrink: 0;
  margin: 0 12px 0 24px;
}

.club-switch-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--accent);
  border: none;
  border-radius: 99px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.club-switch-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.club-icon {
  font-size: 1.1rem;
}

.club-arrow {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
}

.club-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  z-index: 200;
  overflow: hidden;
  animation: bggDropIn 0.2s ease;
}

.club-dropdown.show {
  display: block;
}

.club-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.club-dropdown-item:last-child {
  border-bottom: none;
}

.club-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.club-dropdown-item.active {
  background: rgba(0, 0, 0, 0.06);
  font-weight: 700;
}

.club-dropdown-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.club-dropdown-members {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.club-dropdown-empty {
  padding: 16px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== Club Management ===== */
.club-member-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.club-member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-sm);
}

.club-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #111);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.club-member-name {
  font-size: 0.88rem;
  font-weight: 600;
}

.club-request-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.club-browse-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

/* ===== Admin Club List ===== */
.admin-club-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: var(--transition);
}

.admin-club-item:hover {
  background: var(--bg-card-hover);
}

.admin-club-info {
  flex: 1;
  min-width: 0;
}

.admin-club-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.admin-club-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.admin-club-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.admin-club-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.admin-club-item-wrap {
  margin-bottom: 10px;
}

.admin-club-detail {
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--glass-border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.admin-club-detail-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.admin-club-member-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-club-member-check {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.admin-club-member-check:hover {
  background: rgba(0, 0, 0, 0.06);
}

.admin-club-member-check input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}

/* ===== Views ===== */
.view {
  display: none;
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  animation: fadeIn 0.35s ease;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-header {
  margin-bottom: 32px;
}

.view-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== Glass Card ===== */
.admin-form-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 36px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px var(--glass-shadow);
}

.admin-form-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

/* ===== Form ===== */
.form-group {
  margin-bottom: 16px;
  flex: 1;
}

.form-row {
  display: flex;
  gap: 16px;
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="text"],
input[type="url"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(255,255,255,0.08);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

textarea {
  resize: vertical;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-danger {
  background: rgba(192, 57, 43, 0.1);
  color: var(--danger);
}

.btn-danger:hover {
  background: rgba(192, 57, 43, 0.18);
}

.btn-icon {
  font-size: 1.1em;
}

/* ===== Badge ===== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  /* badge */
  font-weight: 700;
  border-radius: 99px;
  margin-left: 8px;
}

/* ===== Game List Section ===== */
.game-list-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.admin-game-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-game-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
  animation: slideIn 0.3s ease;
}

.admin-game-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 0, 0, 0.15);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.admin-game-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.admin-game-info {
  flex: 1;
  min-width: 0;
}

.admin-game-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-game-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.genre-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-game-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ===== Rating Sort Bar ===== */
.rating-sort-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.sort-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.sort-select {
  padding: 6px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(180,165,140,0.3);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.sort-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.sort-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* ===== Rating Grid ===== */
.rating-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(640px, 1fr));
  gap: 20px;
}

.rating-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  animation: fadeIn 0.4s ease;
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.rating-card:hover {
  border-color: rgba(0, 0, 0, 0.18);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.rating-card-image {
  width: 280px;
  height: auto;
  align-self: stretch;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--bg-secondary);
}

.rating-card-body {
  padding: 20px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.rating-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.rating-card-actions .btn {
  padding: 5px 12px;
  font-size: 0.75rem;
  gap: 4px;
}

.rating-card-actions .my-data-btn {
  margin-top: 0;
}

.rating-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.rating-card-genre {
  margin-bottom: 8px;
}

.rating-card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Star Rating Row ===== */
.star-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.star-buttons {
  display: flex;
  gap: 2px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--star-empty);
  transition: all 0.15s ease;
  padding: 2px;
  line-height: 1;
}

.star-btn.active {
  color: var(--star-filled);
}

.star-btn.hover {
  color: var(--star-hover);
  transform: scale(1.15);
}

.star-fine-tune {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: 4px;
}

.fine-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.fine-minus { border-radius: 6px 0 0 6px; }
.fine-plus { border-radius: 0 6px 6px 0; }

.fine-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.star-score-display {
  min-width: 38px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--star-filled);
  background: rgba(0, 0, 0, 0.02);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.rating-feedback {
  font-size: 0.8rem;
  color: var(--success);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.rating-feedback.show {
  opacity: 1;
}

/* ===== Play Count ===== */
.playcount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-sm);
}

.playcount-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.playcount-control {
  display: flex;
  align-items: center;
  gap: 0;
}

.playcount-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.playcount-minus {
  border-radius: 6px 0 0 6px;
}

.playcount-plus {
  border-radius: 0 6px 6px 0;
}

.playcount-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.playcount-value {
  min-width: 36px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.02);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

/* ===== Ownership Row ===== */
.ownership-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-sm);
}

.ownership-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.ownership-avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ownership-chip {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 99px;
}

.ownership-none {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ===== Dashboard ===== */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  backdrop-filter: blur(12px);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #111, #555);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.dashboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
  animation: slideIn 0.3s ease;
}

.dashboard-item:hover {
  background: var(--bg-card-hover);
}

.dashboard-rank {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-muted);
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}

.dashboard-rank.top-1 {
  color: #d4a017;
}

.dashboard-rank.top-2 {
  color: #8a8a8a;
}

.dashboard-rank.top-3 {
  color: #b5651d;
}

.dashboard-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.dashboard-info {
  flex: 1;
  min-width: 0;
}

.dashboard-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.dashboard-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dashboard-score-area {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.dashboard-score {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--star-filled);
}

.dashboard-stars {
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: var(--star-filled);
}

.dashboard-votes {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== Score Bar ===== */
.score-bar-container {
  width: 100%;
  max-width: 120px;
  height: 6px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}

.score-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--star-filled));
  border-radius: 99px;
  transition: width 0.6s ease;
}

/* ===== Empty State ===== */
.empty-state {
  display: none;
  text-align: center;
  padding: 64px 24px;
  animation: fadeIn 0.4s ease;
}

.empty-state.show {
  display: block;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
}

.empty-sub {
  color: var(--text-muted) !important;
  font-size: 0.85rem !important;
  margin-top: 4px;
}

/* ===== Confirm Modal ===== */
.confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.confirm-overlay.active {
  display: flex;
}

.confirm-card {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
  animation: authIn 0.25s ease;
}

.confirm-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.confirm-msg {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-actions .btn {
  min-width: 80px;
  justify-content: center;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 12px 24px;
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 200;
  backdrop-filter: blur(12px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== BGG Search ===== */
.bgg-search-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px var(--glass-shadow);
  position: relative;
}

.bgg-search-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.bgg-search-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.bgg-search-row {
  display: flex;
  gap: 10px;
}

.bgg-input-wrap {
  flex: 1;
  position: relative;
}

.bgg-input-wrap input {
  width: 100%;
  padding: 10px 40px 10px 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.bgg-input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(255,255,255,0.08);
}

.bgg-input-wrap input::placeholder {
  color: var(--text-muted);
}

.bgg-spinner {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  display: none;
  animation: bggSpin 0.6s linear infinite;
}

.bgg-spinner.show {
  display: block;
}

@keyframes bggSpin {
  to { transform: translateY(-50%) rotate(360deg); }
}

.search-sources {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.search-source-block {
  display: flex;
  flex-direction: column;
}

.search-source-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0 2px 6px;
  letter-spacing: 0.02em;
}

.search-source-title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.search-source-status {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

.search-source-status.loading {
  color: var(--accent);
}

.search-source-status.error {
  color: #c33;
}

.bgg-results {
  display: none;
  margin-top: 0;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  animation: bggDropIn 0.2s ease;
}

.bgg-results.show {
  display: block;
}

@keyframes bggDropIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bgg-results::-webkit-scrollbar {
  width: 6px;
}

.bgg-results::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 99px;
}

.bgg-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.bgg-result-item:last-child {
  border-bottom: none;
}

.bgg-result-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.bgg-result-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.bgg-result-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bgg-result-year {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.bgg-select-btn {
  flex-shrink: 0;
  margin-left: 12px;
}

.bgg-no-results {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.bgg-source-pill {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #ff5100, #c94100);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bgg-loading-detail {
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  #main-nav {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    gap: 8px;
  }

  .nav-center {
    order: 3;
    width: 100%;
  }

  .nav-tabs {
    width: 100%;
  }

  .nav-tab {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .nav-user {
    order: 2;
  }

  .user-name {
    display: none;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .rating-grid {
    grid-template-columns: 1fr;
  }

  .rating-card {
    flex-direction: column;
  }

  .rating-card-image {
    width: 100%;
    height: 220px;
    align-self: auto;
  }
}

/* ===== Placeholder image ===== */
.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-secondary), rgba(0, 0, 0, 0.05));
  color: var(--text-muted);
  font-size: 2rem;
}

/* ===== BGG Token Setup ===== */
.bgg-token-card {
  max-width: 460px;
}

.bgg-token-guide {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.bgg-token-guide h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.bgg-token-guide ol {
  padding-left: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.bgg-token-guide a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  transition: var(--transition);
}

.bgg-token-guide a:hover {
  border-bottom-color: var(--accent);
}

/* ===== BGG Search Header ===== */
.bgg-search-header {
  margin-bottom: 16px;
}

.bgg-search-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.bgg-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#bgg-token-status {
  font-size: 0.8rem;
  font-weight: 600;
}

.token-ok {
  color: var(--success);
}

.token-missing {
  color: var(--danger);
}

/* Pulse animation for setup button */
.btn.pulse {
  animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.15); }
  50% { box-shadow: 0 0 0 8px rgba(0, 0, 0, 0); }
}

/* ===== BGG Token Needed State ===== */
.bgg-token-needed {
  padding: 32px 24px;
}

.bgg-token-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.bgg-token-needed p {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.bgg-hint {
  font-size: 0.8rem;
  color: var(--text-muted) !important;
  font-weight: 400 !important;
}

/* ===== BGG Search Input Disabled ===== */
.bgg-input-wrap input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.1);
}

/* ===== BGG Auto-Register Button States ===== */
.bgg-select-icon {
  font-weight: 700;
}

.bgg-select-btn {
  min-width: 72px;
  justify-content: center;
}

.btn-registered {
  background: var(--success) !important;
  color: #fff !important;
  pointer-events: none;
}

.bgg-loading-dots::after {
  content: '';
  animation: loadDots 1.5s steps(3) infinite;
}

@keyframes loadDots {
  0% { content: '.'; }
  33% { content: '..'; }
  66% { content: '...'; }
}

/* ===== Manual Add Toggle (details/summary) ===== */
.admin-form-card {
  cursor: default;
}

.manual-add-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
  list-style: none;
  transition: var(--transition);
}

.manual-add-toggle::-webkit-details-marker {
  display: none;
}

.manual-add-toggle::before {
  content: '??;
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  display: inline-block;
}

details[open] .manual-add-toggle::before {
  transform: rotate(90deg);
}

.manual-add-toggle:hover {
  color: var(--text-primary);
}

.manual-form-body {
  padding-top: 20px;
}

.manual-form-body h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

/* ===== BGG Badge on game cards ===== */
.bgg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  background: linear-gradient(135deg, #7b4397, #dc2430);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.04em;
  margin-left: 6px;
  text-transform: uppercase;
}

/* ===== Admin Badge in Nav ===== */
.admin-badge-nav {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: linear-gradient(135deg, #333, #111);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ===== User Management Section ===== */
.user-management-section {
  margin-top: 16px;
}

.user-management-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.section-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 32px 0 24px;
}

.badge-danger {
  background: var(--danger);
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-list-group {
  margin-bottom: 16px;
}

.user-list-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.user-list-banned {
  color: var(--danger);
}

.user-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
  animation: slideIn 0.3s ease;
}

.user-item:hover {
  background: var(--bg-card-hover);
}

.user-self {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.user-banned {
  opacity: 0.7;
  border-style: dashed;
}

.user-item-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #111);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.user-avatar-banned {
  background: linear-gradient(135deg, #aaa, #888);
}

.user-item-info {
  flex: 1;
  min-width: 0;
}

.user-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.user-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.user-me {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.user-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Role badges */
.role-badge {
  display: inline-flex;
  padding: 1px 7px;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.role-admin {
  background: linear-gradient(135deg, #333, #111);
  color: #fff;
}

.role-user {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-muted);
}

/* Success button for unban */
.btn-success {
  background: rgba(45, 134, 89, 0.12);
  color: var(--success);
}

.btn-success:hover {
  background: rgba(45, 134, 89, 0.2);
}

/* Superadmin role badge */
.role-superadmin {
  background: linear-gradient(135deg, #e65100, #ff9800);
  color: #fff;
}

/* Promote button */
.btn-promote {
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent);
}

.btn-promote:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* ===== Comment Section ===== */
.comment-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.comment-header {
  margin-bottom: 10px;
}

.comment-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.comment-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 99px;
  margin-left: 4px;
  vertical-align: middle;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 10px;
  padding-right: 4px;
}

.comment-list::-webkit-scrollbar {
  width: 4px;
}

.comment-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 99px;
}

.comment-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
  animation: fadeIn 0.3s ease;
}

.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #111);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  margin-top: 1px;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.comment-author {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

.comment-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.comment-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  word-break: break-word;
}

.comment-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition);
  opacity: 0;
}

.comment-item:hover .comment-delete {
  opacity: 1;
}

.comment-delete:hover {
  background: rgba(200, 50, 50, 0.1);
  color: var(--danger);
}

.comment-empty {
  padding: 12px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-input-row {
  display: flex;
  gap: 8px;
}

.comment-input {
  flex: 1;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
  transition: var(--transition);
}

.comment-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(255,255,255,0.08);
}

.comment-input::placeholder {
  color: var(--text-muted);
}

/* ===== Clickable User Links ===== */
.user-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.user-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===== User Overview Modal ===== */
.user-overview-card {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 0;
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
  animation: authIn 0.3s ease;
  position: relative;
  overflow: hidden;
}

.user-overview-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  z-index: 1;
}

.user-overview-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
}

.user-overview-header {
  padding: 28px 28px 0;
}

.uo-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.uo-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #111);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.uo-profile-info {
  flex: 1;
  min-width: 0;
}

.uo-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.uo-stats {
  display: flex;
  gap: 14px;
}

.uo-stat {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.uo-stat strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Overview tabs */
.user-overview-tabs {
  display: flex;
  gap: 0;
  padding: 16px 28px 0;
  border-bottom: 1px solid var(--glass-border);
}

.uo-tab {
  flex: 1;
  padding: 10px 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.uo-tab:hover {
  color: var(--text-primary);
}

.uo-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

/* Overview body */
.user-overview-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 28px 28px;
}

.user-overview-body::-webkit-scrollbar {
  width: 5px;
}

.user-overview-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 99px;
}

.uo-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Rating items */
.uo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 8px;
  transition: var(--transition);
}

.uo-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

.uo-item-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.uo-item-info {
  flex: 1;
  min-width: 0;
}

.uo-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uo-item-genre {
  margin-top: 2px;
}

.uo-item-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.uo-stars {
  font-size: 0.9rem;
  color: var(--star-empty);
  letter-spacing: 1px;
}

.uo-stars .filled {
  color: var(--star-filled);
}

.uo-score-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Comment items */
.uo-comment-item {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 8px;
}

.uo-comment-game {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.uo-comment-thumb {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.uo-comment-game-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.uo-comment-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.uo-comment-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.5;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px 12px 12px 12px;
  word-break: break-word;
}

/* ===== Rating card stats grid (display-only) ===== */
.rating-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin: 8px 0 6px;
}

.rating-stat {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 5px 8px;
  text-align: center;
  min-width: 0;
}

.rating-stat-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  margin-bottom: 1px;
}

.rating-stat-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.05;
}

.rating-stat-unit {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 2px;
}

.rating-stat-sub {
  font-size: 0.58rem;
  color: var(--text-muted);
  margin-top: 1px;
}

@media (max-width: 520px) {
  .rating-stats-grid { grid-template-columns: 1fr; }
}

/* ===== Mobile portrait (typical phone) ===== */
@media (max-width: 480px) {
  /* Nav: tighten and show icons only */
  #main-nav {
    padding: 8px 10px;
    gap: 6px;
  }
  .nav-brand {
    font-size: 0.95rem;
  }
  .nav-club-selector {
    margin: 0 4px 0 8px;
  }
  .club-switch-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    gap: 6px;
  }
  .nav-tab {
    padding: 8px 4px;
    gap: 0;
    font-size: 0;
    min-width: 0;
  }
  .nav-tab .tab-icon {
    font-size: 1.2rem;
  }
  .nav-user {
    gap: 6px;
  }
  .user-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  /* View container: tighter padding */
  .view {
    padding: 18px 14px 48px;
  }
  .view-header {
    margin-bottom: 20px;
  }
  .view-header h1 {
    font-size: 1.35rem;
  }
  .subtitle {
    font-size: 0.85rem;
  }

  /* Search row: stack input and button */
  .bgg-search-row {
    flex-direction: column;
    gap: 8px;
  }
  .bgg-search-row .btn {
    width: 100%;
  }

  /* Social filters: allow wrap */
  .social-filters {
    flex-wrap: wrap;
  }
  .social-filter {
    padding: 7px 12px;
    font-size: 0.78rem;
    flex: 1 1 auto;
  }

  /* Rating card: tighter body */
  .rating-card-body {
    padding: 14px;
  }
  .rating-card-image {
    height: 200px;
  }

  /* Modal cards: prevent overflow, less padding */
  .confirm-card,
  .user-overview-card {
    max-width: 95vw;
  }
  .confirm-card {
    padding: 22px;
  }

  /* Sort bar wrap */
  .rating-sort-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .sort-hint {
    flex-basis: 100%;
    font-size: 0.72rem;
  }
}

.my-data-btn {
  margin-top: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.my-data-btn:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(118, 75, 162, 0.4);
  filter: brightness(1.05);
}

.my-data-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* ===== My Data Input Modal ===== */
.my-data-card {
  max-width: 520px;
}

.my-data-header {
  padding: 28px 28px 0;
}

.my-data-game {
  display: flex;
  align-items: center;
  gap: 14px;
}

.my-data-img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.my-data-img.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.my-data-game-info {
  flex: 1;
  min-width: 0;
}

.my-data-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.my-data-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 28px 28px;
}

.my-data-body::-webkit-scrollbar { width: 5px; }
.my-data-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 99px;
}

.my-data-section {
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.my-data-section:last-child { border-bottom: none; }

.my-data-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.md-playcount {
  justify-content: flex-start;
}

.md-own-toggle {
  display: inline-flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.04);
  padding: 4px;
  border-radius: 10px;
}

.md-own-btn {
  padding: 8px 20px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.md-own-btn:hover {
  color: var(--text-primary);
}

.md-own-btn.active {
  background: #fff;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ===== Game Detail Modal ===== */
.dashboard-item {
  cursor: pointer;
}

.game-detail-card {
  max-width: 560px;
}

.game-detail-header {
  padding: 28px 28px 0;
}

.gd-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gd-image {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.gd-image.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.gd-profile-info {
  flex: 1;
  min-width: 0;
}

.gd-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.gd-genre {
  margin-bottom: 8px;
}

.gd-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.gd-description {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  word-break: break-word;
}

.gd-tab {
  flex: 1;
  padding: 10px 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gd-tab:hover {
  color: var(--text-primary);
}

.gd-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.gd-tab-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 7px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.gd-tab.active .gd-tab-count {
  background: var(--accent);
  color: #fff;
}

.gd-rating-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 8px;
}

.gd-user-link {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  border-bottom: none;
}

.gd-user-link:hover .gd-user-name {
  color: var(--accent);
}

.gd-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #111);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gd-user-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--transition);
}

.gd-comment-item {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 8px;
}

.gd-comment-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
  border-bottom: none;
}

.gd-comment-author:hover .gd-user-name {
  color: var(--accent);
}

.gd-comment-author .uo-comment-time {
  margin-left: auto;
}

/* ===== SOCIAL FEED ===== */
.social-filters {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.03);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.social-filter {
  flex: 0 1 auto;
  padding: 8px 18px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.social-filter:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.03);
}

.social-filter.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.social-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-item {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: var(--transition);
  animation: slideIn 0.3s ease;
}

.social-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 0, 0, 0.1);
}

.social-self {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.social-item-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #111);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.social-item-body {
  flex: 1;
  min-width: 0;
}

.social-item-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.social-user {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.social-action {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.social-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
}

.social-item-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-game-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-game-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.social-game-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.social-rating-stars {
  display: flex;
  align-items: center;
  gap: 2px;
}

.social-star {
  font-size: 1.1rem;
  color: var(--star-empty);
}

.social-star.filled {
  color: var(--star-filled);
}

.social-score {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-left: 8px;
}

.social-comment-bubble {
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 4px 12px 12px 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  word-break: break-word;
}

/* ===== MY PAGE ===== */
.mypage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.mypage-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.mypage-card:hover {
  box-shadow: var(--shadow-md);
}

.mypage-card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.mypage-card-wide {
  grid-column: 1 / -1;
}

.settings-club-card .settings-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: -6px 0 14px;
}

.settings-club-card .admin-form-card {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
  margin-bottom: 20px;
}

.settings-club-card .admin-form-card:last-child {
  margin-bottom: 0;
}

.settings-club-card .admin-form-card h2 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.settings-club-card > div:first-of-type .admin-form-card h2,
.settings-club-card .settings-hint + div .admin-form-card h2 {
  border-top: none;
  padding-top: 0;
}

.mypage-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* Profile */
.profile-avatar-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #111);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 auto 12px;
  overflow: hidden;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-current-name {
  text-align: center;
  margin-bottom: 18px;
  font-size: 0.95rem;
}

/* Avatar Edit Area */
.avatar-edit-area {
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #111);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  border: 3px solid rgba(0, 0, 0, 0.1);
}

.avatar-edit-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.avatar-upload-btn {
  cursor: pointer;
}

.avatar-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0;
}

/* Settings Sections */
.settings-section {
  margin-bottom: 8px;
}

.settings-section h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.settings-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 16px 0;
}

/* Settings View */
.settings-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 640px;
  margin: 0 auto;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.settings-card:hover {
  box-shadow: var(--shadow-md);
}

.settings-card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.settings-current-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 0;
}

.settings-form {
  /* container for form fields */
}

.profile-form-group {
  margin-bottom: 14px;
}

.profile-form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.profile-form-group input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(180,165,140,0.3);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
  margin-bottom: 6px;
  box-sizing: border-box;
}

.profile-form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.profile-input-row {
  display: flex;
  gap: 8px;
}

.profile-input-row input {
  flex: 1;
  margin-bottom: 0;
}

/* Settings Panel */
.settings-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 0.82rem;
}

.breadcrumb-link {
  background: none;
  border: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.breadcrumb-link:hover {
  background: rgba(0, 0, 0, 0.05);
}

.breadcrumb-sep {
  color: var(--text-muted);
}

.breadcrumb-current {
  color: var(--text-secondary);
  font-weight: 500;
}

.settings-pw-form {
  max-width: 400px;
}

.settings-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

/* Taste Matching */
.taste-match-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.taste-match-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(180,165,140,0.12);
  animation: slideIn 0.3s ease;
}

.taste-match-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #111);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.taste-match-info {
  flex: 1;
  min-width: 0;
}

.taste-match-name {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.taste-label {
  font-size: 0.72rem;
  font-weight: 400;
}

.taste-match-bar-bg {
  height: 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 4px;
}

.taste-match-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s ease;
}

.taste-match-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.taste-empty {
  padding: 16px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.btn-full {
  width: 100%;
  text-align: center;
  justify-content: center;
}

/* Memo */
#mypage-memo {
  width: 100%;
  padding: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(180,165,140,0.3);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  min-height: 120px;
  transition: var(--transition);
  box-sizing: border-box;
}

#mypage-memo:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.memo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.memo-saved {
  font-size: 0.78rem;
  color: var(--success);
  font-weight: 600;
}

/* Wishlist */
.wishlist-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  background: rgba(0,0,0,0.04);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.wishlist-tab {
  flex: 1;
  padding: 8px 12px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.wishlist-tab.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.wishlist-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.wishlist-select {
  flex: 1;
  padding: 8px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(180,165,140,0.3);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}

.wishlist-select:focus {
  border-color: var(--accent);
}

.wishlist-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wishlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(180,165,140,0.12);
  border-radius: var(--radius-sm);
  animation: slideIn 0.3s ease;
}

.wishlist-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.wishlist-item-info {
  flex: 1;
  min-width: 0;
}

.wishlist-item-title {
  font-size: 0.85rem;
  font-weight: 600;
}

.wishlist-item-genre {
  margin-top: 2px;
}

.wishlist-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Settings card link style */
.settings-card-link {
  cursor: pointer;
}

.settings-card-link:hover {
  border-color: rgba(0, 0, 0, 0.18);
  background: var(--bg-card-hover);
}

.settings-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-card-row h2 {
  margin-bottom: 4px;
}

.settings-card-value {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.settings-card-arrow {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 300;
  flex-shrink: 0;
  margin-left: 12px;
}

/* Settings overlay card */
.settings-overlay-card {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
  animation: authIn 0.3s ease;
  position: relative;
}

.settings-overlay-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.settings-overlay-wide {
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.settings-overlay-wide::-webkit-scrollbar {
  width: 5px;
}

.settings-overlay-wide::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 99px;
}

/* Responsive My Page */
@media (max-width: 700px) {
  .mypage-grid {
    grid-template-columns: 1fr;
  }
  .mypage-card-wide {
    grid-column: 1;
  }
}