/* =============================================
   FiveM RP Karakterler Portalı
   Dark space theme, animated starfield, purple accents
   ============================================= */

/* -- Custom Properties -- */
:root {
  --bg-primary: #0a0a14;
  --bg-secondary: #0f0f1e;
  --bg-card: #141428;
  --bg-card-hover: #1a1a35;
  --bg-input: #12122a;
  --bg-modal: #111126;

  --border-color: #2a2a4a;
  --border-hover: #3d3d6b;
  --border-accent: #7c3aed;

  --text-primary: #e8e8f0;
  --text-secondary: #9898b8;
  --text-muted: #6868888;
  --text-accent: #a78bfa;

  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-dark: #5b21b6;
  --accent-glow: rgba(124, 58, 237, 0.3);

  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.12);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.12);
  --orange: #f59e0b;
  --orange-bg: rgba(245, 158, 11, 0.12);
  --cyan: #06b6d4;
  --pink: #ec4899;
  --magenta: #d946ef;

  --sidebar-width: 56px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -- Reset & Base -- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

/* -- Starfield Canvas -- */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* -- Sidebar -- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  z-index: 100;
}

.sidebar__logo {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 40px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.sidebar__logo:hover {
  color: var(--accent-light);
  transform: scale(1.1);
  text-shadow: 0 0 20px var(--accent-glow);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.sidebar__link {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: var(--transition);
}

.sidebar__link svg {
  width: 20px;
  height: 20px;
}

.sidebar__link:hover {
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.1);
}

.sidebar__link.active {
  color: var(--accent-light);
  background: rgba(124, 58, 237, 0.15);
}

.sidebar__social {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar__social-link {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
  border-radius: var(--radius-sm);
}

.sidebar__social-link svg {
  width: 18px;
  height: 18px;
}

.sidebar__social-link:hover {
  color: var(--accent-light);
  transform: translateY(-2px);
}

/* -- Main Content -- */
.main-content {
  margin-left: var(--sidebar-width);
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 40px 48px;
}

/* -- Hero Section -- */
.hero {
  text-align: center;
  padding: 60px 0 20px;
}

.hero__title {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__emoji {
  -webkit-text-fill-color: initial;
  margin-right: 8px;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* -- Search Section -- */
.search-section {
  max-width: 720px;
  margin: 32px auto 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.search-bar {
  width: 100%;
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0 20px;
  transition: var(--transition);
}

.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.search-bar__icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-bar__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  padding: 14px 16px;
  font-size: 0.95rem;
}

.search-bar__input::placeholder {
  color: var(--text-muted);
}

.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* -- Characters Grid -- */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* -- Character Card -- */
.character-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  position: relative;
}

.character-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.character-card__image-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.character-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.character-card:hover .character-card__image {
  transform: scale(1.05);
}

.character-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-dark), var(--bg-card));
  font-size: 4rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.2);
}

.character-card__status {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.character-card__status--alive {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.character-card__status--dead {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.character-card__status--missing {
  background: var(--orange-bg);
  color: var(--orange);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.character-card__info {
  padding: 20px;
}

.character-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.character-card__nickname {
  display: block;
  color: var(--accent-light);
  font-size: 0.85rem;
  font-weight: 500;
  font-style: italic;
  margin-bottom: 8px;
}

.character-card__occupation {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.character-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.character-card__player {
  color: var(--text-secondary);
}

/* -- Empty State -- */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
}

.empty-state__icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-secondary);
}

.no-results {
  max-width: 1400px;
  margin: 0 auto;
}

/* =============================================
   Character Detail Page
   ============================================= */
.character-detail {
  max-width: 1000px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 32px;
  transition: var(--transition);
}

.back-link svg {
  width: 18px;
  height: 18px;
}

.back-link:hover {
  color: var(--accent-light);
}

.character-detail__header {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 40px;
}

.character-detail__avatar-wrapper {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 3px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.character-detail__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-detail__avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-dark), var(--bg-card));
  font-size: 4rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.2);
}

.character-detail__title-block {
  flex: 1;
}

.character-detail__name {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.character-detail__nickname {
  display: block;
  color: var(--accent-light);
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 12px;
}

.character-detail__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
}

.character-detail__status--alive {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.character-detail__status--dead {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.character-detail__status--missing {
  background: var(--orange-bg);
  color: var(--orange);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.character-detail__body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
}

.info-card:hover {
  border-color: var(--border-hover);
}

.info-card__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.info-card__value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.section-title svg {
  color: var(--accent-light);
}

.backstory-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Sidebar (detail page) */
.character-detail__sidebar {
  position: sticky;
  top: 40px;
}

.sidebar-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.related-characters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  transition: var(--transition);
}

.related-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}

.related-card__img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.related-card__placeholder {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-dark), var(--bg-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.3);
}

.related-card__info {
  display: flex;
  flex-direction: column;
}

.related-card__name {
  font-size: 0.88rem;
  font-weight: 600;
}

.related-card__role {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* =============================================
   Login Page
   ============================================= */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.login-card__header {
  text-align: center;
  margin-bottom: 32px;
}

.login-card__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.login-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.login-card__desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* -- Forms -- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 14px;
  transition: var(--transition);
}

.form-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input-wrapper svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input-wrapper .form-input {
  border: none;
  background: none;
  padding: 12px;
  box-shadow: none;
}

.form-input-wrapper .form-input:focus {
  box-shadow: none;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

select.form-input {
  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='%239898b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.login-error {
  background: var(--red-bg);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

/* -- File Upload -- */
.file-upload {
  position: relative;
}

.file-upload__input {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  top: 0;
  left: 0;
  z-index: 2;
}

.file-upload__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.file-upload__label svg {
  color: var(--accent-light);
}

.file-upload:hover .file-upload__label {
  border-color: var(--accent);
  color: var(--text-secondary);
}

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-dark);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn--secondary {
  background: rgba(124, 58, 237, 0.1);
  color: var(--accent-light);
  border-color: rgba(124, 58, 237, 0.25);
}

.btn--secondary:hover {
  background: rgba(124, 58, 237, 0.2);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.btn--ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.btn--danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.25);
}

.btn--danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.btn--full {
  width: 100%;
}

.btn--small {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn__loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =============================================
   Dashboard
   ============================================= */
.dashboard {
  max-width: 1200px;
  margin: 0 auto;
}

.dashboard__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard__title {
  font-size: 1.8rem;
  font-weight: 800;
}

.dashboard__subtitle {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-top: 4px;
}

.dashboard__actions {
  display: flex;
  gap: 10px;
}

.dashboard__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* -- Dashboard Card -- */
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.dash-card:hover {
  border-color: var(--border-hover);
}

.dash-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 0;
}

.dash-card__avatar-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.dash-card__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-card__avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-dark), var(--bg-secondary));
  font-size: 1.4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
}

.dash-card__title {
  flex: 1;
  min-width: 0;
}

.dash-card__title h3 {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-card__nickname {
  color: var(--accent-light);
  font-size: 0.82rem;
  font-style: italic;
}

.dash-card__body {
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.dash-card__field {
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.dash-card__field strong {
  color: var(--text-muted);
  font-weight: 500;
}

.dash-card__actions {
  display: flex;
  gap: 8px;
  padding: 0 20px 20px;
  flex-wrap: wrap;
}

/* =============================================
   Modal
   ============================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  animation: fadeIn 0.25s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.modal {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px 0;
}

.modal__title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal__close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal__close:hover {
  border-color: var(--red);
  color: var(--red);
}

.modal__form {
  padding: 24px 28px;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* -- Modal scrollbar -- */
.modal::-webkit-scrollbar {
  width: 6px;
}

.modal::-webkit-scrollbar-track {
  background: transparent;
}

.modal::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

/* =============================================
   Error Page
   ============================================= */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  text-align: center;
}

.error-page__code {
  font-size: 6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  line-height: 1;
}

.error-page__title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.error-page__desc {
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* =============================================
   Toast Notifications
   ============================================= */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 0.88rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  animation: toastIn 0.3s ease-out;
}

.toast--success {
  border-left: 3px solid var(--green);
}

.toast--error {
  border-left: 3px solid var(--red);
}

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 1024px) {
  .character-detail__body {
    grid-template-columns: 1fr;
  }

  .character-detail__sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding: 24px 20px;
  }

  .hero__title {
    font-size: 2rem;
  }

  .characters-grid {
    grid-template-columns: 1fr;
  }

  .character-detail__header {
    flex-direction: column;
    text-align: center;
  }

  .character-detail__name {
    font-size: 1.8rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .form-row,
  .form-row--3 {
    grid-template-columns: 1fr;
  }

  .dashboard__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 1.6rem;
  }

  .login-card {
    padding: 28px 20px;
  }
}
