:root {
  --primary: #10b981;        
  --primary-light: #34d399;
  --accent: #a855f7;         
  --gold: #fcd34d;
  --success: #10b981;
  --danger: #f87171;
  --bg: #0a0f1c;
  --card: rgba(15, 23, 42, 0.9);
  --glass: rgba(255, 255, 255, 0.06);
  --text: #f8fafc;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] {
  --primary: #059669;
  --primary-light: #10b981;
  --accent: #8b5cf6;
  --gold: #ca8a04;
  --success: #10b981;
  --danger: #f43f5e;
  
  --bg: #f8fafc;
  --card: #ffffff;
  --glass: rgba(255, 255, 255, 0.9);
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background .4s ease
}

.success-banner {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  text-align: center;
  padding: .75rem 1rem;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  animation: pulse 2s infinite
}

@keyframes pulse {
  0%, 100% { opacity: 1 }
  50% { opacity: .9 }
}

.success-banner i {
  font-size: 1.2rem
}

.site-header {
  padding: 1.5rem 1rem;
  text-align: center;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-bottom: 1px solid var(--border)
}

.site-title {
  font-size: 2.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent
}

.site-subtitle {
  font-size: 1rem;
  margin-top: .5rem;
  opacity: .8
}

.auth-bar {
  display: flex;
  gap: .75rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
  align-items: center
}

.auth-btn {
  padding: .5rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  transition: all .3s;
  backdrop-filter: blur(8px)
}

.login-btn {
  background: var(--glass);
  color: var(--gold);
  border: 1px solid var(--border)
}

.register-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff
}

.logout-btn {
  background: var(--danger);
  color: #fff
}

.auth-btn:hover {
  transform: translateY(-2px)
}

.subscription-badge {
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 12px;
  margin-left: 8px
}

.subscription-badge.active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success)
}

.subscription-badge.expiring {
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold)
}

.subscription-badge.expired {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger)
}

@media(max-width:640px) {
  .site-title {
    font-size: 2rem
  }
}

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  padding: 0 1rem
}

.filter-select {
  padding: .75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  font-size: .95rem;
  min-width: 140px;
  backdrop-filter: blur(8px)
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent
}

.tickets-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem
}

.ticket-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp .5s ease forwards;
  backdrop-filter: blur(12px)
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.ticket-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, .15), rgba(251, 191, 36, .1));
  border-bottom: 1px solid var(--border)
}

.ticket-type {
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem
}

.badge-vvip {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1f2937;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 700
}

.ticket-date {
  font-size: .95rem;
  opacity: .8
}

.ticket-body {
  padding: 1rem 1.5rem
}

.match-row {
  display: grid;
  gap: .75rem;
  padding: .9rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: .95rem;
  align-items: center
}

.match-row:last-child {
  border-bottom: none
}

.match-row.live {
  background: rgba(16, 185, 129, .1)
}

@media(min-width:1024px) {
  .match-row {
    grid-template-columns: 2fr 1fr 80px 80px 70px 90px
  }

  .match-row .team {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
  }

  .match-row .prediction {
    color: var(--primary);
    font-weight: 600
  }

  .match-row .odds {
    color: var(--gold);
    font-weight: 700;
    text-align: center
  }

  .match-row .time {
    opacity: .7;
    font-size: .85rem;
    text-align: center
  }

  .match-row .score {
    font-weight: 700;
    text-align: center
  }

  .match-row .outcome {
    padding: .3rem .6rem;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 600;
    text-align: center
  }
}

@media(min-width:768px) and (max-width:1023px) {
  .match-row {
    grid-template-columns: 1.8fr 1fr 72px 72px 62px 82px;
    font-size: .92rem
  }

  .match-row .time {
    font-size: .8rem
  }

  .match-row .outcome {
    font-size: .78rem;
    padding: .25rem .5rem
  }
}

@media(max-width:767px) {
  .match-row {
    grid-template-columns: 1.6fr 1fr 70px 70px 90px;
    font-size: .89rem;
    gap: .5rem;
    padding: .85rem 0
  }

  .match-row .score {
    display: none !important
  }

  .match-row .outcome {
    display: block !important;
    padding: .25rem .45rem;
    border-radius: 8px;
    font-size: .75rem;
    font-weight: 700;
    text-align: center;
    min-width: 72px
  }

  .match-row .outcome.Correct {
    background: rgba(16, 185, 129, .3) !important;
    color: var(--success) !important
  }

  .match-row .outcome.Incorrect {
    background: rgba(239, 68, 68, .3) !important;
    color: var(--danger) !important
  }

  .match-row .time {
    font-size: .78rem
  }

  .match-row .odds {
    font-size: .95rem
  }
}

@media(max-width:480px) {
  .match-row {
    grid-template-columns: 1fr;
    gap: .65rem;
    padding: 1rem 0;
    font-size: .94rem
  }

  .match-row>div {
    display: flex;
    justify-content: space-between;
    align-items: center
  }

  .match-row .team::before {
    content: "Match: ";
    font-weight: 600;
    opacity: .85
  }

  .match-row .prediction::before {
    content: "Tip: ";
    font-weight: 600;
    opacity: .85
  }

  .match-row .odds::before {
    content: "Odds: ";
    color: var(--gold);
    font-weight: 700;
    opacity: .9
  }

  .match-row .time::before {
    content: "Time: ";
    opacity: .8;
    font-size: .9rem
  }

  .match-row .score::before {
    content: "Score: ";
    font-weight: 600;
    opacity: .9
  }

  .match-row .score {
    display: flex !important;
    font-weight: 700;
    color: var(--text)
  }

  .match-row .outcome {
    display: flex !important
  }

  .match-row .outcome::before {
    content: "Result: ";
    font-weight: 600;
    opacity: .9;
    margin-right: .5rem
  }

  .match-row .outcome {
    font-weight: 700;
    font-size: .98rem
  }

  .match-row .outcome.Correct {
    color: var(--success)
  }

  .match-row .outcome.Incorrect {
    color: var(--danger)
  }

  .match-row .outcome.Pending {
    color: var(--primary)
  }

  .match-row .outcome.Postponed {
    color: var(--gold)
  }

  .match-row.interrupted .time {
    color: #f59e0b;          
    font-weight: 600;
  }
}

.outcome.Correct {
  background: rgba(16, 185, 129, .2);
  color: var(--success)
}

.outcome.Incorrect {
  background: rgba(239, 68, 68, .2);
  color: var(--danger)
}

.outcome.Pending {
  background: rgba(99, 102, 241, .2);
  color: var(--primary)
}

.outcome.Postponed {
  background: rgba(251, 191, 36, .2);
  color: var(--gold);
  font-weight: 600
}

.ticket-footer {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, .1);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  font-size: 1rem;
  font-weight: 600
}

.stake-info {
  text-align: left;
  color: var(--text)
}

.odds-info {
  text-align: center;
  color: var(--gold)
}

.payout-info {
  text-align: right;
  color: var(--gold)
}

.payout-info.win {
  color: var(--success)
}

.payout-info.loss {
  color: var(--danger)
}

.payout-info.postponed {
  color: var(--gold)
}

.odds-info.adj {
  font-weight: 700
}

.odds-info.adj::after {
  content: " (Adjusted)";
  font-size: .85rem;
  opacity: .9
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--glass);
  border-radius: 16px;
  border: 1px dashed var(--border);
  color: var(--text);
  opacity: .8
}

.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: .6
}

.empty-state a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none
}

.countdown-container {
  margin: auto;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(251, 191, 36, 0.1);
  padding: 1rem;
  width: 300px;
  border-radius: 12px;
}

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-height: 500px;
  overflow-y: auto;
  padding: 0 .5rem
}

.breakdown-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .9rem;
  backdrop-filter: blur(8px);
  transition: transform .2s
}

.breakdown-card:hover {
  transform: translateX(4px)
}

.breakdown-left {
  display: flex;
  flex-direction: column;
  gap: .25rem
}

.breakdown-type {
  font-weight: 700;
  color: var(--primary)
}

.breakdown-date {
  font-size: .8rem;
  opacity: .7
}

.breakdown-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .25rem;
  text-align: right
}

.breakdown-odds {
  color: var(--gold);
  font-weight: 600
}

.breakdown-pnl {
  font-weight: 700
}

.breakdown-pnl.win {
  color: var(--success)
}

.breakdown-pnl.loss {
  color: var(--danger)
}

.breakdown-pnl.postponed {
  color: var(--gold)
}

.breakdown-pnl.pending {
  color: var(--primary);
  opacity: .8
}

.pricing-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 1.5rem
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  position: relative;
  transition: .3s
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, .2)
}

.pricing-card.recommended {
  border: 2px solid var(--gold)
}

.pricing-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #1f2937;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 700
}

.pricing-card h3 {
  font-size: 1.4rem;
  margin: 0 0 .5rem
}

.pricing-card .price {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold)
}

.pricing-card .save {
  color: var(--success)
}

.pricing-card ul {
  list-style: none;
  margin: 1rem 0;
  font-size: .95rem
}

.pricing-card ul li {
  margin: .5rem 0;
  opacity: .9
}

.pricing-card .payment-methods {
  margin: 1rem 0;
  opacity: .7;
  font-size: .9rem
}

.subscribe-btn {
  width: 100%;
  padding: .9rem;
  margin-top: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: .3s
}

.subscribe-btn:hover {
  transform: translateY(-2px)
}

.subscribe-btn:disabled {
  opacity: .7;
  cursor: not-allowed
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: .3s
}

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

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  width: 90%;
  max-width: 440px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  animation: modalIn .4s ease
}

@keyframes modalIn {
  from {
    transform: scale(.9);
    opacity: 0
  }
  to {
    transform: scale(1);
    opacity: 1
  }
}

.modal h2 {
  font-size: 1.8rem;
  margin-bottom: .5rem;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent
}

.input-group {
  position: relative;
  margin: 1.2rem 0
}

.input-group input {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--glass);
  color: var(--text);
  font-size: 1rem
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .2)
}

.iti {
  width: 100% !important;
  display: block
}

.modal button {
  width: 100%;
  padding: 1rem;
  margin: 1rem 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: .3s;
  box-shadow: 0 4px 15px rgba(99, 102, 241, .3)
}

.modal button:hover {
  transform: translateY(-2px)
}

.modal .link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600
}

.modal-alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 10px;
  text-align: center;
  font-size: .9rem
}

.modal-alert.error {
  background: rgba(239, 68, 68, .15);
  color: var(--danger)
}

.modal-alert.success {
  background: rgba(16, 185, 129, .15);
  color: var(--success)
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--text);
  opacity: .6;
  font-size: .9rem;
  margin-top: 3rem;
  line-height: 1.6
}

#profit-dashboard .pricing-card {
  text-align: center
}

#profit-dashboard .price {
  font-size: 1.8rem;
  margin: .5rem 0
}

#profit-dashboard small {
  display: block;
  font-size: .9rem
}

.profit-positive {
  color: var(--success)
}

.profit-negative {
  color: var(--danger)
}

#countdown-box {
  text-align: center;
  padding: 2.5rem 1.5rem
}

#countdown {
  margin-top: 1rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold)
}

@keyframes loading {
  0% { background-position: 200% 0 }
  100% { background-position: -200% 0 }
}

@keyframes pulse {
  0%, 100% { opacity: .6 }
  50% { opacity: 1 }
}

.skeleton {
  background: var(--card);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1rem 0;
  animation: pulse 1.8s infinite
}

.skeleton>div {
  background: #333;
  border-radius: 8px;
  height: 20px;
  margin: 10px 0
}

.fade-in {
  animation: fadeIn .6s ease-out forwards
}

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

#sentinel {
  height: 50px
}

#open-chat-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000001;
  padding: 12px 18px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  cursor: pointer;
  transition: opacity .3s ease;
  background: #ef4444;
  color: #fff;
  margin-bottom: 45px;
}

#open-chat-btn.hidden {
  opacity: 0;
  pointer-events: none
}

#chat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 999998
}

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

#chat-panel {
  position: fixed;
  bottom: -600px;
  right: 5px;
  width: 350px;
  height: 550px;
  background: #fff;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 0 25px rgba(0, 0, 0, .25);
  overflow: hidden;
  transition: bottom .4s ease;
  z-index: 999999
}

#chat-panel.open {
  bottom: 0
}

#chat-frame {
  width: 100%;
  height: 100%
}

#open-stream-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000001;
  padding: 14px 24px;
  border: none;
  border-radius: 50px;
  background: #10b981;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(16, 185, 129, .4);
  transition: all .3s;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 45px;
}

#open-stream-btn:hover {
  transform: translateY(-5px)
}

#open-stream-btn.hidden {
  opacity: 0;
  pointer-events: none
}

@media(min-width:1024px) {
  #open-stream-btn {
    display: block
  }
}

#stream-panel {
  position: fixed;
  bottom: -100vh;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100vh;
  background: #0f172a;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .6);
  z-index: 999999;
  transition: bottom .6s cubic-bezier(.68, -.55, .27, 1.55);
  display: flex;
  flex-direction: column;
  color: #fff;
  overflow: hidden;
}

#stream-panel.open {
  bottom: 0
}

#stream-header {
  padding: 1.2rem 1rem;
  min-height: 60px;
  background: #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3)
}

#stream-header h3 {
  margin: 0;
  color: #10b981;
  font-size: 1.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75%
}

#close-stream-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 2.8rem;
  cursor: pointer;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: .5rem;
  line-height: 1;
}

#stream-panel.streaming #stream-header {
  padding: 8px 12px;
  min-height: auto;
  height: auto;
}

#stream-panel.streaming #stream-header h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 48px);
  color: #e2e8f0;
}

#stream-panel.streaming #close-stream-btn {
  font-size: 1.25rem;
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
}

@media(max-width:768px) {
  #stream-header {
    padding: 1.4rem 1.2rem
  }

  #stream-header h3 {
    font-size: 1.35rem
  }

  #close-stream-btn {
    font-size: 3.2rem;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15)
  }

  #stream-panel.streaming #stream-header {
    padding: 8px 12px;
  }

  #stream-panel.streaming #stream-header h3 {
    font-size: 0.9rem;
  }

  #stream-panel.streaming #close-stream-btn {
    font-size: 1.25rem;
    width: 36px;
    height: 36px;
  }
}

.stream-filters {
  padding: 12px 16px;
  background: #1e293b;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all .3s;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1)
}

#sport-filter {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #fff
}

.tab-filters {
  display: flex;
  gap: 8px
}

.filter-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 12px;
  background: #334155;
  color: #cbd5e1;
  cursor: pointer
}

.filter-btn.active {
  background: #10b981;
  color: #fff
}

#stream-matches-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px
}

@media(min-width:640px) {
  #stream-matches-list {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media(min-width:1024px) {
  #stream-matches-list {
    grid-template-columns: repeat(5, 1fr)
  }
}

@media(min-width:1440px) {
  #stream-matches-list {
    grid-template-columns: repeat(6, 1fr)
  }
}

@media(max-width:768px) {
  #stream-matches-list {
    padding: 8px 4px
  }
}

#stream-matches-list::-webkit-scrollbar {
  width: 6px
}

#stream-matches-list::-webkit-scrollbar-track {
  background: transparent
}

#stream-matches-list::-webkit-scrollbar-thumb {
  background: rgba(100, 100, 100, .5);
  border-radius: 3px
}

#stream-matches-list::-webkit-scrollbar-thumb:hover {
  background: #10b981
}

#stream-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 1.1rem
}

#match-stream-container {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  background: #000;
  position: relative;
}

#match-stream-iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
  min-height: 0;
}

#stream-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 10px 12px;
  background: #0f172a;
  border-top: 1px solid #1e293b;
  flex-shrink: 0;
}

#stream-switcher button {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.stream-match-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, .95), rgba(15, 23, 42, .95));
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .12);
  transition: all .35s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
  backdrop-filter: blur(10px);
  height: 240px;
  display: flex;
  flex-direction: column;
  position: relative
}

.stream-match-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, .45);
  border-color: #10b981
}

.stream-match-card.live-match {
  border: 2px solid #10b981 !important;
  box-shadow: 0 0 18px rgba(16, 185, 129, .35)
}

.stream-match-card.upcoming-match {
  opacity: .65;
  cursor: not-allowed
}

.stream-match-card.upcoming-match:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3)
}

.stream-match-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(16, 185, 129, .15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none
}

.stream-match-card:hover::before {
  opacity: 1
}

.match-poster {
  height: 90px;
  background: rgba(30, 41, 59, .8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(16, 185, 129, .4);
  opacity: .6;
  flex-shrink: 0
}

.match-poster:not([src]),
.match-poster[src=""],
.match-poster:empty {
  background: rgba(30, 41, 59, .9)
}

.stream-match-card[data-sport=soccer] .match-poster:not([src])::after,
.stream-match-card[data-sport=soccer] .match-poster[src=""]::after {
  content: "\f1e3"
}

.stream-match-card[data-sport=basketball] .match-poster:not([src])::after,
.stream-match-card[data-sport=basketball] .match-poster[src=""]::after {
  content: "\f434"
}

.stream-match-card[data-sport=tennis] .match-poster:not([src])::after,
.stream-match-card[data-sport=tennis] .match-poster[src=""]::after {
  content: "\f45e"
}

.stream-match-card[data-sport=cricket] .match-poster:not([src])::after,
.stream-match-card[data-sport=cricket] .match-poster[src=""]::after {
  content: "\f449"
}

.stream-match-card[data-sport=boxing] .match-poster:not([src])::after,
.stream-match-card[data-sport=boxing] .match-poster[src=""]::after {
  content: "\f44b"
}

.stream-match-card[data-sport=mma] .match-poster:not([src])::after,
.stream-match-card[data-sport=mma] .match-poster[src=""]::after,
.stream-match-card[data-sport=ufc] .match-poster:not([src])::after,
.stream-match-card[data-sport=ufc] .match-poster[src=""]::after {
  content: "\f44b"
}

.stream-match-card .match-poster:not([src])::after,
.stream-match-card .match-poster[src=""]::after {
  content: "\f091";
  font-family: 'Font Awesome 6 Free';
  font-weight: 900
}

.match-logo:not([src]),
.match-logo[src=""] {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, .08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: rgba(251, 191, 36, .5);
  flex-shrink: 0
}

.match-logo:not([src])::after,
.match-logo[src=""]::after {
  content: "\f5cb";
  font-family: 'Font Awesome 6 Free';
  font-weight: 900
}

.match-league {
  color: #fbbf24;
  font-size: .78rem;
  font-weight: 600;
  opacity: .9;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.match-teams {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0
}

.match-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  padding: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3)
}

.match-title {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical
}

.match-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #94a3b8;
  font-size: .82rem;
  margin-top: 2px
}

.match-streams {
  color: #10b981;
  font-weight: 600
}

.match-status {
  margin-top: 6px;
  text-align: right;
  font-weight: 700;
  font-size: .85rem;
  color: #fff
}

.match-status::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  margin-right: 6px;
  animation: pulseDot 1.5s infinite;
  opacity: 0
}

.stream-match-card.live-match .match-status::before {
  opacity: 1
}

@keyframes pulseDot {
  0%, 100% { opacity: 1 }
  50% { opacity: .6 }
}

@media (max-width: 768px) {
  #install-btn {
    bottom: 80px;
  }
}

#install-btn {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), #facc15);
  color: #1e2937;                    
  border: none;
  border-radius: 50px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 8px 25px rgba(252, 211, 77, 0.45);
  z-index: 1000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .3s ease;
  opacity: 0;
  pointer-events: none;
}

#install-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

#install-btn:hover {
  transform: translateX(-50%) translateY(-4px);
  box-shadow: 0 12px 30px rgba(252, 211, 77, 0.55);
}

@media (min-width: 1024px) {
  #install-btn {
    display: block;
    bottom: 65px;
  }
}

#persistent-affiliate-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-top: 3px solid #10b981;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;      
  z-index: 999999;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.3);
  flex-wrap: wrap;
  text-align: center;
}

@media (max-width: 640px) {
  #persistent-affiliate-banner {
    width: 100%;
    bottom: 0;
    left: 0;
    right: 0;
  }
}

#livepay-phone-modal,
#livepay-waiting-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 1rem;
  opacity: 1;
  pointer-events: auto;
}

#livepay-phone-modal.active,
#livepay-waiting-modal.active {
  display: flex !important;
}

#livepay-phone-modal .modal-content,
#livepay-waiting-modal .modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  animation: modalIn 0.4s ease;
}