/* ==================== HERO SECTION ==================== */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(270deg, #CCFF00, #11FF00, #FFFC91);
  background-size: 800% 800%;
  animation: gradientMove 20s ease infinite;
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Moving Decorative Lines */
.hero-section::before {
  content: "";
  position: absolute;
  width: 250%;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
  top: 25%;
  left: -70%;
  transform: rotate(25deg);
  animation: moveLine1 12s linear infinite;
  pointer-events: none;
  z-index: 1;
}

.hero-section::after {
  content: "";
  position: absolute;
  width: 250%;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
  top: 65%;
  left: -70%;
  transform: rotate(-25deg);
  animation: moveLine2 18s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes moveLine1 {
  0% { transform: translateX(0) rotate(25deg); }
  100% { transform: translateX(120%) rotate(25deg); }
}

@keyframes moveLine2 {
  0% { transform: translateX(0) rotate(-25deg); }
  100% { transform: translateX(120%) rotate(-25deg); }
}

/* Grid Overlay - Now a real HTML element (recommended) */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(194, 194, 194, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(194, 194, 194, 0.25) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: 
    linear-gradient(to bottom, black 85%, transparent 100%),
    linear-gradient(to right, black 85%, transparent 100%),
    linear-gradient(to left, black 85%, transparent 100%);
  -webkit-mask-composite: destination-in;
  mask-image: 
    linear-gradient(to bottom, black 85%, transparent 100%),
    linear-gradient(to right, black 85%, transparent 100%),
    linear-gradient(to left, black 85%, transparent 100%);
  mask-composite: intersect;
}

/* Floating Shapes */
.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.25;
  animation: float 12s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

.shape.square { border-radius: 8px; }
.shape.one   { width:80px; height:80px; background:#fff; top:10%; left:15%; animation-duration:14s; }
.shape.two   { width:50px; height:50px; background:#31362F; bottom:15%; right:20%; animation-duration:18s; }
.shape.three { width:100px; height:100px; background:#99FF00; bottom:10%; left:25%; animation-duration:22s; }

@keyframes float {
  0%   { transform: translate(0,0) rotate(0deg); }
  25%  { transform: translate(40px,-30px) rotate(90deg); }
  50%  { transform: translate(-30px,-50px) rotate(180deg); }
  75%  { transform: translate(20px,30px) rotate(270deg); }
  100% { transform: translate(0,0) rotate(360deg); }
}

/* Content - Above all effects */
.tagline, .main-title, .subtitle, .cta-buttons, .sidebar {
  position: relative;
  z-index: 2;
}

.tagline {
  background: #ffebee;
  color: #d32f2f;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  border: 1px solid #ffcdd2;
  display: inline-block;
}

.main-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
}

.subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin-bottom: 40px;
  max-width: 600px;
}

.cta-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary {
  background: #000; color: #fff;
  padding: 15px 30px; border: none; border-radius: 5px;
  font-size: 16px; text-decoration: none; display: inline-block;
  transition: background 0.3s;
}
.btn-primary:hover { background: #333; }

.btn-secondary {
  background: transparent; color: #000;
  padding: 15px 30px; border: 1px solid #000; border-radius: 5px;
  font-size: 16px; text-decoration: none; display: inline-block;
  transition: border-color 0.3s;
}
.btn-secondary:hover { border-color: #333; }

.sidebar {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.sidebar-icon {
  width: 45px; height: 45px;
  background: #fff; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border: 1px solid #e0e0e0; font-size: 20px;
  transition: all .3s ease;
}
.sidebar-icon:hover {
  background: #f9f9f9;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* Responsive */
@media (min-width: 768px) {
  .hero-section { flex-direction: row; padding: 0 50px; }
  .content { flex: 1; padding-right: 50px; }
  .sidebar { margin-top: 0; align-items: flex-start; }
}

@media (max-width: 767px) {
  .cta-buttons { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary {
    width: 100%;
    max-width: 250px;
    border-radius: 15px;
  }
}

/* ==================== POPULAR / GALLERY SECTION ==================== */
.popular-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.popular-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.popular-header h2 {
  font-size: 2rem;
  margin: 0;
}

.popular-header a {
  font-size: 0.9rem;
  color: #000;
  text-decoration: none;
  font-weight: 500;
}

.popular-subtext {
  color: #777;
  margin-bottom: 2rem;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.card {
  flex: 1 1 calc(25% - 1.5rem);
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  
  display: flex;
  flex-direction: column;
  min-width: 250px;
}

.card-img {
  position: relative;
  height: 300px;
  background-size: cover;
  background-position: center;
  border-radius: 1rem 1rem 0 0;
  overflow: hidden;
}

.card-img video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem 1rem 0 0;
}

/* Video expand icon */
.expand-icon {
  position: absolute;
  top: 1rem; left: 1rem;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
  transition: all .2s;
  z-index: 3;
}
.expand-icon:hover {
  transform: scale(1.1);
  background: #fff;
}

.user-overlay {
  position: absolute;
  bottom: 1rem; left: 1rem;
  background: rgba(255,255,255,.9);
  border-radius: 2rem;
  padding: .5rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,.1);
  z-index: 2;
}

.user-overlay img {
  width: 32px; height: 32px; border-radius: 50%;
}

.user-overlay .info {
  font-size: .8rem; color: #333;
}
.user-overlay .info span {
  font-weight: 600;
  display: block;
}

.card-body {
  padding: 1rem;
}

.card-body .platform {
  font-size: .8rem;
  font-weight: 600;
  color: #3b82f6;
  text-transform: uppercase;
  margin-bottom: .3rem;
}

.card-body .price {
  font-weight: 600;
  float: right;
  color: #000;
}

.card-body p {
  font-size: .9rem;
  color: #444;
  margin-top: 1.5rem;
}

/* Stats & Rating */
.stats {
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  width: 100%;
}

.stats span {
  flex: 1 1 100%;
  word-break: break-word;
}

.rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .9rem;
  color: #f5b301;
}

.rating i {
  color: #f5b301;
  font-style: normal;
}

/* Video Popup */
.video-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.video-popup.active {
  display: flex;
}

.video-popup video {
  max-width: 90%;
  max-height: 80%;
  border-radius: 1rem;
}

.video-popup .close-btn {
  position: absolute;
  top: 2rem; right: 2rem;
  background: #fff;
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
}

/* Responsive Cards */
@media (max-width: 992px) {
  .card { flex: 1 1 calc(50% - 1rem); }
}

@media (max-width: 600px) {
  .card { flex: 1 1 100%; }
}