/* ============================================
   INVINCIBLE GTG ARTIFACT CALCULATOR
   Theme: Blue overlay on cityscape background
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --bg-overlay: rgba(10, 131, 178, 0.55);
  --bg-card: rgba(0, 60, 90, 0.55);
  --bg-card-solid: #064a66;
  --bg-input: rgba(255, 255, 255, 0.08);

  --blue-accent: #3b82f6;
  --blue-light: #7dd3fc;
  --blue-dim: #1e3a5f;

  --yellow-primary: #fdee0d;
  --yellow-bright: #fdee0d;
  --yellow-dim: rgba(253, 238, 13, 0.15);

  --text-white: #f0f0f0;
  --text-light: #cce4ef;
  --text-muted: #7fb8d0;

  --border: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(255, 255, 255, 0.22);

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

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.25);

  --transition: 0.25s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  background: #0a83b2;
  color: var(--text-white);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  line-height: 1.6;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: -50vh;
  left: 0;
  width: 100%;
  height: 200vh;
  background: url('Background.jpg') center / cover no-repeat;
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  top: -50vh;
  left: 0;
  width: 100%;
  height: 200vh;
  background: var(--bg-overlay);
  z-index: -1;
  pointer-events: none;
}

/* --- Container --- */
.container {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* --- Header --- */
.hero-section {
  text-align: center;
  padding: 50px 0 30px;
}

.hero-logo {
  max-width: 320px;
  width: 80%;
  height: auto;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-divider {
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--yellow-primary), transparent);
  margin: 20px auto 0;
  border: none;
}

/* --- Artifact Selector --- */
.artifact-selector {
  max-width: 400px;
  margin: 0 auto 28px;
  width: 100%;
}

.artifact-selector .input-group {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.artifact-selector .input-group:hover {
  border-color: var(--border-hover);
}

.artifact-select-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.artifact-search-wrapper {
  flex: 1;
  position: relative;
}

.artifact-search-wrapper .input-field {
  cursor: text;
}

.artifact-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: #0a2a3a;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

.artifact-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-light);
  transition: background 0.15s ease;
}

.artifact-dropdown-item:hover,
.artifact-dropdown-item.highlighted {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
}

.artifact-dropdown-item.selected {
  color: var(--yellow-primary);
}

.artifact-dropdown-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.artifact-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* --- Input Fields --- */
.input-label {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-light);
}

.input-field {
  width: 100%;
  padding: 10px 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border);
  border-radius: 0;
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
  outline: none;
}

.input-field::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.input-field:hover {
  border-bottom-color: var(--border-hover);
}

.input-field:focus {
  border-bottom-color: var(--blue-accent);
}

.input-field[type="number"]::-webkit-outer-spin-button,
.input-field[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.input-field[type="number"] {
  -moz-appearance: textfield;
}

/* --- Select / Dropdown --- */
.select-field {
  width: 100%;
  padding: 10px 24px 10px 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border);
  border-radius: 0;
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237fb8d0' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
}

.select-field option {
  background: #0a2a3a;
  font-weight: 600;
}

.select-field:hover {
  border-bottom-color: var(--border-hover);
}

.select-field:focus {
  border-bottom-color: var(--blue-accent);
}

/* --- Level Range Inputs --- */
.leveling-inputs {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}

.leveling-input-group {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leveling-input-group:hover {
  border-color: var(--border-hover);
}

.level-arrow {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-muted);
  padding-bottom: 12px;
}

/* --- Section Cards --- */
.section-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}

.section-card:hover {
  border-color: var(--border-hover);
}

.section-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* --- Cost Grid --- */
.cost-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.cost-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cost-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-bottom: 4px;
}

.cost-item.cost-empty {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: transparent;
}

.cost-amount {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--yellow-primary);
  letter-spacing: 1px;
}

.cost-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Stats Grid --- */
.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-name {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-white);
  letter-spacing: 0.5px;
}

/* --- Power Row --- */
.power-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
}

.power-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-light);
}

.power-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--yellow-primary);
  letter-spacing: 1px;
}

/* --- Discord Widget --- */
.discord-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #5865F2;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease, transform 0.2s ease;
}

.discord-widget:hover {
  background: #4752c4;
  transform: translateY(-2px);
}

.discord-widget svg {
  flex-shrink: 0;
}

/* --- Passive Ability --- */
.passive-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 8px;
}

.passive-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.passive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.passive-table th {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.passive-table th:first-child {
  text-align: left;
}

.passive-table td {
  padding: 8px 6px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.passive-table td.param-name {
  text-align: left;
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.82rem;
}

.passive-table td.param-value {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.passive-table th.active,
.passive-table td.active {
  color: var(--yellow-primary);
  background: var(--yellow-dim);
}

.passive-table tr:last-child td {
  border-bottom: none;
}

/* --- Utility --- */
.hidden {
  display: none !important;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .container {
    padding: 0 16px 60px;
  }

  .hero-section {
    padding: 30px 0 20px;
  }

  .leveling-inputs {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .leveling-input-group {
    flex: 0 0 auto;
    width: 100%;
    max-width: 280px;
  }

  .level-arrow {
    transform: rotate(90deg);
    padding: 0;
  }

  .artifact-selector {
    max-width: 100%;
  }

  .cost-grid {
    grid-template-columns: 1fr;
  }

  .discord-widget {
    display: none;
  }
}
