/* CSS Variables for Breadwinner Draft / LoafPickle Worldwide Theme */
:root {
  --bg-primary: #070b10;
  --bg-secondary: #0f1612;
  --bg-glass: rgba(18, 26, 21, 0.75);
  --bg-glass-hover: rgba(28, 40, 31, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-active: rgba(0, 230, 91, 0.5);
  
  --text-primary: #f8fafc;
  --text-secondary: #a7f3d0;
  --text-muted: #64748b;
  
  --color-pickle: #00E65B;
  --color-pickle-glow: rgba(0, 230, 91, 0.3);
  --color-loaf-light: #fbbf24;
  --color-loaf-medium: #d97706;
  --color-loaf-dark: #92400e;
  
  --color-purple: #00E65B;
  --color-indigo: #059669;
  --color-blue: #38bdf8;
  --color-cyan: #34d399;
  --color-green: #00E65B;
  --color-red: #f43f5e;
  --color-orange: #f97316;
  --color-gold: #fbbf24;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 20px -4px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.8), 0 0 20px 0 rgba(0, 230, 91, 0.15);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* App Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  background: radial-gradient(circle at 85% 15%, rgba(0, 230, 91, 0.12) 0%, transparent 45%),
              radial-gradient(circle at 15% 85%, rgba(217, 119, 6, 0.12) 0%, transparent 45%),
              #070b10;
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 10;
  flex-shrink: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  width: 100%;
}

.sidebar-header .brand {
  margin-bottom: 0;
  padding-left: 0;
}

.sidebar-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0;
  flex-shrink: 0;
}

.sidebar-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: #ef4444;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-left: 4px;
}

.brand-icon {
  background: linear-gradient(135deg, var(--color-purple), var(--color-indigo));
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, #ffffff, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* League Selector */
.league-selector-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 24px;
}

.league-selector-card label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 8px;
}

.league-select {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.league-select:focus {
  border-color: var(--color-purple);
}

/* Sidebar Menu */
.menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.menu-item.active {
  background: linear-gradient(135deg, rgba(0, 230, 91, 0.15), rgba(217, 119, 6, 0.15));
  border: 1px solid rgba(0, 230, 91, 0.4);
  color: #00E65B;
  font-weight: 600;
}

.menu-item svg {
  width: 20px;
  height: 20px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Top bar / Header */
.top-header {
  height: 70px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background-color: rgba(10, 10, 18, 0.4);
  backdrop-filter: blur(10px);
  z-index: 5;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hamburger-btn {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0;
  flex-shrink: 0;
}

.hamburger-btn:hover, .hamburger-btn:focus-visible {
  background: rgba(0, 230, 91, 0.15);
  border-color: var(--color-pickle);
  color: var(--color-pickle);
  outline: none;
  box-shadow: 0 0 12px rgba(0, 230, 91, 0.25);
}

.hamburger-btn svg {
  width: 22px;
  height: 22px;
}

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

.sidebar-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 0;
}

.sidebar-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 8, 16, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* View Containers */
.view-panel {
  display: none;
  flex-grow: 1;
  padding: 32px;
  overflow-y: auto;
  height: calc(100vh - 70px);
}

.view-panel.active {
  display: block;
}

/* General Layout helpers */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

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

/* Premium Card Design */
.glass-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  margin-bottom: 24px;
  transition: border-color var(--transition-normal);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-indigo), var(--color-purple));
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--color-red);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-icon-only {
  padding: 10px;
  border-radius: 10px;
  line-height: 0;
}

/* Inputs & Form Controls */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--color-purple);
  background: rgba(255, 255, 255, 0.05);
}

/* Custom Checkbox/Switch styling */
.switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.switch-label {
  font-weight: 500;
  font-size: 0.95rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 24px;
  border: 1px solid var(--border-color);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--color-purple);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* Slider (Range) Controls */
.slider-group {
  margin-bottom: 24px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.slider-val {
  font-weight: 700;
  color: var(--color-purple);
}

.range-input {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  height: 6px;
  border-radius: 3px;
  outline: none;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-purple);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
  transition: transform var(--transition-fast);
}

.range-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-qb { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-rb { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-wr { background: rgba(168, 85, 247, 0.15); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.3); }
.badge-te { background: rgba(249, 115, 22, 0.15); color: #fdba74; border: 1px solid rgba(249, 115, 22, 0.3); }
.badge-dst { background: rgba(6, 182, 212, 0.15); color: #67e8f9; border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-k { background: rgba(234, 179, 8, 0.15); color: #fef08a; border: 1px solid rgba(234, 179, 8, 0.3); }

/* Value badge (rank shift) */
.value-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.value-positive {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.value-negative {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.value-neutral {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}

.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr.drafted-row {
  opacity: 0.4;
  background: rgba(0, 0, 0, 0.3);
}

/* Position Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.filter-tab.active {
  background: var(--color-purple);
  border-color: var(--color-purple);
  color: white;
}

/* Search Bar */
.search-container {
  position: relative;
  width: 250px;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--color-purple);
  background: rgba(255, 255, 255, 0.08);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* Live Draft Board Layout */
.draft-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  height: 100%;
}

/* Roster / Draft Tracker list in Draft Room */
.draft-sidebar-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.draft-log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.draft-log-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
}

.draft-log-pick {
  font-weight: 700;
  color: var(--color-purple);
  width: 45px;
  font-family: monospace;
}

.draft-log-player {
  flex-grow: 1;
}

.draft-log-team {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Draft Roster Grid View */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.roster-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  transition: var(--transition-fast);
}

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

.roster-card.my-team {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.05) 0%, rgba(22, 22, 40, 0.65) 100%);
  border-color: rgba(99, 102, 241, 0.4);
}

.roster-card-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.roster-card-header .my-tag {
  background: var(--color-indigo);
  color: white;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
}

.roster-players-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
}

.roster-player-slot {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
  padding-bottom: 4px;
}

.roster-slot-name {
  font-weight: 600;
  color: var(--text-muted);
  width: 40px;
}

.roster-slot-player {
  flex-grow: 1;
  text-align: right;
  color: var(--text-primary);
}

/* Edit Cell Input (for Player Directory DB editing) */
.editable-cell input {
  background: var(--bg-primary);
  border: 1px solid var(--border-color-active);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  width: 100%;
}

/* Floating Notification toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e1b4b;
  border: 1px solid #4338ca;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  font-size: 0.9rem;
  font-weight: 500;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 100;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Roster View Grid & Card Styling */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  padding-bottom: 40px;
}

.roster-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.roster-card:hover {
  border-color: rgba(147, 51, 234, 0.4);
  transform: translateY(-2px);
}

.roster-card.my-team {
  border: 1px solid rgba(217, 119, 6, 0.6);
  background: linear-gradient(180deg, rgba(217, 119, 6, 0.15) 0%, rgba(18, 26, 21, 0.85) 100%);
  box-shadow: 0 8px 32px rgba(217, 119, 6, 0.2);
}

.roster-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.roster-team-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.my-tag {
  background: linear-gradient(135deg, #d97706, #059669);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
}

.roster-players-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roster-player-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
}

.roster-slot-name {
  font-weight: 700;
  font-family: monospace;
  color: var(--color-purple);
  width: 55px;
  flex-shrink: 0;
}

.roster-slot-player {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* CSV Upload Drag-and-Drop Dropzone */
.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  background: rgba(255, 255, 255, 0.01);
  cursor: pointer;
  transition: var(--transition-fast);
  margin-bottom: 20px;
}

.dropzone:hover {
  border-color: var(--color-purple);
  background: rgba(147, 51, 234, 0.03);
}

/* Quick League Size Preset Buttons */
.preset-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.preset-badge:hover {
  background: rgba(0, 230, 91, 0.12);
  border-color: var(--color-pickle);
  color: var(--color-pickle);
}

.preset-badge.active {
  background: linear-gradient(135deg, rgba(0, 230, 91, 0.25), rgba(5, 150, 105, 0.35));
  border-color: var(--color-pickle);
  color: var(--color-pickle);
  box-shadow: 0 0 12px rgba(0, 230, 91, 0.25);
}

/* Responsive fixes & Mobile Off-Canvas Navigation */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
  
  .hamburger-btn {
    display: flex;
  }

  .sidebar-close-btn {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 230, 91, 0.15);
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
    border-bottom: none;
    min-width: unset;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .top-header {
    height: 60px;
    padding: 0 16px;
  }

  .page-title {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-actions {
    gap: 8px;
  }

  .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .view-panel {
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
    overflow-y: auto;
    padding: 16px;
  }

  .draft-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .filter-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .data-table {
    min-width: 650px;
  }
}

/* Zero Side-Scroll Global Protection & Card Layouts for Mobile */
.mobile-only-cards {
  display: none !important;
}

@media screen and (max-width: 992px) {
  html, body, .app-container, .main-content, .view-panel {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .glass-card {
    max-width: 100% !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: min-content !important;
    overflow: visible !important;
  }

  .card-header-responsive {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .card-header-responsive .search-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  .draft-layout {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 16px !important;
    height: auto !important;
  }

  .draft-sidebar-card {
    width: 100% !important;
    height: auto !important;
  }

  .desktop-only-table, .table-container.desktop-only-table {
    display: none !important;
  }

  .mobile-only-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .filter-tabs {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    white-space: normal !important;
    gap: 6px !important;
  }

  .filter-tab {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* Player Card Item - Draft Room Mobile */
.player-card-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

.player-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.player-card-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.player-card-rank {
  font-weight: 800;
  font-family: monospace;
  font-size: 1.15rem;
  color: var(--color-pickle);
}

.player-card-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
  line-height: 1.3;
}

.player-card-mid-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.player-card-team {
  font-weight: 700;
  color: var(--text-primary);
}

.player-card-adp {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

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

.player-card-stats-column {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.player-card-stat strong {
  color: var(--color-cyan);
}

/* Database Mobile Card Styles */
.db-card-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.db-card-header, .db-card-top-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  gap: 12px !important;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.db-card-player-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-grow: 1;
  flex-wrap: wrap;
}

.db-name-input {
  font-weight: 700;
  font-size: 0.95rem;
  padding: 4px 8px !important;
  flex-grow: 1;
  min-width: 120px;
}

.db-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.db-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.db-field label {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.db-field input {
  padding: 6px 8px;
  font-size: 0.85rem;
  width: 100%;
  box-sizing: border-box;
}

.db-card-footer {
  font-size: 0.85rem;
  color: var(--color-cyan);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
}

@media (max-width: 480px) {
  .undo-btn-text {
    display: none;
  }

  .top-header {
    padding: 0 12px;
  }

  .view-panel {
    padding: 12px;
  }

  .glass-card {
    padding: 14px;
    border-radius: 14px;
  }
}

/* LoafPickle Footer & Modal Styles */
.sidebar-footer {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-link {
  color: var(--color-pickle);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: #34d399;
  text-decoration: underline;
}

.legal-links {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.legal-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.legal-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* Modal Window Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 8, 16, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-in-out;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #0f172a;
  border: 1px solid rgba(0, 230, 91, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 230, 91, 0.15);
  border-radius: 20px;
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  background: linear-gradient(135deg, #ffffff, var(--color-pickle));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.modal-body h3 {
  color: var(--text-primary);
  font-size: 1rem;
  margin: 16px 0 8px;
  font-weight: 700;
}

.modal-body p, .modal-body ul {
  margin-bottom: 12px;
}

.modal-body ul {
  padding-left: 20px;
}

/* NFL News Styles */
.news-wrapper {
  display: inline-block;
  position: relative;
  margin-left: 6px;
  cursor: pointer;
  vertical-align: middle;
}

.news-icon {
  width: 16px;
  height: 16px;
  transition: all 0.2s ease;
}

.new-news {
  color: var(--color-cyan);
  filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.6));
}

.old-news {
  color: var(--text-muted);
  opacity: 0.7;
}

.news-wrapper:hover .news-icon {
  transform: scale(1.1);
}

.news-tooltip {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 250px;
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.8);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 9999;
  pointer-events: none;
  white-space: normal;
}

.news-wrapper:hover .news-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.news-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

.news-tooltip strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.news-tooltip p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}

.news-tooltip a {
  font-size: 0.75rem;
  color: var(--color-cyan);
  text-decoration: none;
  font-weight: 600;
}

.news-tooltip a:hover {
  text-decoration: underline;
}
