:root {
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --text-light: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --danger-color: #ef4444;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-image: radial-gradient(circle at 50% -20%, #312e81, #0f172a 60%);
}

.auth-container {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  width: 95%;
  max-width: 400px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.5s ease-out;
  margin: 20px;
}

.auth-container.expanded {
  max-width: 850px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(to right, #818cf8, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.form-group input, .form-group select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-light);
  font-size: 16px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.form-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.skill-group {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.skill-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

@media (max-width: 768px) {
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
}

.auth-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.error-message {
  color: var(--danger-color);
  font-size: 14px;
  text-align: center;
  margin-top: 15px;
  min-height: 20px;
}

/* Menu Grid */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 30px;
}

.menu-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: white;
  display: block;
}

.menu-card:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.menu-card h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

.menu-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.menu-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(1);
}

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  background: var(--primary-color);
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  font-weight: bold;
}

.badge.dev { background: #eab308; color: #422006; }

/* Table Styles for Member Management */
.members-table-container {
  overflow-x: auto;
  margin-top: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.3);
}

.members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.members-table th {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
}

.members-table td {
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

/* Class Row Colors (Subtle Tints) */
.row-warrior { background: rgba(239, 68, 68, 0.08); }
.row-rogue { background: rgba(34, 197, 94, 0.08); }
.row-소서리스 { background: rgba(168, 85, 247, 0.08); }
.row-프리스트 { background: rgba(59, 130, 246, 0.08); }
.row-실드 { background: rgba(245, 158, 11, 0.08); }

.row-warrior:hover { background: rgba(239, 68, 68, 0.15); }
.row-rogue:hover { background: rgba(34, 197, 94, 0.15); }
.row-소서리스:hover { background: rgba(168, 85, 247, 0.15); }
.row-프리스트:hover { background: rgba(59, 130, 246, 0.15); }
.row-실드:hover { background: rgba(245, 158, 11, 0.15); }

/* Rank Formatting */
.rank-1-5 { border-left: 4px solid #fbbf24; }
.rank-6-20 { border-left: 4px solid #94a3b8; }
.rank-other { border-left: 4px solid transparent; }

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.rank-1-5 .rank-badge { background: #fbbf24; color: #422006; box-shadow: 0 0 10px rgba(251, 191, 36, 0.4); }
.rank-6-20 .rank-badge { background: #94a3b8; color: #0f172a; }

.power-top {
    color: #fbbf24;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}

.summary-tag {
    font-size: 11px;
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted);
    margin-right: 4px;
    border: 1px solid var(--border-color);
}


/* Equipment Color Selector */
.color-selector {
    display: flex;
    gap: 6px;
}
.color-btn {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
}
.color-btn:hover {
    transform: scale(1.3);
    opacity: 0.8;
}
.color-btn.active {
    opacity: 1;
    transform: scale(1.3);
    border-color: white;
    box-shadow: 0 0 8px currentColor;
}
.color-btn.none { background: #475569; color: transparent; }
.color-btn.hero { background: #d946ef; color: #d946ef; }
.color-btn.legend { background: #fbbf24; color: #fbbf24; }
.color-btn.mythic { background: #f43f5e; color: #f43f5e; }

.equip-hero { color: #d946ef !important; text-shadow: 0 0 5px rgba(217, 70, 239, 0.3); }
.equip-legend { color: #fbbf24 !important; text-shadow: 0 0 8px rgba(251, 191, 36, 0.4); }
.equip-mythic { color: #f43f5e !important; text-shadow: 0 0 8px rgba(244, 63, 94, 0.4); }
