/* Modern CSS with Best Practices */

:root {
  --orange: #fb923c;
  --orange-dark: #ea580c;
  --orange-light: #fed7aa;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --emerald-900: #064e3b;
  --emerald-700: #047857;
  --emerald-300: #6ee7b7;
  --amber-900: #78350f;
  --amber-700: #b45309;
  --amber-300: #fcd34d;
  --rose-900: #831843;
  --rose-700: #be185d;
  --rose-300: #fda4af;
  --radius: 0.875rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, var(--slate-900) 0%, #050a1a 100%);
  color: var(--slate-200);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  line-height: 1.6;
  font-size: 16px;
}

/* Utility Classes */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
}

a {
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--orange-light);
}

/* Ticker */
.ticker-section {
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.ticker {
  height: 50px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.ticker-line {
  position: absolute;
  left: 100%;
  white-space: nowrap;
  animation: ticker 60s linear infinite;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Main Layout */
.main-layout {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Header */
.header-section {
  margin-bottom: 3rem;
  animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-content {
  margin-bottom: 2rem;
}

.title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, var(--orange-light) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 1.125rem;
  color: var(--slate-400);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(251, 146, 60, 0.1);
  border-color: var(--orange);
}

.feature-icon {
  font-size: 1.5rem;
}

/* Predictions Section */
.predictions-section {
  margin-bottom: 2rem;
}

.predictions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Card Styles */
.card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: calc(var(--radius) * 1.5);
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--orange);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 1) 100%);
  box-shadow: 0 0 30px rgba(251, 146, 60, 0.15);
}

.card-prediction {
  gap: 1rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.team-matchup {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.vs {
  color: var(--slate-500);
  font-size: 0.875rem;
}

.badge {
  padding: 0.375rem 0.5rem;
  font-size: 0.5rem;
  font-weight: 500;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid;
}

.badge-home {
  background: rgba(6, 78, 59, 0.6);
  color: var(--emerald-300);
  border-color: var(--emerald-700);
}

.badge-draw {
  background: rgba(120, 53, 15, 0.6);
  color: var(--amber-300);
  border-color: var(--amber-700);
}

.badge-away {
  background: rgba(131, 24, 67, 0.6);
  color: var(--rose-300);
  border-color: var(--rose-700);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.prediction-main {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prediction-label {
  font-size: 0.875rem;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.prediction-value {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.pick-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--orange-light);
}

.pick-odds {
  font-size: 0.95rem;
  color: var(--slate-300);
}

.confidence {
  font-size: 0.85rem;
  color: var(--slate-500);
}

.confidence-value {
  color: var(--emerald-300);
  font-weight: 600;
}

.prediction-insights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.insight-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.insight-label {
  font-size: 0.75rem;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.insight-value {
  font-size: 0.9rem;
  color: var(--slate-300);
  font-weight: 500;
}

.card-footer {
  margin-top: auto;
}

.risk-warning {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.risk-warning summary {
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-400);
  transition: color 0.2s ease;
  user-select: none;
}

.risk-warning summary:hover {
  color: var(--orange);
}

.risk-warning p {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--slate-500);
  line-height: 1.5;
}

/* Buttons */
.btn {
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bet-btn {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bet-btn:hover:not(.added) {
  box-shadow: 0 8px 20px rgba(251, 146, 60, 0.3);
  transform: translateY(-2px);
}

.bet-btn.added {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-orange {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(251, 146, 60, 0.2);
}

.btn-orange:hover {
  box-shadow: 0 8px 20px rgba(251, 146, 60, 0.3);
  transform: translateY(-1px);
}

.btn-full {
  width: 100%;
}

.btn-flex {
  flex: 1;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--slate-200);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-icon {
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-icon:hover {
  color: var(--orange);
}

/* Bet Slip - Desktop */
.bet-slip-desktop {
  position: fixed;
  right: 0;
  top: 0;
  height: 100vh;
  width: min(420px, 100%);
  background: linear-gradient(180deg, var(--slate-900) 0%, #050a1a 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.5);
  z-index: 30;
}

@media (max-width: 1200px) {
  .bet-slip-desktop {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .bet-slip-desktop {
    display: none;
  }
}

.slip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.slip-header h2 {
  font-size: 1.25rem;
}

.slip-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  min-height: 100px;
  overflow-y: auto;
}

.slip-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  gap: 1rem;
}

.slip-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.slip-item-match {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate-300);
}

.slip-item-pick {
  font-size: 0.85rem;
  color: var(--slate-500);
}

.btn-remove {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 0.5rem;
  color: var(--slate-400);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-remove:hover {
  background: rgba(251, 146, 60, 0.2);
  color: var(--orange);
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  color: var(--slate-500);
  font-style: italic;
}

.slip-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: auto;
}

.slip-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.slip-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stake-input {
  display: flex;
  align-items: center;
  position: relative;
}

.currency {
  position: absolute;
  left: 1rem;
  color: var(--orange);
  font-weight: 600;
}

.stake-field {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: var(--slate-200);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.stake-field:focus {
  outline: none;
  border-color: var(--orange);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
}

.stake-field::placeholder {
  color: var(--slate-500);
}

.slip-summary {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  color: var(--slate-400);
}

.summary-row.accent {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--orange-light);
  font-weight: 600;
}

.summary-value {
  font-weight: 700;
}

.button-group {
  display: flex;
  gap: 0.75rem;
}

/* Mobile Elements */
.mobile-bet-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(251, 146, 60, 0.3);
  transition: all 0.3s ease;
}

.mobile-bet-toggle:active {
  transform: scale(0.95);
}

.mobile-bet-toggle.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toggle-count {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: #ff4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.mobile-slip {
  position: fixed;
  inset: 0;
  bottom: 0;
  z-index: 50;
  background: linear-gradient(180deg, var(--slate-900) 0%, #050a1a 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1.5rem 1.5rem 0 0;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.5);
}

.mobile-slip.open {
  transform: translateY(0);
}

.mobile-slip-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 0.75rem auto;
}

.mobile-slip-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 1rem 1rem;
  overflow-y: auto;
  flex: 1;
}

.slip-header.mobile {
  padding: 0;
}

.slip-footer.mobile {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Notification */
.notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-layout {
    padding: 1rem;
    max-width: 100%;
  }

  .title {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .predictions-grid {
    grid-template-columns: 1fr;
  }

  .mobile-bet-toggle {
    display: flex;
  }

  .mobile-slip {
    display: flex;
  }

  .ticker-line {
    font-size: 12px;
    letter-spacing: 1px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .header-section {
    margin-bottom: 1.5rem;
  }

  .title {
    font-size: 1.25rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .feature-item {
    padding: 0.75rem;
    font-size: 0.85rem;
  }

  .predictions-grid {
    gap: 1rem;
  }

  .card {
    padding: 1rem;
  }

  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .mobile-slip {
    max-height: 90vh;
  }

  .button-group {
    flex-direction: column;
  }

  .btn-flex {
    flex: auto;
  }
}

/* Print Styles */
@media print {
  .mobile-bet-toggle,
  .bet-slip-desktop {
    display: none;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(251, 146, 60, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(251, 146, 60, 0.5);
}
