/**
 * FL Carbattle - Frontend Styles
 * Separate file for better caching and performance
 */

:root{
  --fl-bg:#ffffff;
  --fl-card:#ffffff;
  --fl-text:#0f172a;
  --fl-muted:#475569;
  --fl-red:#dc2626;
  --fl-red-hover:#b91c1c;
  --fl-ring: rgba(220,38,38,.25);
  --fl-border:#e5e7eb;
  --fl-shadow: 0 10px 25px rgba(0,0,0,.08);
  --fl-feature:#f59e0b;
  --fl-feature-bg:rgba(245,158,11,0.12);
  --fl-feature-text:#92400e;
  --fl-feature-glow:rgba(245,158,11,0.45);
  --fl-progress-bg:#f1f5f9;
  --fl-progress-bar:#dc2626;
}

/* Frontend Basis */
.fl-wrap, .fl-wrap *{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  box-sizing: border-box;
}

/* ===== CARDS & LAYOUT ===== */
.fl-cb .fl-card-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.fl-cb .fl-card{
  background: #fff;
  border: 1px solid var(--fl-border);
  border-radius: 14px;
  box-shadow: var(--fl-shadow);
  overflow: hidden;
}

.fl-cb .fl-match{
  position: relative;
}

.fl-cb .fl-match .fl-sides{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media(max-width:900px){
  .fl-cb .fl-match .fl-sides{
    grid-template-columns: 1fr;
  }
}

/* ===== SIDE CARDS (Voting) ===== */
.fl-cb .fl-side{
  display: block;
  background: #fff;
  border: 1px solid var(--fl-border);
  border-radius: 14px;
  box-shadow: var(--fl-shadow);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow .2s ease, transform .06s ease, border-color .2s ease;
  position: relative;
}

.fl-cb .fl-side:hover{
  box-shadow: 0 14px 35px rgba(0,0,0,.10);
  transform: scale(1.01);
}

.fl-cb .fl-side:focus{
  outline: none;
  box-shadow: 0 0 0 4px var(--fl-ring);
}

.fl-cb .fl-side .fl-media{
  position: relative;
  aspect-ratio: 16/9;
  background: #f8fafc;
  overflow: hidden;
}

.fl-cb .fl-side img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.fl-cb .fl-side .fl-caption{
  padding: 12px 14px;
}

.fl-cb .fl-title{
  margin: 0;
  font-size: 18px;
  color: var(--fl-text);
}

.fl-cb .fl-ig{
  font-size: 13px;
  color: var(--fl-muted);
}

/* ===== VS CIRCLE ===== */
.fl-cb .fl-match .fl-vs{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  background: #0f172a;
  color: #fff;
  width: 54px;
  height: 54px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: .5px;
  box-shadow: var(--fl-shadow);
  border: 3px solid #fff;
  z-index: 2;
}

@media(max-width:900px){
  .fl-cb .fl-match .fl-vs{
    position: static;
    transform: none;
    margin: -10px auto 2px;
    width: 46px;
    height: 46px;
  }
}

/* ===== VOTE STATES ===== */
.fl-cb .fl-side.fl-chosen{
  box-shadow:
    0 0 0 3px rgba(245,158,11,0.5),
    0 0 25px rgba(245,158,11,0.4),
    0 0 8px rgba(245,158,11,0.3);
  border-color: var(--fl-border);
  transform: scale(1.01);
}

.fl-cb .fl-disabled{
  pointer-events: none;
  opacity: .96;
}

/* ===== WINNER/LOSER STATES ===== */
.fl-cb .fl-side.fl-winner{
  box-shadow:
    0 0 0 3px rgba(245,158,11,0.6),
    0 0 30px rgba(245,158,11,0.4),
    0 0 60px rgba(245,158,11,0.2);
  border-color: var(--fl-feature);
  transform: scale(1.02);
  position: relative;
  z-index: 2;
}

.fl-cb .fl-side.fl-winner::before{
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, rgba(245,158,11,0.3), rgba(245,158,11,0.1), rgba(245,158,11,0.3));
  border-radius: 16px;
  z-index: -1;
  animation: winner-glow 2s ease-in-out infinite;
}

@keyframes winner-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.fl-cb .fl-side.fl-winner .fl-winner-badge{
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 15px rgba(245,158,11,0.5);
  z-index: 10;
  animation: trophy-bounce 0.6s ease-out;
}

@keyframes trophy-bounce {
  0% { transform: scale(0) rotate(-20deg); }
  50% { transform: scale(1.2) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.fl-cb .fl-side.fl-loser{
  opacity: 0.55;
  filter: grayscale(30%);
  transform: scale(0.98);
  pointer-events: none;
}

.fl-cb .fl-side.fl-loser::after{
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.1);
  border-radius: 14px;
  pointer-events: none;
}

/* ===== TENDENCY BAR ===== */
.fl-cb .fl-result{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.fl-cb .fl-tendency{
  position: relative;
  width: 100%;
  height: 20px;
  background: linear-gradient(to right,
    rgba(59,130,246,0.15) 0%,
    rgba(59,130,246,0.15) var(--pct, 50%),
    rgba(239,68,68,0.15) var(--pct, 50%),
    rgba(239,68,68,0.15) 100%);
  border: 1px solid var(--fl-border);
  border-radius: 9999px;
  overflow: visible;
}

.fl-cb .fl-tendency .fl-bar-left{
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--pct, 50%);
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 9999px 0 0 9999px;
  transition: width 0.5s ease-out;
}

.fl-cb .fl-tendency .fl-bar-right{
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: calc(100% - var(--pct, 50%));
  background: linear-gradient(90deg, #f87171, #ef4444);
  border-radius: 0 9999px 9999px 0;
  transition: width 0.5s ease-out;
}

.fl-cb .fl-tendency .fl-axis{
  position: absolute;
  left: 50%;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: rgba(0,0,0,0.2);
  transform: translateX(-50%);
  z-index: 3;
}

.fl-cb .fl-tendency .fl-marker{
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--fl-border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  z-index: 5;
  left: clamp(16px, var(--pct, 50%), calc(100% - 16px));
  transition: left 0.5s ease-out;
}

.fl-cb .fl-tendency .fl-marker svg{
  width: 18px;
  height: 18px;
}

/* ===== SCORE ===== */
.fl-cb .fl-score{
  font-weight: 700;
  color: var(--fl-text);
  font-feature-settings: "tnum";
}

.fl-cb .fl-pct{
  color: var(--fl-muted);
  font-weight: 500;
}

/* ===== BADGES & CHIPS ===== */
.fl-cb .fl-choice-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--fl-feature-bg);
  color: var(--fl-feature-text);
  border: 1px solid var(--fl-feature);
  border-radius: 10px;
  font-weight: 700;
}

.fl-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 9999px;
  border: 1px solid var(--fl-border);
}

.fl-chip.winner{
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-color: #f59e0b;
  color: #92400e;
  font-weight: 700;
  padding: 8px 14px;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(245,158,11,0.3);
}

.fl-chip.winner .trophy{
  font-size: 16px;
  margin-right: 4px;
}

/* ===== DOMINANCE DISPLAY ===== */
.fl-cb .fl-dominance{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(34,197,94,0.1), rgba(34,197,94,0.05));
  border: 1px solid rgba(34,197,94,0.3);
  color: #166534;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
}

.fl-cb .fl-dominance.close-match{
  background: linear-gradient(135deg, rgba(251,191,36,0.1), rgba(251,191,36,0.05));
  border-color: rgba(251,191,36,0.3);
  color: #92400e;
}

/* ===== COUNTDOWN ===== */
.fl-cb .fl-countdown-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--fl-border);
  border-radius: 9999px;
  padding: 8px 14px;
  box-shadow: var(--fl-shadow);
  font-weight: 600;
  transition: all 0.3s ease;
}

.fl-cb .fl-countdown-badge.urgent{
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-color: #f59e0b;
  color: #92400e;
  animation: pulse-urgent 1.5s ease-in-out infinite;
}

.fl-cb .fl-countdown-badge.critical{
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-color: #ef4444;
  color: #b91c1c;
  animation: pulse-critical 0.8s ease-in-out infinite;
}

@keyframes pulse-urgent {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 8px rgba(245,158,11,0); }
}

@keyframes pulse-critical {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(239,68,68,0); }
}

/* ===== LIVE INDICATOR ===== */
.fl-cb .fl-live-indicator{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #16a34a;
  font-weight: 600;
}

.fl-cb .fl-live-indicator .dot{
  width: 8px;
  height: 8px;
  background: #16a34a;
  border-radius: 50%;
  animation: live-pulse 1.5s ease-in-out infinite;
}

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

/* ===== TABS ===== */
.fl-cb .fl-tabs{
  display: flex;
  gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--fl-border);
  padding-bottom: 8px;
}

.fl-cb .fl-tab{
  background: transparent;
  border: 1px solid var(--fl-border);
  border-radius: 8px 8px 0 0;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--fl-muted);
}

.fl-cb .fl-tab:hover{
  background: var(--fl-feature-bg);
  color: var(--fl-feature-text);
}

.fl-cb .fl-tab.active{
  background: var(--fl-feature);
  color: #fff;
  border-color: var(--fl-feature);
}

.fl-cb .fl-tab-content{
  display: none;
}

.fl-cb .fl-tab-content.active{
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0.6; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* ===== MY VOTES ===== */
.fl-cb .fl-my-votes{
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1px solid var(--fl-border);
  border-radius: 16px;
  padding: 16px;
  margin: 20px 0;
}

.fl-cb .fl-my-votes-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.fl-cb .fl-my-votes-header h3{
  margin: 0;
  font-size: 16px;
}

.fl-cb .fl-my-votes-count{
  background: var(--fl-feature-bg);
  color: var(--fl-feature-text);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
}

.fl-cb .fl-my-votes-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.fl-cb .fl-my-vote-card{
  background: #fff;
  border: 1px solid var(--fl-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.fl-cb .fl-my-vote-card:hover{
  transform: scale(1.02);
}

.fl-cb .fl-my-vote-card img{
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.fl-cb .fl-my-vote-card .caption{
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* ===== BRACKET ===== */
.fl-cb .fl-bracket{
  display: flex;
  gap: 40px;
  overflow-x: auto;
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 16px;
  margin: 20px 0;
}

.fl-cb .fl-bracket-round{
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 200px;
}

.fl-cb .fl-bracket-round-title{
  text-align: center;
  font-weight: 700;
  color: var(--fl-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px;
  border-bottom: 2px solid var(--fl-border);
  background: #fff;
  border-radius: 8px 8px 0 0;
}

.fl-cb .fl-bracket-round.current .fl-bracket-round-title{
  background: var(--fl-feature);
  color: #fff;
  border-color: var(--fl-feature);
}

.fl-cb .fl-bracket-match{
  background: #fff;
  border: 1px solid var(--fl-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.fl-cb .fl-bracket-entry{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--fl-border);
  font-size: 13px;
}

.fl-cb .fl-bracket-entry:last-child{
  border-bottom: none;
}

.fl-cb .fl-bracket-entry.winner{
  background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(245,158,11,0.05));
  font-weight: 700;
}

.fl-cb .fl-bracket-entry.loser{
  opacity: 0.5;
  text-decoration: line-through;
}

.fl-cb .fl-bracket-entry img{
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.fl-cb .fl-bracket-entry .name{
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fl-cb .fl-bracket-entry .votes{
  margin-left: auto;
  font-weight: 600;
  color: var(--fl-muted);
}

.fl-cb .fl-bracket-entry .trophy{
  font-size: 14px;
}

/* ===== SWIPE VOTING ===== */
.fl-cb .fl-swipe-container{
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

.fl-cb .fl-swipe-hint{
  display: none;
  text-align: center;
  padding: 10px;
  color: var(--fl-muted);
  font-size: 13px;
}

@media (max-width: 768px){
  .fl-cb .fl-swipe-hint{
    display: block;
  }
}

.fl-cb .fl-swipe-indicator{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 10;
}

.fl-cb .fl-swipe-indicator.left{
  left: 20px;
  color: #3b82f6;
}

.fl-cb .fl-swipe-indicator.right{
  right: 20px;
  color: #ef4444;
}

.fl-cb .fl-swipe-indicator.visible{
  opacity: 1;
}

/* ===== UNDO TOAST ===== */
.fl-cb .fl-undo-toast{
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  padding: 12px 20px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  z-index: 9999;
  animation: slide-up 0.3s ease-out;
}

@keyframes slide-up {
  from { transform: translate(-50%, 100px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.fl-cb .fl-undo-toast .fl-undo-btn{
  background: #fff;
  color: #0f172a;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.fl-cb .fl-undo-toast .fl-undo-btn:hover{
  background: #f1f5f9;
}

.fl-cb .fl-undo-toast .fl-undo-timer{
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  animation: spin 1s linear infinite;
}

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

/* ===== SHARE BUTTONS ===== */
.fl-cb .fl-share-buttons{
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.fl-cb .fl-share-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 14px;
}

.fl-cb .fl-share-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.fl-cb .fl-share-btn.twitter{ background: #1da1f2; color: #fff; }
.fl-cb .fl-share-btn.facebook{ background: #1877f2; color: #fff; }
.fl-cb .fl-share-btn.whatsapp{ background: #25d366; color: #fff; }
.fl-cb .fl-share-btn.copy{ background: #6b7280; color: #fff; border: none; cursor: pointer; }

.fl-cb .fl-share-mini{
  background: transparent;
  border: 1px solid var(--fl-border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--fl-muted);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}

.fl-cb .fl-share-mini:hover{
  background: var(--fl-feature-bg);
  border-color: var(--fl-feature);
  color: var(--fl-feature-text);
}

/* ===== WINNER SCREEN ===== */
.fl-cb.fl-winner-screen{
  text-align: center;
  padding: 20px;
}

.fl-cb .fl-winner-hero{
  position: relative;
  max-width: 800px;
  margin: 0 auto 24px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 25px 50px rgba(0,0,0,0.15),
    0 0 0 4px rgba(245,158,11,0.3),
    0 0 80px rgba(245,158,11,0.2);
}

.fl-cb .fl-winner-hero img{
  width: 100%;
  display: block;
}

.fl-cb .fl-winner-hero .fl-winner-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  color: #fff;
}

.fl-cb .fl-winner-hero .fl-winner-title{
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.fl-cb .fl-winner-hero .fl-winner-ig{
  font-size: 18px;
  opacity: 0.9;
}

.fl-cb .fl-champion-badge{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(245,158,11,0.4);
  margin-bottom: 20px;
}

.fl-cb .fl-champion-badge .trophy{
  font-size: 24px;
}

/* Confetti */
.fl-cb .fl-confetti{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.fl-cb .fl-confetti-piece{
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0;
  animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
  0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ===== SUBMISSION FORM ===== */
.fl-cb .fl-submit-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.fl-cb .fl-submit-card{
  background: #fff;
  border: 1px solid var(--fl-border);
  border-radius: 14px;
  box-shadow: var(--fl-shadow);
  overflow: hidden;
}

.fl-cb .fl-submit-card .fl-card-body{
  padding: 16px;
}

.fl-cb .fl-form .fl-form-section{
  background: #fff;
  border: 1px solid var(--fl-border);
  border-radius: 14px;
  box-shadow: var(--fl-shadow);
  padding: 16px;
  margin-bottom: 16px;
}

.fl-cb .fl-form .fl-drop{
  border: 2px dashed var(--fl-border);
  border-radius: 14px;
  background: #fff;
  padding: 24px 16px;
  text-align: center;
  transition: border-color .2s ease, background .2s ease;
  cursor: pointer;
}

.fl-cb .fl-form .fl-drop:hover,
.fl-cb .fl-form .fl-drop.dragover{
  border-color: var(--fl-red);
  background: #fff5f5;
}

/* ===== UPLOAD PROGRESS ===== */
.fl-cb .fl-progress-overlay{
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  backdrop-filter: saturate(1.1) blur(2px);
}

.fl-cb .fl-progress-overlay.open{
  display: flex;
}

.fl-cb .fl-progress-card{
  width: min(520px, 92vw);
  background: #fff;
  color: #0f172a;
  border: 1px solid var(--fl-border);
  border-radius: 16px;
  box-shadow: var(--fl-shadow);
  padding: 18px;
}

.fl-cb .fl-progress-title{
  font-weight: 800;
  font-size: 18px;
  margin: 0 0 12px;
}

.fl-cb .fl-progress{
  width: 100%;
  height: 14px;
  background: var(--fl-progress-bg);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--fl-border);
}

.fl-cb .fl-progress-bar{
  height: 100%;
  width: 0%;
  background: var(--fl-progress-bar);
  transition: width .1s linear;
}

.fl-cb .fl-progress-meta{
  margin-top: 10px;
  font-size: 13px;
  color: #475569;
}

.fl-cb .fl-progress-actions{
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ===== CROPPER ===== */
.fl-cb .fl-cropper-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.fl-cb .fl-cropper-modal{
  background: #fff;
  border-radius: 20px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.fl-cb .fl-cropper-header{
  padding: 20px;
  border-bottom: 1px solid var(--fl-border);
}

.fl-cb .fl-cropper-header h3{
  margin: 0 0 4px;
  font-size: 18px;
}

.fl-cb .fl-cropper-canvas{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  min-height: 400px;
  max-height: 60vh;
  position: relative;
  overflow: hidden;
}

.fl-cb .fl-cropper-canvas img{
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.fl-cb .fl-crop-area{
  position: absolute;
  border: 3px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
  cursor: move;
  border-radius: 4px;
}

.fl-cb .fl-crop-handle{
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  border: 2px solid var(--fl-feature);
}

.fl-cb .fl-crop-handle.nw{ top: -8px; left: -8px; cursor: nw-resize; }
.fl-cb .fl-crop-handle.ne{ top: -8px; right: -8px; cursor: ne-resize; }
.fl-cb .fl-crop-handle.sw{ bottom: -8px; left: -8px; cursor: sw-resize; }
.fl-cb .fl-crop-handle.se{ bottom: -8px; right: -8px; cursor: se-resize; }

.fl-cb .fl-cropper-actions{
  padding: 16px 20px;
  border-top: 1px solid var(--fl-border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: #f8fafc;
}

.fl-cb .fl-thumb{
  position: relative;
  display: inline-block;
}

.fl-cb .fl-thumb img{
  max-width: 200px;
  border-radius: 10px;
  border: 1px solid var(--fl-border);
}

.fl-cb .fl-thumb-badge{
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(34, 197, 94, 0.9);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* ===== LOADING ===== */
.fl-cb .fl-loading{
  text-align: center;
  padding: 40px;
  color: var(--fl-muted);
}

.fl-cb .fl-loading::before{
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--fl-border);
  border-top-color: var(--fl-feature);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

/* ===== UTILITIES ===== */
.fl-cb .fl-line{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  align-items: center;
}

.fl-cb .fl-result-line{
  padding-top: 12px;
  border-top: 1px solid var(--fl-border);
  margin-top: 12px;
}

.fl-cb .fl-head{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.fl-cb .fl-head-tools{
  display: flex;
  align-items: center;
  gap: 10px;
}

.fl-cb .fl-h-title{
  margin: 0;
  font-size: 22px;
}

.fl-cb .fl-badge-red-big{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #dc2626;
  color: #fff;
  border: 1px solid #dc2626;
  border-radius: 9999px;
  padding: 6px 10px;
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--fl-shadow);
}

.fl-cb .fl-content{
  padding: 12px;
  color: var(--fl-text);
}

.fl-cb .fl-muted{
  color: var(--fl-muted);
}

.fl-cb .fl-btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--fl-red);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--fl-shadow);
  transition: background 0.2s ease;
}

.fl-cb .fl-btn:hover{
  background: var(--fl-red-hover);
}

.fl-cb .fl-btn.secondary{
  background: #e2e8f0;
  color: #0f172a;
}

.fl-cb .fl-btn.ghost{
  background: #fff;
  border: 1px solid var(--fl-border);
  color: #0f172a;
}

.fl-cb .sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .fl-cb .fl-tabs{
    flex-direction: column;
  }

  .fl-cb .fl-tab{
    text-align: center;
  }

  .fl-cb .fl-winner-hero .fl-winner-title{
    font-size: 24px;
  }

  .fl-cb .fl-share-buttons{
    flex-direction: column;
  }

  .fl-cb .fl-share-btn{
    justify-content: center;
  }

  .fl-cb .fl-champion-badge{
    font-size: 14px;
    padding: 10px 16px;
  }

  .fl-cb .fl-bracket{
    flex-direction: column;
  }

  .fl-cb .fl-bracket-round{
    min-width: 100%;
  }

  .fl-cb .fl-head{
    flex-direction: column;
  }

  .fl-cb .fl-head-tools{
    width: 100%;
    justify-content: space-between;
  }
}
