/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #010A13;
  --bg-secondary: #0A1428;
  --bg-tertiary: #0E1E36;
  --bg-card: rgba(10, 20, 40, 0.85);
  --bg-card-hover: rgba(20, 35, 65, 0.95);
  --bg-input: rgba(10, 15, 30, 0.9);

  --gold: #C89B3C;
  --gold-dark: #785A28;
  --gold-light: #F0E6D2;
  --gold-glow: rgba(200, 155, 60, 0.4);

  --teal: #0AC8B9;
  --teal-dark: #005A82;
  --teal-glow: rgba(10, 200, 185, 0.3);

  --blue: #0397AB;
  --blue-deep: #091428;

  --text-primary: #c4b998;
  --text-light: #F0E6D2;
  --text-dim: #5B5A56;
  --text-body: #A09B8C;

  --red: #E84057;
  --green: #0ACF83;
  --orange: #FF9800;
  --purple: #C17DFF;

  --border: rgba(200, 155, 60, 0.2);
  --border-active: rgba(200, 155, 60, 0.6);
  --border-teal: rgba(10, 200, 185, 0.3);

  --font-display: 'Cinzel', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
  --transition: 0.25s ease;
  --transition-slow: 0.5s ease;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-body);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  z-index: 1000;
  gap: 24px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid transparent;
  border-top-color: var(--gold);
  border-right-color: var(--gold-dark);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.loader-ring-2 {
  width: 75%;
  height: 75%;
  border-top-color: var(--teal);
  border-right-color: var(--teal-dark);
  animation-direction: reverse;
  animation-duration: 0.9s;
}

.loader-icon {
  font-size: 28px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.7; }
}

.loader-text {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

.loader-subtext {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ===== BACKGROUND EFFECTS ===== */
.bg-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
}

.bg-orb-1 {
  width: 500px;
  height: 500px;
  background: var(--teal);
  top: -150px;
  right: -100px;
  animation: float 20s ease-in-out infinite;
}

.bg-orb-2 {
  width: 400px;
  height: 400px;
  background: var(--gold);
  bottom: -100px;
  left: -100px;
  animation: float 25s ease-in-out infinite reverse;
}

.bg-orb-3 {
  width: 300px;
  height: 300px;
  background: var(--purple);
  top: 50%;
  left: 50%;
  animation: float 18s ease-in-out infinite 5s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(30px, -40px); }
  50% { transform: translate(-20px, 30px); }
  75% { transform: translate(40px, 20px); }
}

/* ===== LAYOUT ===== */
.hidden { display: none !important; }

.main-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.header {
  text-align: center;
  padding: 40px 20px 20px;
}

.title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.subtitle {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-top: 8px;
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* ===== LANGUAGE SELECTOR ===== */
.lang-selector-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.lang-label {
  color: var(--text-dim);
  font-size: 0.82rem;
  white-space: nowrap;
}

.lang-select {
  padding: 7px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-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='%23A09B8C' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  min-width: 160px;
}

.lang-select:hover {
  border-color: var(--gold);
}

.lang-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.lang-select option {
  background: var(--bg-secondary);
  color: var(--text-light);
  padding: 8px;
}

.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 28px 40px;
}

.config-panel,
.recommendations-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== STEP SECTIONS ===== */
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  backdrop-filter: blur(16px);
  transition: border-color var(--transition);
}

.step:hover {
  border-color: var(--border-active);
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--gold-light);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--bg-primary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-optional {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 400;
  margin-left: auto;
}

/* ===== SEARCH INPUT ===== */
.search-wrapper {
  position: relative;
  margin-bottom: 14px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.6;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* ===== SELECTED CHAMPION ===== */
.selected-champion {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.1), rgba(10, 200, 185, 0.05));
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  margin-bottom: 14px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.selected-champion-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  border: 2px solid var(--gold);
  object-fit: cover;
}

.selected-champion-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.selected-champion-name {
  color: var(--gold-light);
  font-weight: 600;
  font-size: 1rem;
}

.selected-champion-tags {
  color: var(--text-dim);
  font-size: 0.78rem;
}

.clear-btn {
  background: rgba(232, 64, 87, 0.15);
  border: 1px solid rgba(232, 64, 87, 0.3);
  color: var(--red);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-btn:hover {
  background: rgba(232, 64, 87, 0.3);
  border-color: var(--red);
}

/* ===== CHAMPION GRID ===== */
.champion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.champion-grid::-webkit-scrollbar {
  width: 5px;
}

.champion-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.champion-grid::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 3px;
}

.champ-btn {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition);
  background: var(--bg-secondary);
  padding: 0;
}

.champ-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition);
}

.champ-btn:hover {
  border-color: var(--gold);
  transform: scale(1.08);
  z-index: 2;
  box-shadow: 0 0 12px var(--gold-glow);
}

.champ-btn:hover img {
  transform: scale(1.1);
}

.champ-btn.selected {
  border-color: var(--teal);
  box-shadow: 0 0 12px var(--teal-glow);
}

.champ-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.champ-btn .champ-tooltip {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-primary);
  color: var(--text-light);
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  border: 1px solid var(--border);
  z-index: 10;
}

.champ-btn:hover .champ-tooltip {
  opacity: 1;
}

/* ===== ROLE SELECTOR ===== */
.role-selector {
  display: flex;
  gap: 8px;
}

.role-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.role-icon {
  font-size: 1.3rem;
  transition: transform var(--transition);
}

.role-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.role-btn:hover {
  border-color: var(--gold);
  color: var(--text-light);
  background: rgba(200, 155, 60, 0.08);
}

.role-btn:hover .role-icon {
  transform: scale(1.15);
}

.role-btn.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.15), rgba(200, 155, 60, 0.05));
  color: var(--gold-light);
  box-shadow: 0 0 16px var(--gold-glow);
}

/* ===== ENEMY SLOTS ===== */
.enemy-slots {
  display: flex;
  gap: 10px;
}

.enemy-slot {
  flex: 1;
  aspect-ratio: 1;
  max-width: 72px;
  background: var(--bg-input);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.enemy-slot:hover {
  border-color: var(--red);
  background: rgba(232, 64, 87, 0.05);
}

.enemy-placeholder {
  color: var(--text-dim);
  font-size: 1.4rem;
  font-weight: 300;
}

.enemy-slot.filled {
  border-style: solid;
  border-color: var(--red);
  padding: 0;
}

.enemy-slot.filled img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.enemy-slot .enemy-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--red);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 0.6rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.enemy-slot.filled:hover .enemy-remove {
  display: flex;
}

/* ===== GAME STATE SELECTOR ===== */
.gamestate-selector {
  display: flex;
  gap: 8px;
}

.gamestate-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.gs-icon {
  font-size: 1.3rem;
}

.gs-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.gamestate-btn:hover {
  border-color: var(--teal);
  color: var(--text-light);
}

.gamestate-btn.active {
  color: var(--teal);
  border-color: var(--teal);
  background: linear-gradient(135deg, rgba(10, 200, 185, 0.12), rgba(10, 200, 185, 0.03));
  box-shadow: 0 0 12px var(--teal-glow);
}

.gamestate-btn.active .gs-label {
  color: var(--gold-light);
}

/* ===== RECOMMENDATIONS PANEL ===== */
.recommendations-panel {
  position: sticky;
  top: 20px;
  align-self: start;
}

.recommendations-title {
  margin-bottom: 0;
}

#recommendations {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  backdrop-filter: blur(16px);
  min-height: 400px;
}

/* ===== NO SELECTION STATE ===== */
.no-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  gap: 12px;
}

.no-selection-icon {
  font-size: 3.5rem;
  animation: pulse 2s ease-in-out infinite;
}

.no-selection-text {
  color: var(--text-body);
  font-size: 1rem;
  line-height: 1.6;
}

.no-selection-text strong {
  color: var(--gold-light);
}

.no-selection-hint {
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* ===== BUILD CONTENT ===== */
.build-content {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== ARCHETYPE INFO ===== */
.archetype-info {
  margin-bottom: 18px;
}

.archetype-label {
  display: inline-block;
  padding: 5px 14px;
  background: linear-gradient(135deg, rgba(200, 155, 60, 0.2), rgba(200, 155, 60, 0.05));
  border: 1px solid var(--gold-dark);
  border-radius: 20px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ===== ENEMY ANALYSIS ===== */
.enemy-analysis {
  margin-bottom: 22px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.analysis-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--gold-light);
  margin-bottom: 14px;
  font-weight: 700;
}

.damage-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.damage-bar-wrapper {
  display: grid;
  grid-template-columns: 120px 1fr 45px;
  align-items: center;
  gap: 10px;
}

.damage-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.damage-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.damage-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
  width: 0%;
}

.ad-fill {
  background: linear-gradient(90deg, #E84057, #FF6B6B);
}

.ap-fill {
  background: linear-gradient(90deg, #6B5CE7, #A78BFA);
}

.damage-percent {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  text-align: right;
}

.enemy-warnings {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.enemy-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 152, 0, 0.08);
  border-radius: var(--radius);
  border-left: 3px solid var(--orange);
  font-size: 0.78rem;
  color: var(--text-body);
}

.enemy-warning-icon {
  font-size: 0.9rem;
}

/* ===== BUILD ITEMS ===== */
.build-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.build-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  transition: all var(--transition);
  animation: slideIn 0.3s ease backwards;
}

.build-item:nth-child(1) { animation-delay: 0s; }
.build-item:nth-child(2) { animation-delay: 0.05s; }
.build-item:nth-child(3) { animation-delay: 0.1s; }
.build-item:nth-child(4) { animation-delay: 0.15s; }
.build-item:nth-child(5) { animation-delay: 0.2s; }
.build-item:nth-child(6) { animation-delay: 0.25s; }

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.build-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border);
}

.build-item-order {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(200, 155, 60, 0.15);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.build-item-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.build-item-info {
  flex: 1;
  min-width: 0;
}

.build-item-name {
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 2px;
}

.build-item-reason {
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.4;
}

.build-item-tag {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tag-boots {
  background: rgba(10, 200, 185, 0.12);
  color: var(--teal);
  border: 1px solid rgba(10, 200, 185, 0.25);
}

.tag-core {
  background: rgba(200, 155, 60, 0.12);
  color: var(--gold);
  border: 1px solid rgba(200, 155, 60, 0.25);
}

.tag-situational {
  background: rgba(193, 125, 255, 0.12);
  color: var(--purple);
  border: 1px solid rgba(193, 125, 255, 0.25);
}

.tag-defensive {
  background: rgba(10, 207, 131, 0.12);
  color: var(--green);
  border: 1px solid rgba(10, 207, 131, 0.25);
}

.tag-antiheal {
  background: rgba(232, 64, 87, 0.12);
  color: var(--red);
  border: 1px solid rgba(232, 64, 87, 0.25);
}

/* ===== BUILD TIPS ===== */
.build-tips {
  padding: 14px 16px;
  background: rgba(10, 200, 185, 0.04);
  border: 1px solid var(--border-teal);
  border-radius: var(--radius);
}

.build-tips-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--teal);
  margin-bottom: 10px;
  font-weight: 700;
}

.build-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-body);
  line-height: 1.5;
  margin-bottom: 6px;
}

.build-tip:last-child {
  margin-bottom: 0;
}

.build-tip-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: 1rem;
}

.close-modal-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-body);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal-btn:hover {
  background: rgba(232, 64, 87, 0.15);
  border-color: var(--red);
  color: var(--red);
}

.modal-search {
  flex-shrink: 0;
}

.modal-grid {
  max-height: 50vh;
  overflow-y: auto;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-dim);
  font-size: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 20px;
  }

  .recommendations-panel {
    position: static;
  }

  .title {
    font-size: 1.6rem;
  }

  .header {
    padding: 24px 16px 12px;
  }

  .role-selector {
    flex-wrap: wrap;
  }

  .role-btn {
    min-width: calc(33% - 6px);
  }

  .damage-bar-wrapper {
    grid-template-columns: 90px 1fr 40px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  .header {
    padding: 16px 12px 8px;
  }

  .title {
    font-size: 1.3rem;
    letter-spacing: 1px;
  }

  .subtitle {
    font-size: 0.8rem;
  }

  .lang-selector-wrapper {
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
  }

  .lang-select {
    min-width: 140px;
    font-size: 0.82rem;
    padding: 6px 10px;
    padding-right: 28px;
  }

  .container {
    padding: 10px;
    gap: 14px;
  }

  .step {
    padding: 14px;
  }

  .step-title {
    font-size: 0.9rem;
  }

  /* Champion grid: smaller icons */
  .champion-grid {
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 4px;
  }

  .champion-grid img {
    width: 42px;
    height: 42px;
  }

  /* Search inputs */
  .champion-search,
  .modal-search input {
    font-size: 14px;
    padding: 10px 12px 10px 34px;
  }

  /* Selected champion */
  .selected-champion-info img {
    width: 56px;
    height: 56px;
  }

  .selected-champion-info h3 {
    font-size: 1rem;
  }

  /* Role buttons: 2 per row on small screens */
  .role-selector {
    flex-wrap: wrap;
    gap: 6px;
  }

  .role-btn {
    min-width: calc(50% - 6px);
    flex: 1 1 calc(50% - 6px);
    padding: 8px 6px;
    font-size: 0.78rem;
  }

  /* Enemy slots */
  .enemy-slots {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .enemy-slot {
    width: 52px;
    height: 52px;
    max-width: 52px;
  }

  .enemy-slot img {
    width: 100%;
    height: 100%;
  }

  /* Game state selector */
  .gamestate-selector {
    flex-direction: column;
    gap: 6px;
  }

  .gamestate-btn {
    width: 100%;
    padding: 10px;
    font-size: 0.85rem;
  }

  /* Build items */
  .item-card {
    padding: 10px;
  }

  .item-card img {
    width: 38px;
    height: 38px;
  }

  .item-name {
    font-size: 0.85rem;
  }

  .item-gold {
    font-size: 0.75rem;
  }

  /* Build section titles */
  .build-section-title {
    font-size: 0.85rem;
  }

  /* Damage bar */
  .damage-bar-wrapper {
    grid-template-columns: 70px 1fr 30px;
    font-size: 0.75rem;
  }

  /* Enemy analysis */
  .enemy-analysis {
    font-size: 0.82rem;
  }

  /* Modal: full screen on mobile */
  .modal-content {
    width: 95%;
    max-width: none;
    max-height: 90vh;
    padding: 16px;
    border-radius: 12px;
  }

  .modal-grid {
    max-height: 60vh;
  }

  .modal-header h3 {
    font-size: 0.9rem;
  }

  /* Footer */
  .footer {
    padding: 20px 12px;
    font-size: 0.7rem;
  }
}

/* Very small screens (iPhone SE, etc.) */
@media (max-width: 380px) {
  .title {
    font-size: 1.1rem;
  }

  .champion-grid {
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  }

  .champion-grid img {
    width: 36px;
    height: 36px;
  }

  .role-btn {
    font-size: 0.72rem;
    padding: 7px 4px;
  }

  .enemy-slot {
    width: 44px;
    height: 44px;
    max-width: 44px;
  }

  .step {
    padding: 10px;
  }

  .container {
    padding: 6px;
  }
}
