@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,600;0,700;0,800;1,700;1,800&family=Chakra+Petch:ital,wght@0,400;0,600;0,700;1,700&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --fb-navy: #1a2846;
  --fb-navy-mid: #22345c;
  --fb-navy-light: #2c4173;
  --fb-yellow: #ffed00;
  --crimson-dark: #a80d23;
  --crimson-light: #d61c35;
  --points-bg-top: #f6f6f3;
  --points-bg-bot: #dcdcd6;
  --points-text: #17244a;
  --bg-dark: #080c18;
  --bg-card: #121a2f;
  --bg-card-alt: #18223c;
  --border-color: #243256;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-barlow: 'Barlow Condensed', Arial Narrow, sans-serif;
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-score: 'Barlow Condensed', 'Chakra Petch', monospace;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-barlow);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Animations */
@keyframes fbspin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.97); }
}

/* Common Utility Classes */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-live {
  background: var(--crimson-light);
  color: white;
  animation: pulse-live 1.5s infinite;
}

.badge-set {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Modal System */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  font-family: var(--font-main);
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  padding: 24px;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
  font-family: var(--font-main);
}

.toast {
  background: rgba(18, 26, 47, 0.95);
  color: white;
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}

/* Logo Picker Modal & Selector Components */
.logo-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding: 6px;
  margin: 12px 0;
}

.logo-picker-item {
  background: var(--bg-card-alt);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  user-select: none;
}

.logo-picker-item:hover {
  border-color: var(--fb-yellow);
  background: rgba(255, 237, 0, 0.08);
  transform: translateY(-2px);
}

.logo-picker-item.selected {
  border-color: var(--fb-yellow);
  box-shadow: 0 0 0 2px rgba(255, 237, 0, 0.4);
  background: rgba(255, 237, 0, 0.15);
}

.logo-picker-thumb {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-conic-gradient(#1c2742 0% 25%, #151f36 0% 50%) 50% / 10px 10px;
  border-radius: var(--radius-sm);
  padding: 4px;
}

.logo-picker-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-picker-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

/* Eyedropper (Damlalık) Buttons & Modal */
.btn-eyedropper {
  background: rgba(255, 237, 0, 0.12);
  border: 1px solid rgba(255, 237, 0, 0.35);
  color: var(--fb-yellow);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-eyedropper:hover {
  background: rgba(255, 237, 0, 0.25);
  border-color: var(--fb-yellow);
  transform: translateY(-1px);
}

.btn-eyedropper-mini {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all 0.15s ease;
  flex-shrink: 0;
  user-select: none;
}

.btn-eyedropper-mini:hover {
  background: rgba(255, 237, 0, 0.2);
  border-color: var(--fb-yellow);
  transform: translateY(-1px);
}

.modal-eyedropper-backdrop {
  z-index: 1200;
}

.eyedropper-slot-container {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.eyedropper-slot-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.eyedropper-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.eyedropper-slot-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.eyedropper-slot-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

.eyedropper-slot-btn.active {
  border-color: var(--fb-yellow);
  background: rgba(255, 237, 0, 0.12);
  box-shadow: 0 0 0 1px var(--fb-yellow);
}

.eyedropper-color-badge {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.eyedropper-slot-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.eyedropper-slot-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.eyedropper-slot-hex {
  font-size: 0.72rem;
  font-family: monospace;
  color: var(--text-muted);
}

.eyedropper-slot-btn.active .eyedropper-slot-hex {
  color: var(--fb-yellow);
  font-weight: 700;
}

.eyedropper-stripe-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.eyedropper-stripe-preview {
  display: flex;
  width: 140px;
  height: 16px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.eyedropper-stripe-part-1,
.eyedropper-stripe-part-2 {
  flex: 1;
  height: 100%;
  transition: background-color 0.1s ease;
}

.eyedropper-canvas-card {
  background: repeating-conic-gradient(#1a243b 0% 25%, #131c30 0% 50%) 50% / 12px 12px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  overflow: hidden;
  position: relative;
}

.eyedropper-canvas-wrapper {
  cursor: crosshair;
  position: relative;
  display: inline-block;
  line-height: 0;
}

#eyedropper-canvas {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.eyedropper-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.palette-swatch {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.palette-swatch:hover {
  transform: scale(1.15);
  border-color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

