:root {
  --bg-primary: #1F2533;
  --bg-secondary: #2B3143;
  --text-primary: #FFFFFF;
  --text-secondary: #99A0B0;
  --accent-color: #F84464; /* BookMyShow Pink/Red */
  --accent-hover: #ff2a55;
  --font-main: 'Inter', 'Outfit', sans-serif;
}

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

html, body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }

/* Global Faded Players Background */
.bg-players { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -5; background: #000; overflow: hidden;}
.bg-player-slide {
  position: absolute; top:0; left:0; width:100%; height:100%;
  background-size: cover; background-position: center 15%;
  opacity: 0; transition: opacity 1.5s ease-in-out; filter: grayscale(40%) blur(4px);
}
.bg-player-slide.active { opacity: 0.10; }
.bg-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -4;
  background: linear-gradient(135deg, rgba(31,37,51,0.96), rgba(31,37,51,0.85));
}

/* Header BMS Style */
header {
  position: fixed; top: 0; width: 100%; padding: 15px 5%;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 200; transition: all 0.3s ease;
  background: #333545; box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.logo { display:flex; align-items:center; cursor: pointer; }
nav ul { list-style: none; display: flex; gap: 30px; }
nav a { text-decoration: none; color: #fff; font-weight: 600; font-size: 0.95rem; transition: color 0.3s; }
nav a:hover, nav a.active { color: var(--accent-color); }

/* Buttons */
.btn-primary { padding: 12px 24px; border-radius: 8px; font-weight: 600; text-transform: uppercase; cursor: pointer; transition: all 0.3s; display: inline-block; text-align: center; border: none; }
.btn-bms { background: #F84464; color: #fff; box-shadow: 0 4px 15px rgba(248,68,100,0.4); }
.btn-bms:hover { background: #ff2a55; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(248,68,100,0.6); }
.dp-inline { display: inline-block; }

/* Native 3D Carousel */
.hero-container { padding-top: 100px; display: flex; flex-direction: column; align-items: center; width: 100%; animation: fadeUp 1s ease-out forwards; }
.hero-text { text-align: center; margin-bottom: 20px; z-index: 10; opacity: 0; animation: fadeUp 0.8s 0.2s ease-out forwards;}
.hero-text h1 { font-size: clamp(2rem, 5vw, 4rem); letter-spacing: 0px; color: #fff;}

.native-carousel {
  display: flex; gap: 20px; overflow-x: auto; width: 100%; padding: 40px 10%;
  scroll-snap-type: x mandatory; perspective: 1200px; scroll-behavior: smooth;
  margin-bottom: 20px; cursor: grab; opacity: 0; animation: fadeUp 1s 0.4s ease-out forwards;
}
.native-carousel::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 70vw; height: 60vh; min-height: 400px; max-width: 900px;
  scroll-snap-align: center; border-radius: 16px;
  position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  cursor: pointer; transform-style: preserve-3d; transition: transform 0.1s;
}
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; transition: transform 0.5s; }
.carousel-slide:hover img { transform: scale(1.05); }
.slide-grad { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);}
.slide-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px; }
.slide-info h2 { font-size: 2.5rem; color: #fff; margin-bottom: 5px; }
.slide-info p { font-size: 1.1rem; color: #ccc; margin-bottom: 20px; letter-spacing: 1px;}

/* Sections */
section.container { padding: 60px 5%; }
.section-title { font-size: 2rem; margin-bottom: 30px; color: #fff; }

/* BookMyShow Specific Layout */
.bms-layout { display: flex; gap: 40px; align-items: flex-start; }
.filters-sidebar {
  width: 320px; flex-shrink: 0; background: var(--bg-secondary); padding: 25px; border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.05);
}
.main-content { flex: 1; }

.filter-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 25px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group label { font-size: 1rem; color: #fff; font-weight: 600; display:flex; align-items:center; gap:8px;}
.filter-group select {
  width: 100%; padding: 14px; background: var(--bg-primary); border: 1px solid rgba(255,255,255,0.1); color: white; border-radius: 8px; font-size: 1rem; outline: none; cursor: pointer; transition: border 0.3s;
}
.filter-group select:focus { border-color: var(--accent-color); }

/* Fixtures Grid BMS Style */
.fixtures-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.match-card {
  padding: 25px; cursor: pointer; position: relative; overflow: hidden; display: flex; flex-direction: column;
  background: var(--bg-secondary); border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.2s, box-shadow 0.2s; border: 1px solid rgba(255,255,255,0.02);
}
.match-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.6); }

.match-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.match-type { background: rgba(0,0,0,0.4); padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; color: #ccc;}
.tag-vip { color: var(--accent-color); font-weight: 600; font-size: 0.85rem;}

.teams-container { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.team { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 1; text-align: center; }
.team-logo { width: 50px; height: 50px; object-fit: contain; }
.team-name { font-weight: 700; font-size: 1.1rem; }
.vs { font-weight: 800; color: #666; font-size: 1rem; }

.match-details { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 15px; }
.detail-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 0.95rem; color: #ccc; }
.detail-row i { color: var(--text-secondary); width: 16px; }

/* Ticket Book Box */
.ticket-status { margin-top: 20px; display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,0.2); padding: 15px; border-radius: 8px; }
.availability { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #aaa;}
.badge-count { color: #fff; font-weight: 700; }
.btn-book { background: transparent; border: 1px solid var(--accent-color); color: var(--accent-color); padding: 8px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.match-card:hover .btn-book { background: var(--accent-color); color: #fff; }

/* VIP Modal BMS Style */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10, 10, 15, 0.9); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-content { background: var(--bg-secondary); width: 90%; max-width: 450px; border-radius: 12px; padding: 30px; position: relative; transform: scale(0.95); transition: transform 0.3s; box-shadow: 0 25px 50px rgba(0,0,0,0.8); max-height: 90vh; overflow-y: auto; }
.modal-overlay.active .modal-content { transform: scale(1); }

/* Close Button */
.modal-close { position: absolute; top: 15px; right: 20px; background: transparent; border: none; color: #fff; font-size: 24px; cursor: pointer; transition: opacity 0.3s; opacity: 0.6; }
.modal-close:hover { opacity: 1; }

.modal-header { text-align: left; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.modal-header h3 { font-size: 1.6rem; margin-bottom: 6px; color: #fff;}
.modal-header p { font-size: 1rem; color: #ccc;}

/* Modal Image Gallery */
.modal-gallery-wrapper { margin-bottom: 20px; overflow: hidden; }
.modal-gallery { display: flex; overflow-x: auto; gap: 15px; scroll-snap-type: x mandatory; padding-bottom: 10px; }
.gallery-item { min-width: 120px; height: 100px; scroll-snap-align: start; border-radius: 8px; overflow: hidden; position: relative; flex: 0 0 auto; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.gallery-label { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); color: #fff; font-size: 0.75rem; padding: 15px 5px 5px 5px; text-align: center; font-weight: 600; }

.checkout-details { background: rgba(0,0,0,0.3); padding: 15px; border-radius: 8px; margin-bottom: 20px; }
.checkout-row { display: flex; justify-content: space-between; margin-bottom: 10px; align-items: center; font-size: 0.95rem; }
.checkout-row:last-child { margin-bottom: 0; }
.checkout-label { color: #99A0B0; }
.checkout-value { font-weight: 600; color: #fff; }

.quantity-selector { display: flex; align-items: center; gap: 20px; margin-bottom: 25px; justify-content: space-between; padding: 15px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; }
.qty-ctrl { display: flex; align-items: center; gap: 15px; }
.qty-btn { background: transparent; border: 1px solid var(--accent-color); color: var(--accent-color); width: 35px; height: 35px; border-radius: 4px; font-size: 1.2rem; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center;}
.qty-btn:hover { background: var(--accent-color); color: #fff;}
.qty-display { font-size: 1.2rem; font-weight: 700; width: 30px; text-align: center; }

.btn-full { width: 100%; display: block; padding: 16px; border-radius: 8px; font-size: 1.1rem; }
.tagline-modal { text-align: center; color: #ccc; margin-bottom: 15px; font-size: 0.85rem; }

footer { padding: 40px 5%; text-align: center; color: #666; background: #333545; }

/* Globals */
@keyframes fadeUp { 
  from { opacity: 0; transform: translateY(30px); } 
  to { opacity: 1; transform: translateY(0); } 
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }

@media(max-width: 768px){
    .bms-layout { flex-direction: column; }
    .filters-sidebar { width: 100%; top: auto; position: relative; }
}

/* Dynamic Parallax Section Themes */
.theme-section {
    position: relative;
    background-attachment: fixed !important;
    background-size: cover !important;
    background-position: center 15% !important;
    z-index: 1;
}

.theme-rohit {
    --accent-color: #0077B6; /* Deep Sea Blue */
    --accent-hover: #023E8A;
    background: linear-gradient(135deg, rgba(31,37,51,0.92), rgba(0,119,182,0.3)), url('../assets/hero_rohit.jpg');
}

.theme-kohli {
    --accent-color: #D62828; /* Royal Red */
    --accent-hover: #9D0208;
    background: linear-gradient(135deg, rgba(31,37,51,0.92), rgba(214,40,40,0.3)), url('../assets/hero_kohli.jpg');
}

.theme-dhoni {
    --accent-color: #F4A261; /* Warm Gold */
    --accent-hover: #E76F51;
    background: linear-gradient(135deg, rgba(31,37,51,0.85), rgba(244,162,97,0.35)), url('../assets/hero_dhoni.jpg');
}

.theme-pandya {
    --accent-color: #4CC9F0; /* Titan Cyan */
    --accent-hover: #48CAE4;
    background: linear-gradient(135deg, rgba(31,37,51,0.95), rgba(76,201,240,0.2)), url('../assets/hero_pandya.jpg');
}

/* Theme Context overrides */
.theme-section .btn-bms { background: var(--accent-color); color: #fff; border: 1px solid var(--accent-color); box-shadow: 0 4px 10px rgba(0,0,0,0.4); }
.theme-section .btn-bms:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 6px 15px rgba(0,0,0,0.6); transform: translateY(-2px); }
.theme-section .match-card { background: rgba(43,49,67,0.85); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.05); }
.theme-section .match-card:hover { border-color: var(--accent-color); box-shadow: 0 10px 25px rgba(0,0,0,0.6); transform: translateY(-5px); }
.theme-section .section-title { text-shadow: 0 0 20px var(--accent-color); border-bottom: 2px solid var(--accent-color); display: inline-block; padding-bottom: 5px; }

/* Exception for Sidebar */
.filters-sidebar.theme-section {
    background-attachment: scroll !important; 
    border: 1px solid var(--accent-color);
    position: sticky; top: 100px; /* Sticky scroll behavior */
}
