/**
 * COK'S - Custom Styles
 * Dark theme dengan aqua accent - FIXED RESPONSIVE LAYOUT
 */

/* ==================== IMPORT FONTS ==================== */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/* ==================== ROOT VARIABLES ==================== */
:root {
  --aqua: #00d9ff;
  --aqua-hover: #00b8d9;
  --dark-primary: #0f0f23;
  --dark-secondary: #1a1a2e;
  --dark-tertiary: #16213e;
  --text-light: #ffffff;
  --text-muted: #a0a0a0;
  --border-color: rgba(0, 217, 255, 0.2);
  background-color: var(--dark-primary); /* Fix white flash */
}

/* ==================== GLOBAL STYLES - FIXED OVERSCROLL ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background-color: var(
    --dark-primary
  ); /* Fix white flash - Solid color for overscroll */
  min-height: 100%;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--dark-primary); /* Fallback */
  background-image: linear-gradient(
    135deg,
    var(--dark-primary) 0%,
    var(--dark-secondary) 100%
  );
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overscroll-behavior: none;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

a {
  color: var(--aqua);
  text-decoration: none;
  transition: all 0.3s;
}

a:hover {
  color: var(--aqua-hover);
}

/* ==================== MAIN CONTENT WRAPPER ==================== */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ==================== CONTAINER CENTER FIX ==================== */
.container.mt-4 {
  max-width: 1200px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 15px;
  padding-right: 15px;
}

/* ==================== NAVBAR ==================== */
.navbar {
  background-color: var(--dark-secondary) !important;
  box-shadow: 0 2px 10px rgba(0, 217, 255, 0.1);
  padding: 1rem 0;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--aqua) !important;
  text-shadow: 0 0 10px rgba(0, 217, 255, 0.8);
}

.navbar-brand:hover {
  color: var(--aqua-hover) !important;
}

.nav-link {
  color: var(--text-light) !important;
  font-weight: 500;
  transition: all 0.3s;
}

.nav-link:hover {
  color: var(--aqua) !important;
}

.search-form {
  width: 400px;
}

/* Text Truncation Utility */
.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

/* Custom Profile Menu (Crunchyroll Style) */
.custom-profile-menu {
  background-color: var(--dark-secondary);
  border: 1px solid rgba(0, 217, 255, 0.2);
  min-width: 240px;
  max-width: 90vw; /* Safety for mobile */
  padding: 0;
  overflow: hidden;
}

.profile-header {
  background: linear-gradient(
    135deg,
    var(--dark-tertiary),
    rgba(0, 217, 255, 0.1)
  );
  border-bottom: 1px solid rgba(0, 217, 255, 0.2);
}

.edit-profile-btn:hover {
  color: var(--aqua) !important;
  background-color: rgba(0, 217, 255, 0.1);
  border-radius: 50%;
}

.custom-profile-menu .dropdown-item {
  color: var(--text-light);
  transition: all 0.2s;
}

.custom-profile-menu .dropdown-item:hover {
  background-color: rgba(0, 217, 255, 0.1);
  color: var(--aqua);
  padding-left: 1.5rem;
}

.custom-profile-menu .dropdown-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 991px) {
  .search-form {
    width: 100%;
  }

  /* User Feedback: Resize Navbar Icons on Mobile */
  .navbar .fas, .navbar .fab {
      font-size: 1rem !important; /* Reducing from 1.2rem/1.8rem */
  }
  .navbar-brand .fas {
      font-size: 1.2rem !important; /* slightly larger for logo */
  }
  /* Fix Profile Avatar/Icon size */
  .navbar img.rounded-circle {
      width: 28px !important;
      height: 28px !important;
  }

  /* Mobile Navbar Adjustments */
  .navbar-brand {
    font-size: 1.2rem;
  }

  .navbar-toggler {
    border: none;
    padding: 0;
  }

  .navbar-toggler:focus {
    box-shadow: none;
  }

  /* Ensure dropdowns on mobile don't overflow */
  .custom-profile-menu {
    position: absolute;
    right: 0;
    left: auto;
    width: 280px;
    min-width: auto;
  }
}

.search-form .form-control {
  background-color: var(--dark-primary);
  border: 2px solid var(--border-color);
  color: var(--text-light);
}

.search-form .form-control:focus {
  background-color: var(--dark-primary);
  border-color: var(--aqua);
  color: var(--text-light);
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

/* ==================== BUTTONS WITH GRADIENT ANIMATION ==================== */
.btn-aqua,
.btn-primary {
  height: 48px;
  border: none;
  outline: none;
  color: #fff;
  background: var(--dark-primary);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  position: relative;
  z-index: 0;
  overflow: hidden;
  transition: transform 0.3s ease, background 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
}

/* Animated Gradient Border */
.btn-aqua::before,
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    270deg,
    #00d9ff,
    #00ffff,
    #00ff88,
    #00d9ff,
    #0088ff,
    #00d9ff
  );
  background-size: 400%;
  animation: borderMove 6s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  z-index: -1;
}

/* Glow Effect */
.btn-aqua::after,
.btn-primary::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  background: linear-gradient(
    45deg,
    #00d9ff,
    #00ffff,
    #00ff88,
    #00d9ff,
    #0088ff,
    #00d9ff,
    #00ffff,
    #00d9ff
  );
  background-size: 400%;
  z-index: -2;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  border-radius: inherit;
  animation: glowing 8s linear infinite;
}

.btn-aqua:hover::after,
.btn-primary:hover::after {
  opacity: 1;
}

.btn-aqua:hover,
.btn-primary:hover {
  background: rgba(26, 26, 46, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(0, 217, 255, 0.8);
}

.btn-aqua:active,
.btn-primary:active {
  transform: translateY(0);
}

.btn-outline-aqua {
  border: 2px solid var(--aqua);
  color: var(--aqua);
  background: transparent;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-outline-aqua:hover {
  background-color: var(--aqua);
  color: var(--dark-primary);
  border-color: var(--aqua);
}

.btn-auth {
  min-width: 110px;
  height: 48px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0 1.5rem;
}

/* ==================== FORMS ==================== */
.form-control {
  background-color: var(--dark-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-light);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.form-control:focus {
  background-color: var(--dark-secondary);
  border-color: var(--aqua);
  color: var(--text-light);
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-label {
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 0.5rem;
  text-align: left;
  display: block;
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
}

/* ==================== CARDS ==================== */
.auth-card,
.form-card,
.profile-card,
.author-card,
.info-card {
  background-color: var(--dark-secondary);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Simplified shadow */
}

.auth-container {
  min-height: calc(100vh - 400px);
  display: flex;
  align-items: center;
  padding: 2rem 0;
}

/* ==================== GAME CARDS ==================== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.game-card {
  background-color: var(--dark-secondary);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 217, 255, 0.5);
}

.game-card-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.game-card:hover .game-card-image img {
  transform: scale(1.1);
}

.badge-playable,
.badge-download {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--aqua);
  color: var(--dark-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-download {
  background-color: #ff6b6b;
}

.game-card-body {
  padding: 1rem;
}

.game-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-meta {
  margin-bottom: 0.75rem;
}

.game-category {
  display: inline-block;
  background-color: var(--dark-tertiary);
  color: var(--aqua);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.game-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.game-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

/* ==================== GAME DETAIL - FIXED UNTUK show.ejs ==================== */

.game-detail-card {
  background: var(--dark-secondary);
  border-radius: 1.5rem;
  overflow: hidden;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); /* Simplified shadow */
  transform: translateZ(0);
  backface-visibility: hidden;
}

.game-detail-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    270deg,
    #00d9ff,
    #00ffff,
    #00ff88,
    #00d9ff,
    #0088ff,
    #00d9ff
  );
  background-size: 400%;
  animation: borderMove 6s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  z-index: 1;
  pointer-events: none;
  display: none; /* Disable expensive animation on mobile */
}

@media (min-width: 992px) {
  .game-detail-card::before {
    display: block; /* Enable only on desktop */
  }
}

.game-detail-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.game-detail-card .p-4 {
  padding: 1.5rem !important;
}

.game-detail-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--aqua);
  text-shadow: 0 0 20px rgba(0, 217, 255, 0.6);
  line-height: 1.2;
  word-wrap: break-word;
}

/* FIX: Game-detail-meta - panjang box menyesuaikan teks */
.game-detail-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: center;
}

.game-detail-meta .game-category,
.game-detail-meta .game-type {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(
    135deg,
    var(--dark-tertiary),
    rgba(0, 217, 255, 0.1)
  );
  color: var(--aqua);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(0, 217, 255, 0.3);
  white-space: nowrap;
  transition: all 0.3s ease;
  width: fit-content;
}

.game-detail-meta .game-category:hover,
.game-detail-meta .game-type:hover {
  background: linear-gradient(
    135deg,
    rgba(0, 217, 255, 0.2),
    var(--dark-tertiary)
  );
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
}

/* ==================== STAT BOXES - FIXED COMPACT & PADDING ==================== */
.game-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0;
  width: 100%;
}

.stat-box {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 0.75rem;
  background: linear-gradient(
    135deg,
    rgba(22, 33, 62, 0.8),
    rgba(0, 217, 255, 0.05)
  );
  border-radius: 0.875rem;
  border: 1px solid rgba(0, 217, 255, 0.3);
  transition: all 0.3s ease;
  text-align: center;
  min-height: auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.stat-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-box:hover::before {
  opacity: 1;
}

.stat-box:hover {
  background: linear-gradient(
    135deg,
    rgba(0, 217, 255, 0.15),
    rgba(22, 33, 62, 0.9)
  );
  transform: translateY(-3px) translateZ(0);
  box-shadow: 0 8px 25px rgba(0, 217, 255, 0.4);
  border-color: rgba(0, 217, 255, 0.6);
}

/* Icon styling - disesuaikan dengan struktur show.ejs */
.stat-box > i {
  font-size: 1.75rem;
  color: var(--aqua);
  filter: drop-shadow(0 0 10px rgba(0, 217, 255, 0.6));
  margin: 0;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.stat-box:hover > i {
  transform: scale(1.1);
}

/* Div container untuk strong dan small */
.stat-box > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  z-index: 1;
}

.stat-box strong {
  font-size: 1.5rem;
  display: block;
  color: var(--text-light);
  line-height: 1;
  margin: 0;
  font-weight: 700;
}

.stat-box small {
  color: var(--text-muted);
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  line-height: 1;
  margin: 0;
}

/* ==================== GAME ACTIONS - FIX HEIGHT BUTTON ==================== */
.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}

/* FIX: Semua button dalam game-actions memiliki height yang sama */
.game-actions .btn-lg,
.game-actions .btn {
  font-size: 0.9rem !important;
  padding: 0.6rem 1rem !important;
  height: 48px !important;
  line-height: 1.5 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 1 auto;
  white-space: nowrap;
}

.game-actions form {
  display: inline-flex;
  margin: 0;
}

.game-actions form .btn {
  margin: 0;
}

/* ==================== GAME DESCRIPTION - FIX MARGIN ==================== */
.game-description {
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.game-description h3 {
  font-size: 1.5rem;
  color: var(--aqua);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
}

.game-description p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ==================== GAME TAGS ==================== */
.game-tags {
  margin-top: 0.75rem;
}

.game-tags h5 {
  color: var(--aqua);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.badge-tag {
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--dark-tertiary),
    rgba(0, 217, 255, 0.1)
  );
  color: var(--aqua);
  padding: 0.4rem 0.9rem;
  border-radius: 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(0, 217, 255, 0.3);
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.badge-tag:hover {
  background: linear-gradient(
    135deg,
    rgba(0, 217, 255, 0.2),
    var(--dark-tertiary)
  );
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
}

/* ==================== RATINGS SECTION - FIX MARGIN ==================== */
.ratings-section {
  background: var(--dark-secondary);
  border-radius: 1.5rem;
  padding: 1.5rem;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  margin-top: 1.5rem;
}

/* Animated gradient border for ratings section */
.ratings-section::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    270deg,
    #00d9ff,
    #00ffff,
    #00ff88,
    #00d9ff,
    #0088ff,
    #00d9ff
  );
  background-size: 400%;
  animation: borderMove 6s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  z-index: 1;
  pointer-events: none;
  display: none; /* Disable expensive animation on mobile */
}

@media (min-width: 992px) {
  .game-detail-card::before {
    display: block; /* Enable only on desktop */
  }
}

.ratings-section h3 {
  color: var(--aqua);
  margin-bottom: 1.25rem;
  font-size: 1.75rem;
  text-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
}

/* FIX: Rating form dengan height yang disesuaikan */
.rating-form {
  background: linear-gradient(
    135deg,
    var(--dark-tertiary),
    rgba(0, 217, 255, 0.05)
  );
  padding: 1.25rem;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0, 217, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.rating-form h5 {
  color: var(--aqua);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

/* FIX: Label rata kiri */
.rating-form .form-label {
  text-align: left;
  display: block;
  width: 100%;
}

.rating-form .mb-3 {
  margin-bottom: 1rem !important;
}

.star-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.star-input input {
  display: none;
}

.star-input label {
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  filter: drop-shadow(0 0 5px transparent);
}

.star-input label:hover,
.star-input label:hover ~ label,
.star-input input:checked ~ label {
  color: #ffd700;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
  transform: scale(1.1);
}

/* FIX: Submit button center */
.rating-form button[type="submit"] {
  display: block;
  margin: 0 auto;
  min-width: 180px;
}

.ratings-list {
  margin-top: 1.5rem;
}

.rating-item {
  background: linear-gradient(
    135deg,
    var(--dark-tertiary),
    rgba(0, 217, 255, 0.05)
  );
  padding: 1.25rem;
  border-radius: 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(0, 217, 255, 0.2);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.rating-item:hover {
  background: linear-gradient(
    135deg,
    rgba(0, 217, 255, 0.1),
    var(--dark-tertiary)
  );
  transform: translateX(5px);
  box-shadow: 0 6px 25px rgba(0, 217, 255, 0.3);
}

.rating-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.rating-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rating-user img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--aqua);
  box-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
}

.rating-user i.fa-user-circle {
  color: var(--aqua);
  filter: drop-shadow(0 0 10px rgba(0, 217, 255, 0.5));
}

.rating-user strong {
  color: var(--text-light);
  font-size: 1.1rem;
}

.rating-stars {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.rating-stars i {
  color: var(--text-muted);
  font-size: 1rem;
}

.rating-stars i.filled {
  color: #ffd700;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.6));
}

.rating-review {
  color: var(--text-light);
  line-height: 1.6;
  margin-top: 0.5rem;
}

/* ==================== STAR RATING ==================== */
.star-rating {
  color: #ffd700;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

/* ==================== SIDEBAR CARDS ROW - FIX UNTUK 2 KOLOM DI TABLET ==================== */
.sidebar-cards-row {
  margin-left: 0;
  margin-right: 0;
}

.sidebar-cards-row > [class*="col-"] {
  padding-left: 0;
  padding-right: 0;
}

/* ==================== AUTHOR CARD & INFO CARD ==================== */
.author-card,
.info-card {
  background: var(--dark-secondary);
  border-radius: 1.5rem;
  padding: 1.5rem;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
  height: auto; /* Default height auto to prevent overlap on mobile */
}

@media (min-width: 768px) {
  .author-card,
  .info-card {
    height: 100%; /* Only use 100% height on tablet/desktop where they might be side-by-side */
  }
}

/* Animated gradient border for author and info cards */
.author-card::before,
.info-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    270deg,
    #00d9ff,
    #00ffff,
    #00ff88,
    #00d9ff,
    #0088ff,
    #00d9ff
  );
  background-size: 400%;
  animation: borderMove 6s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  z-index: 1;
  pointer-events: none;
  display: none; /* Disable expensive animation on mobile */
}

@media (min-width: 992px) {
  .game-detail-card::before {
    display: block; /* Enable only on desktop */
  }
}

.author-card h5,
.info-card h5 {
  color: var(--aqua);
  margin-bottom: 1.25rem;
  font-size: 1.3rem;
  text-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
}

.author-info {
  text-align: center;
  padding: 1rem 0;
}

.author-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid var(--aqua);
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.6);
  transition: all 0.3s ease;
}

.author-avatar-large:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(0, 217, 255, 0.8);
}

.author-info h4 {
  color: var(--aqua);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  text-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
}

/* ==================== INFO CARD ==================== */
.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
}

.info-list li:hover {
  padding-left: 0.5rem;
  background: rgba(0, 217, 255, 0.05);
  border-radius: 0.5rem;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list i {
  color: var(--aqua);
  width: 24px;
  font-size: 1.1rem;
  filter: drop-shadow(0 0 8px rgba(0, 217, 255, 0.5));
}

.info-list span {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ==================== PROFILE (CONTINUED) ==================== */
.profile-header {
  text-align: center;
  padding-bottom: 1.5rem;
}

/* FIX: Profile avatar size - mengurangi ukuran agar tidak tabrakan */
.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--aqua);
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.6);
  margin-bottom: 1rem;
}

.profile-bio {
  margin-top: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.profile-stats .stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--dark-tertiary);
  border-radius: 0.5rem;
}

.profile-stats i {
  font-size: 2rem;
  color: var(--aqua);
}

.profile-info {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.profile-games {
  background-color: var(--dark-secondary);
  border-radius: 1rem;
  padding: 2rem;
}

.profile-games h3 {
  color: var(--aqua);
  margin-bottom: 2rem;
}

/* ==================== PLAY PAGE - FIXED STRUCTURE ==================== */
.play-container {
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--dark-primary);
}

.play-header {
  background-color: transparent;
  padding: 1rem 0;
  box-shadow: none;
  flex-shrink: 0;
  margin-bottom: 5px;
}

.play-header .d-flex {
  width: 100%;
}

.play-action-left,
.play-action-right {
  flex: 1;
  display: flex;
}

.play-action-right {
  justify-content: flex-end;
}

.play-title-section {
  flex: 2;
  text-align: center;
}

.play-header h2 {
  color: var(--aqua);
  margin: 0;
  font-size: 1.5rem;
  text-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
}

@media (max-width: 768px) {
  .play-header .d-flex {
    flex-direction: row !important; /* Force horizontal alignment */
    flex-wrap: nowrap; /* Prevent wrapping */
    gap: 0.5rem;
  }

  .play-action-left,
  .play-action-right {
    width: auto;
    flex: 0 0 auto; /* Don't grow or shrink */
    justify-content: center;
  }

  .play-title-section {
    width: auto;
    flex: 1; /* Take remaining space */
    margin-bottom: 0;
    order: 0; /* Reset order */
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden; /* Prevent overflow if title is long */
  }

  .play-title-section h2 {
    font-size: 1.2rem; /* Slightly smaller title on mobile */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Square buttons for mobile */
  .btn-mobile-square {
    width: 42px; /* Fixed width */
    height: 42px !important; /* Fixed height */
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    aspect-ratio: 1/1; /* Ensure 1:1 aspect ratio */
  }

  .play-container {
    margin-top: 5rem !important;
  }
}

.game-play-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.game-iframe-container {
  width: 100%;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.2);
  transition: all 0.3s ease;
}

.game-iframe-container.landscape {
  aspect-ratio: 16/9;
}

.game-iframe-container.portrait {
  aspect-ratio: 9/16;
  max-width: 450px; /* Limit width for portrait mode on desktop */
  margin: 0 auto;
}

.game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.download-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Fullscreen Override */
.game-iframe-container:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  aspect-ratio: unset;
}

.game-iframe-container:fullscreen .game-iframe {
  width: 100%;
  height: 100%;
}

/* ==================== FILTER BAR ==================== */
.filter-bar {
  background-color: var(--dark-secondary);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ==================== PAGE HEADER ==================== */
.page-header {
  margin-bottom: 3rem;
}

.glow-aqua {
  color: var(--aqua);
  text-shadow: 0 0 10px rgba(0, 217, 255, 0.8);
}

/* ==================== FOOTER - RESPONSIVE ==================== */
.footer {
  background-color: var(--dark-secondary);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
  border-top: 2px solid var(--border-color);
  position: relative;
  z-index: 10;
  width: 100%;
}

.footer * {
  box-sizing: border-box;
}

.footer .container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 15px;
  padding-right: 15px;
}

.footer .row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -15px;
  margin-right: -15px;
}

.footer .row > [class*="col-"] {
  padding-left: 15px;
  padding-right: 15px;
  margin-bottom: 2rem;
}

.footer ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.footer ul li {
  margin-bottom: 0.75rem;
  padding: 0;
}

.footer ul li:last-child {
  margin-bottom: 0;
}

.footer-brand {
  color: var(--aqua);
  text-shadow: 0 0 10px rgba(0, 217, 255, 0.8);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: block;
}

.footer h6 {
  color: var(--aqua);
  margin-bottom: 1rem;
  margin-top: 0;
  font-weight: 600;
  font-size: 1.1rem;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer a:hover {
  color: var(--aqua);
  padding-left: 5px;
  text-decoration: none;
}

.footer p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.footer .text-center {
  width: 100%;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer .text-center p {
  margin-bottom: 0;
}

.footer .social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.footer .social-icons a {
  color: var(--text-muted);
  font-size: 1.5rem;
  padding: 0;
  transition: all 0.3s ease;
}

.footer .social-icons a:hover {
  color: var(--aqua);
  transform: translateY(-3px);
  padding-left: 0;
}

/* ==================== ERROR PAGES ==================== */
.error-page {
  text-align: center;
  padding: 5rem 0;
}

.error-page h1 {
  font-size: 8rem;
  font-weight: 700;
  color: var(--aqua);
  text-shadow: 0 0 30px rgba(0, 217, 255, 0.8);
}

/* ==================== ALERTS ==================== */
.alert {
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.2);
  color: #28a745;
  border-left: 4px solid #28a745;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.2);
  color: #dc3545;
  border-left: 4px solid #dc3545;
}

.alert-info {
  background-color: rgba(0, 217, 255, 0.2);
  color: var(--aqua);
  border-left: 4px solid var(--aqua);
}

/* ==================== DROPDOWN ==================== */
.dropdown-menu {
  background-color: var(--dark-secondary);
  border: 1px solid var(--border-color);
}

.dropdown-item {
  color: var(--text-light);
  transition: all 0.3s;
}

.dropdown-item:hover {
  background-color: var(--dark-tertiary);
  color: var(--aqua);
}

.dropdown-divider {
  border-color: var(--border-color);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes borderMove {
  0% {
    background-position: 0 0;
  }
  50% {
    background-position: 400% 0;
  }
  100% {
    background-position: 0 0;
  }
}

@keyframes glowing {
  0% {
    background-position: 0 0;
  }
  50% {
    background-position: 400% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.game-card,
.auth-card,
.form-card {
  animation: fadeIn 0.5s ease-out;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--dark-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--aqua);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--aqua-hover);
}

/* ==================== RESPONSIVE - DESKTOP ==================== */
@media (min-width: 992px) {
  .game-detail-image {
    height: 400px;
  }

  .game-actions {
    justify-content: flex-start;
  }

  .game-actions form {
    margin-left: auto;
  }

  /* Sidebar cards dalam 1 kolom di desktop */
  .sidebar-cards-row > .col-lg-12 {
    margin-bottom: 1rem;
  }

  .sidebar-cards-row > .col-lg-12:last-child {
    margin-bottom: 0;
  }

  .play-title-section {
    margin-bottom: 0;
  }

  .play-actions {
    margin-bottom: 0;
  }
}

/* ==================== RESPONSIVE - TABLET (768px - 991px) ==================== */
@media (min-width: 768px) and (max-width: 991px) {
  /* 2 kolom untuk sidebar cards di tablet */
  .sidebar-cards-row {
    display: flex;
    gap: 1rem;
  }

  .sidebar-cards-row > .col-md-6 {
    flex: 0 0 calc(50% - 0.5rem);
    max-width: calc(50% - 0.5rem);
  }

  .author-card,
  .info-card {
    margin-bottom: 0;
  }

  /* FIX: Profile avatar size untuk tablet */
  .profile-avatar {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 991px) {
  .navbar-collapse {
    background-color: var(--dark-secondary);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
  }

  .navbar-nav {
    align-items: stretch !important;
  }

  .nav-link {
    padding: 0.75rem 1rem !important;
    text-align: center;
  }

  .search-form {
    width: 100% !important;
    margin: 1rem 0;
  }

  .navbar-nav .btn {
    width: 100%;
    margin: 0.5rem 0;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .navbar-nav .d-flex {
    flex-direction: column !important;
    width: 100%;
    gap: 0.5rem;
  }

  .navbar-nav .d-flex .btn {
    margin: 0;
  }

  .game-detail-image {
    height: 350px;
  }

  .game-detail-title {
    font-size: 2rem;
  }

  .game-detail-stats {
    gap: 0.5rem;
  }

  .stat-box {
    padding: 0.85rem 0.6rem;
    gap: 0.6rem;
  }

  .stat-box > i {
    font-size: 1.5rem;
  }

  .stat-box strong {
    font-size: 1.35rem;
  }

  .stat-box small {
    font-size: 0.7rem;
  }

  .footer {
    padding: 2.5rem 0 1.5rem;
  }

  .footer .row {
    justify-content: flex-start;
  }

  .footer .row > [class*="col-"] {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 768px) {
  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }

  .game-detail-image {
    height: 300px;
  }

  .game-detail-title {
    font-size: 1.75rem;
  }

  .game-detail-meta {
    gap: 0.5rem;
  }

  .game-detail-meta .game-category,
  .game-detail-meta .game-type {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  /* 3 kolom pada tablet dengan layout vertikal */
  .game-detail-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .stat-box {
    flex-direction: column;
    padding: 0.75rem 0.5rem;
    gap: 0.3rem;
  }

  .stat-box > i {
    font-size: 1.35rem;
  }

  .stat-box strong {
    font-size: 1.25rem;
  }

  .stat-box small {
    font-size: 0.7rem;
  }

  .game-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .game-actions .btn-lg,
  .game-actions .btn {
    width: 100%;
    font-size: 0.9rem !important;
  }

  .game-actions form {
    width: 100%;
  }

  .game-actions form .btn-lg,
  .game-actions form .btn {
    width: 100%;
  }

  /* FIX: Profile avatar size untuk tablet kecil */
  .profile-avatar {
    width: 100px;
    height: 100px;
  }

  .error-page h1 {
    font-size: 5rem;
  }

  .landing-hero h1 {
    font-size: 2.5rem !important;
  }

  .landing-hero p {
    font-size: 1rem !important;
  }

  .footer {
    padding: 2rem 0 1.5rem;
  }

  .footer .row > [class*="col-"] {
    flex: 0 0 50%;
    max-width: 50%;
    margin-bottom: 2rem;
  }

  .footer-brand {
    font-size: 1.3rem;
  }

  .footer h6 {
    font-size: 1rem;
    margin-top: 0;
  }

  .footer .text-center {
    margin-top: 1rem;
    padding-top: 1.5rem;
  }
}

/* ==================== RESPONSIVE - MOBILE ==================== */
@media (max-width: 576px) {
  .game-grid {
    grid-template-columns: 1fr;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .btn {
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
  }

  .game-card-title {
    font-size: 1rem;
  }

  .game-card-image {
    height: 180px;
  }

  .game-detail-image {
    height: 250px;
  }

  .game-detail-title {
    font-size: 1.5rem;
  }

  .game-detail-stats {
    gap: 0.5rem;
  }

  .stat-box {
    padding: 0.7rem 0.4rem;
    gap: 0.3rem;
  }

  .stat-box > i {
    font-size: 1.2rem;
  }

  .stat-box strong {
    font-size: 1.1rem;
  }

  .stat-box small {
    font-size: 0.65rem;
  }

  .game-description h3 {
    font-size: 1.25rem;
  }

  /* Hide text on delete button, show icon only */
  .game-actions form .btn span {
    display: none;
  }

  .game-actions form .btn i {
    margin: 0;
  }

  .author-avatar-large {
    width: 80px;
    height: 80px;
  }

  /* FIX: Ratings section mobile - add margin top and bottom */
  .ratings-section {
    padding: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
  }

  .ratings-section h3 {
    font-size: 1.5rem;
  }

  .rating-form {
    padding: 1rem;
  }

  .rating-form h5 {
    font-size: 1rem;
  }

  .star-input label {
    font-size: 1.75rem;
  }

  .rating-item {
    padding: 1rem;
  }

  .rating-user img {
    width: 40px;
    height: 40px;
  }

  .rating-user strong {
    font-size: 1rem;
  }

  .auth-card,
  .form-card,
  .profile-card {
    padding: 1.5rem;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  /* FIX: Profile avatar size untuk mobile */
  .profile-avatar {
    width: 90px;
    height: 90px;
  }

  .landing-hero {
    padding: 3rem 0 !important;
  }

  .landing-hero h1 {
    font-size: 2rem !important;
  }

  .landing-hero p {
    font-size: 0.9rem !important;
  }

  .footer {
    padding: 2rem 0 1rem;
  }

  .footer .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .footer .row {
    flex-direction: column;
  }

  .footer .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 1.5rem;
  }

  .footer .row > [class*="col-"]:last-child {
    margin-bottom: 0;
  }

  .footer-brand {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }

  .footer h6 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    margin-top: 0;
  }

  .footer ul li {
    margin-bottom: 0.5rem;
  }

  .footer a {
    font-size: 0.9rem;
  }

  .footer p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .footer .text-center {
    margin-top: 1.5rem;
    padding-top: 1rem;
    font-size: 0.85rem;
  }

  .footer .social-icons {
    justify-content: center;
  }

  /* FIX: Sidebar cards full width di mobile dengan margin yang lebih besar */
  .sidebar-cards-row > .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* FIX: Add larger margin between sidebar cards on mobile */
  .author-card {
    margin-bottom: 2rem;
    margin-top: 1.5rem;
  }

  .info-card {
    margin-bottom: 1.5rem;
    margin-top: 0;
  }

  /* FIX: Play page mobile adjustments */
  .play-header {
    padding: 1rem 0;
  }

  .play-header h2 {
    font-size: 1.2rem;
  }

  .play-header .d-flex {
    flex-direction: column;
  }

  .play-header .btn {
    width: 100%;
    font-size: 0.85rem;
  }

  .play-actions {
    width: 100%;
  }

  .play-actions .btn {
    width: 100%;
  }
}

/* Extra Small Mobile */
@media (max-width: 400px) {
  .game-detail-title {
    font-size: 1.25rem;
  }

  .game-detail-meta .game-category,
  .game-detail-meta .game-type {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
  }

  .stat-box {
    padding: 0.6rem 0.3rem;
  }

  .stat-box > i {
    font-size: 1.1rem;
  }

  .stat-box strong {
    font-size: 1rem;
  }

  .stat-box small {
    font-size: 0.6rem;
  }

  .author-avatar-large {
    width: 70px;
    height: 70px;
  }

  /* FIX: Profile avatar size untuk extra small mobile */
  .profile-avatar {
    width: 80px;
    height: 80px;
  }

  /* FIX: Increase margin for extra small mobile */
  .ratings-section {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
  }

  .star-input label {
    font-size: 1.5rem;
  }

  .footer {
    padding: 1.5rem 0 1rem;
  }

  .footer .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .footer-brand {
    font-size: 1.1rem;
  }

  .footer h6 {
    font-size: 0.9rem;
  }

  .footer a,
  .footer p {
    font-size: 0.85rem;
  }

  .footer ul li {
    margin-bottom: 0.4rem;
  }

  .footer .text-center {
    font-size: 0.8rem;
  }

  .footer .social-icons a {
    font-size: 1.3rem;
  }

  /* FIX: Increase margin for extra small mobile */
  .author-card {
    margin-bottom: 2rem;
    margin-top: 1.5rem;
  }

  .info-card {
    margin-bottom: 1.5rem;
  }

  /* FIX: Play page extra small mobile */
  .play-header .btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
}

/* Ensure parallax works on mobile (some browsers disable fixed bg) */
@media (hover: none) {
  .parallax-section {
    background-attachment: scroll;
  }
}

/* Carousel Styles */
.carousel-container {
  position: relative;
  width: 100%;
  height: 400px; /* Reduced from 470px to fix bottom gap */
  background: transparent;
  overflow: hidden;
  margin-bottom: 0 !important;
}

.carousel-container .slide {
  width: 100%;
}

.carousel-container .slide .item {
  width: 180px;
  height: 250px;
  position: absolute;
  top: 80%;
  transform: translate(0, -50%);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  background-position: 50% 50%;
  background-size: cover;
  display: inline-block;
  transition: 0.5s;
  z-index: 1;
}

.carousel-container .slide .item:nth-child(1),
.carousel-container .slide .item:nth-child(2) {
  top: 0;
  left: 0;
  transform: translate(0, 0);
  border-radius: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.carousel-container .slide .item:nth-child(3) {
  left: 65%;
  z-index: 2;
}

.carousel-container .slide .item:nth-child(4) {
  left: calc(65% + 220px);
  z-index: 3;
}

.carousel-container .slide .item:nth-child(5) {
  left: calc(65% + 440px);
  z-index: 4;
}

.carousel-container .slide .item:nth-child(n + 6) {
  left: calc(65% + 660px);
  opacity: 0;
}

.item .content {
  position: absolute;
  top: 50%;
  left: 100px;
  width: 400px;
  text-align: left;
  color: #eee;
  transform: translate(0, -50%);
  font-family: "Poppins", sans-serif;
  display: none;
  z-index: 10;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.carousel-container .slide .item:nth-child(2) .content {
  display: block;
}

.content .name {
  font-size: 60px;
  text-transform: uppercase;
  font-weight: 800;
  opacity: 0;
  animation: animate 1s ease-in-out 1 forwards;
  color: var(--aqua-primary);
}

.content .des {
  margin-top: 10px;
  margin-bottom: 20px;
  font-size: 1.1rem;
  opacity: 0;
  animation: animate 1s ease-in-out 0.3s 1 forwards;
}

.content button {
  padding: 12px 30px;
  border: none;
  cursor: pointer;
  opacity: 0;
  border-radius: 30px;
  background-color: var(--aqua-primary);
  color: #000;
  font-weight: 700;
  transition: all 0.3s;
  animation: animate 1s ease-in-out 0.6s 1 forwards;
}

.content button:hover {
  background-color: #fff;
  transform: scale(1.05);
}

@keyframes animate {
  from {
    opacity: 0;
    transform: translate(0, 100px);
    filter: blur(33px);
  }
  to {
    opacity: 1;
    transform: translate(0);
    filter: blur(0);
  }
}

.carousel-nav {
  display: flex;
  flex-direction: row;
  gap: 20px;
  position: absolute;
  bottom: 30px;
  left: 65%;
  transform: translateX(-50%);
  z-index: 100;
}

.carousel-nav button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.carousel-nav button:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

/* ========================================
   VIDEO CONTROLS - Volume Button
   ======================================== */

/* Video container styling */
.video-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: none;
}

/* Thumbnail background */
.thumb-bg {
  transition: opacity 0.5s ease;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Video spinner */
.video-spinner {
  position: absolute;
  top: 50%;
  left: 65%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.video-spinner .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3rem;
}

/* Volume Toggle Button - CRITICAL! */
.volume-toggle {
  position: absolute;
  bottom: 80px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid rgba(0, 217, 255, 0.6);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.volume-toggle:hover {
  background: rgba(0, 217, 255, 0.9);
  border-color: var(--aqua);
  transform: scale(1.15);
  box-shadow: 0 0 25px rgba(0, 217, 255, 0.8);
}

.volume-toggle i {
  font-size: 1.3rem;
  pointer-events: none;
}

/* Active state - Makes button visible */
.volume-toggle.active {
  display: flex !important;
  animation: fadeInScale 0.4s ease-out;
}

/* Video elements positioning */
.video-bg.youtube-frame,
.video-bg.local-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .volume-toggle {
    width: 45px;
    height: 45px;
    bottom: 70px;
    right: 20px;
  }

  .volume-toggle i {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  .volume-toggle {
    width: 40px;
    height: 40px;
    bottom: 60px;
    right: 15px;
  }

  .volume-toggle i {
    font-size: 1rem;
  }
}

/* Animation */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==================== MOBILE CAROUSEL FIX (16:9) ==================== */
@media (max-width: 768px) {
  .carousel-container {
    height: 56.25vw !important; /* Force 16:9 aspect ratio */
    min-height: 250px; /* Prevent it from being too short */
    margin-bottom: 0;
  }

  /* Adjust upcoming cards size to fit smaller height */
  .carousel-container .slide .item {
    width: 100px;
    height: 140px;
    border-radius: 12px;
    top: 50%; /* Center vertically relative to container */
    transform: translate(0, -50%); /* Fix vertical alignment */
  }

  /* Adjust active item to fully cover */
  .carousel-container .slide .item:nth-child(1),
  .carousel-container .slide .item:nth-child(2) {
    border-radius: 0;
  }

  /* Adjust card positions */
  .carousel-container .slide .item:nth-child(3) {
    left: 65%;
  }
  .carousel-container .slide .item:nth-child(4) {
    left: calc(65% + 110px);
  }
  .carousel-container .slide .item:nth-child(5) {
    left: calc(65% + 220px);
  }

  /* Stack content better */
  .item .content {
    left: 20px;
    width: 60%; /* Leave room for cards on right */
    top: 50%;
    transform: translate(0, -50%);
    padding-right: 10px;
  }

  .content .name {
    font-size: 1.8rem; /* Smaller title */
    margin-bottom: 5px;
    line-height: 1.1;
  }

  .content .des {
    font-size: 0.9rem; /* Smaller desc */
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit text lines to 2 */
    line-clamp: 2; /* Standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
  }

  .content button {
    padding: 8px 20px;
    font-size: 0.85rem;
  }

  /* Adjust nav buttons */
  .carousel-nav {
    bottom: 20px;
    gap: 15px;
  }

  .carousel-nav button {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
}

/* ==================== NAVBAR MOBILE FIXES (FINAL) ==================== */

/* 1. Prevent Wrapping on Mobile Navbar Container */
/* 1. Prevent Wrapping on Mobile Navbar Container (Modified to allow Menu Wrap) */
@media (max-width: 991.98px) {
  .navbar .container {
    flex-wrap: wrap !important; /* Allow wrapping so menu goes to bottom */
    padding-left: 10px !important;
    padding-right: 10px !important;
    justify-content: space-between !important; /* Distribute top items widely */
  }

  /* Force top items closely together if needed, but space-between is usually best */
  
  /* Reset Brand Margin */
  .navbar-brand {
    margin-right: auto !important; /* Push right side to the end */
  }
  
  /* CENTER THE DROPDOWN MENU */
  .navbar-collapse {
    text-align: center !important;
    width: 100% !important;
    flex-basis: 100% !important;
    order: 4 !important; /* Ensure it comes last */
    margin-top: 15px;
    background: rgba(0,0,0,0.5); /* Optional: slight background for contrast */
    border-radius: 10px;
    padding: 10px;
  }
  
  .navbar-nav {
    align-items: center !important;
  }
}

/* 2. Resize Brand Text */
.brand-text {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

/* 3. Tiny Mobile Login Button */
.navbar .btn-auth {
  /* Box adjustments: Height increased slightly, Width optimized, Margin added */
  padding: 5px 8px !important;
  font-size: 11px !important;
  line-height: normal !important; /* Allow natural height */
  height: auto !important;
  min-height: 0 !important;
  border-width: 1px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 10px !important; /* Space from search icon */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 4. Search Icon Size */
.navbar .fa-search {
  font-size: 1rem !important;
}

/* Extra Small Phones */
@media (max-width: 375px) {
  .brand-text {
    font-size: 0.8rem !important;
  }
  .navbar .container {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  .navbar .btn-auth {
    padding: 3px 6px !important;
    font-size: 10px !important;
  }
}

/* Desktop Styles */
@media (min-width: 992px) {
  .brand-text {
    font-size: 1.5rem;
  }
  .navbar .btn-auth {
    font-size: 0.9rem !important;
    padding: 0.375rem 0.75rem !important;
    border-width: 1px !important;
  }
  .navbar .fa-search {
    font-size: 1.2rem !important;
  }
}

/* ------------------------------------------------------------------------------------------------- */
/* Untuk tampilan game di Homepage */
.playstore-grid {
  display: grid;
  /* Responsif: Mengatur jumlah kolom otomatis berdasarkan lebar layar */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* Card Style */
.playstore-card {
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
  display: flex;
  flex-direction: column;
}

.playstore-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05); /* Efek highlight tipis saat hover */
}

/* 1. Banner Atas (Aspect Ratio 16:9) */
.playstore-card .card-banner {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* Membuat rasio 16:9 yang konsisten */
  background: #0f0f1e;
  border-radius: 12px; /* Round di semua sudut banner */
  overflow: hidden;
}

.playstore-card .card-banner img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Gambar akan di-crop rapi mengisi kotak */
  transition: transform 0.3s ease;
}

/* Efek Hover pada Banner */
.playstore-card:hover .card-banner img {
  transform: scale(1.05);
}

/* Ikon Play di tengah saat hover (Opsional, biar makin kerasa game) */
.playstore-card .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.playstore-card .overlay i {
  font-size: 2rem;
  color: #fff;
  filter: drop-shadow(0 0 10px #00d9ff);
}

.playstore-card:hover .overlay {
  opacity: 1;
}

/* 2. Bagian Bawah (Details) */
.playstore-card .card-details {
  display: flex; /* Layout menyamping */
  padding: 12px 4px 0 4px; /* Spasi dari banner */
  align-items: flex-start;
}

/* Logo Kecil */
.playstore-card .game-logo img {
  width: 50px;
  height: 50px;
  border-radius: 10px; /* Sedikit rounded seperti icon HP */
  object-fit: cover;
  margin-right: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Info Text Wrapper */
.playstore-card .game-info-text {
  flex: 1;
  overflow: hidden; /* Supaya teks panjang kepotong rapi */
}

.playstore-card .game-title {
  font-size: 1rem;
  color: #ffffff;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Menambah titik-titik (...) kalau judul kepanjangan */
  font-weight: 600;
}

.playstore-card .game-meta-row {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: #b8b8d1;
}

.playstore-card .game-price {
  color: #00d9ff; /* Warna Cyan tema kamu */
  font-weight: 500;
  margin-right: 10px;
}

.playstore-card .game-rating {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 3px;
}

.playstore-card .game-rating i {
  color: #ffc107; /* Warna kuning bintang */
  font-size: 0.7rem;
}

/* Container Utama untuk Geser Samping */
.horizontal-scroll-container {
  display: flex; /* Susun menyamping (bukan grid) */
  overflow-x: auto; /* Izinkan scroll ke samping */
  gap: 20px; /* Jarak antar kartu */
  padding: 10px 40px 25px 40px; /* Padding bawah agak besar biar bayangan/shadow tidak kepotong */

  /* Fitur Mewah: Snap Effect (Biar pas digeser berhentinya rapi di kartu) */
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;

  /* Sembunyikan Scrollbar (biar bersih kayak aplikasi native) */
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

/* Sembunyikan Scrollbar untuk Chrome/Safari/Opera */
.horizontal-scroll-container::-webkit-scrollbar {
  display: none;
}

/* Aturan Khusus Kartu di dalam Scroll Container */
.horizontal-scroll-container .playstore-card {
  flex: 0 0 auto; /* PENTING: Jangan biarkan kartu mengecil/tergencet */
  width: 280px; /* Lebar tetap kartu */
  scroll-snap-align: start; /* Titik berhenti snap */
}

/* Untuk ICON DI CAROUSEL */
/* Ikon di dalam Carousel Hero */
.hero-game-icon {
  margin-bottom: 15px; /* Jarak antara ikon dan judul game */
  animation: fadeInDown 1s ease; /* Efek animasi muncul dari atas (opsional) */
}

.hero-game-icon img {
  width: 80px; /* Ukuran ikon */
  height: 80px;
  object-fit: cover;
  border-radius: 18px; /* Lengkungan sudut (squircle style) */
  box-shadow: 0 4px 15px rgba(0, 217, 255, 0.4); /* Efek glowing cyan */
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Penyesuaian Responsif untuk HP */
@media (max-width: 768px) {
  .hero-game-icon img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
  }
}

/* USER TEST: HIDE PORTRAIT CARDS */
.carousel-container .slide .item:nth-child(n+3) { display: none !important; }

/* LATEST UPDATED SECTION - 1:1 ICONS */
.latest-scroll-container {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding: 10px 5px 25px 5px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.latest-scroll-container::-webkit-scrollbar { display: none; }

.latest-game-card {
  flex: 0 0 calc(20% - 16px); /* 5 items per row on desktop */
  text-decoration: none;
  scroll-snap-align: start;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.latest-game-card:hover { transform: translateY(-5px); }

.latest-game-icon {
  width: 100%;
  aspect-ratio: 1/1; /* 1:1 RATIO */
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 10px;
}
.latest-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.latest-game-title {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

@media (max-width: 991px) {
  .latest-game-card { flex: 0 0 calc(25% - 15px); } /* 4 items tablet */
}
@media (max-width: 768px) {
  .latest-game-card { flex: 0 0 calc(33.333% - 14px); } /* 3 items mobile (Requested) */
  .latest-game-icon { border-radius: 14px; }
}


/* FIX MOBILE ICONS CONSISTENCY */
@media (max-width: 768px) {
  .latest-scroll-container {
    gap: 12px;
    padding: 10px 10px 25px 10px;
  }
  .latest-game-card {
    flex: 0 0 calc(33.333% - 8px) !important;
    max-width: calc(33.333% - 8px) !important;
    flex-shrink: 0;
    flex-grow: 0;
  }
  .latest-game-icon {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover;
  }
}

/* POPULAR CATEGORY GRID */
.popular-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .popular-category-grid {
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns on mobile too */
    gap: 10px;
  }
}


/* REMOVE UNDERLINE FOR POPULAR CATEGORY */
.popular-category-header {
  border-bottom: none !important;
  text-decoration: none !important;
}
.popular-category-header::after {
  display: none !important;
  content: none !important;
}


/* FIXES FROM USER FEEDBACK */
.card-banner img {
  display: block !important; /* Fix bottom space */
}

.event-text-box .btn-aqua {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (max-width: 768px) {
  .popular-category-header {
    font-size: 1.1rem !important; /* Smaller font for mobile 1-line */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .popular-category-grid {
    grid-template-columns: 1fr !important; /* 1 column mobile */
    gap: 15px;
  }
  .popular-item {
    width: 100%;
  }
}


/* FINAL UI REFINEMENTS */

/* 1. Fix Image Bottom Space strictly */
.card-banner {
  line-height: 0 !important;
  font-size: 0 !important;
}
.card-banner img {
  display: block !important;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 2. Fix Button Centering */
.event-text-box .btn-aqua {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 20px !important;
}

/* 3. Mobile Header & Spacing Fixes */
@media (max-width: 768px) {
  /* Specific selector for Recommended Header to override inline styles */
  .recommended-header-container {
    padding: 0 15px !important; /* Override the 40px inline padding */
  }
  .recommended-header-container h4 {
    font-size: 1.1rem !important;
    margin-bottom: 0 !important;
  }
  .recommended-header-container a {
    font-size: 0.85rem !important;
    white-space: nowrap;
  }
  
  /* 4. Fix Popular Category Margin */
  .popular-category-header-container {
    margin-bottom: 10px !important; 
  }
}

/* Desktop Margin Fix as well if needed */
.popular-category-header-container {
  margin-bottom: 10px !important;
}

.popular-category-grid {
  margin-top: 0 !important;
}

/* FINAL SPACING FIXES */
.carousel-container {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important; 
}

/* PC Download Section - Mobile Optimization */
.pc-download-container {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  padding: 10px 5px;
  scrollbar-width: none; /* Hide scrollbar Firefox */
}
.pc-download-container::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome */
}

.pc-download-card {
  flex: 0 0 auto;
  width: 200px; /* Desktop width */
  text-decoration: none;
  transition: transform 0.2s;
  display: block;
}
.pc-download-card:hover {
  transform: translateY(-5px);
}

.pc-download-banner {
  width: 100%;
  aspect-ratio: 16/9; /* Banner ratio */
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.pc-download-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .pc-download-container {
    flex-direction: column; /* Vertical stack on mobile */
    overflow-x: visible;
  }
  
  .pc-download-card {
    width: 100%; /* Full width on mobile */
    display: flex; /* Horizontal card layout on mobile */
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05); /* Slight BG for visibility */
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 5px;
  }
  
  .pc-download-banner {
    width: 120px; /* Fixed small banner width */
    height: 68px; /* Maintain approx 16:9 */
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .pc-download-info {
    flex: 1;
    min-width: 0; /* Text truncate fix */
  }

  /* Force only 3 items with this class on mobile */
  .mobile-hidden {
    display: none !important;
  }
}
@media (min-width: 769px) {
  .mobile-hidden {
      display: block !important; /* Show on desktop */
  }
}


/* MOBILE CAROUSEL HEIGHT FIX */
@media (max-width: 768px) {
  .carousel-container {
    height: 280px !important; 
  }
  .content .name {
    font-size: 30px !important;
  }
  .content .des {
    font-size: 0.9rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}


/* FINAL SPACING FIXES v2 */
.landing-section {
  margin-bottom: 20px !important; /* Explicitly controlled spacing */
}


/* FIX: Reduce spacing in Popular Category Section (Balanced) */
.popular-category-section {
  padding: 10px 15px !important; /* Balanced padding */
  margin-bottom: 0 !important;
}

.popular-category-section .section-title {
  margin-bottom: 0 !important;
  line-height: 1.2;
}

.popular-category-section .section-title::after {
  margin-top: 5px !important;
  display: block; /* Restore separator */
}

/* Control the gap via the container (Standard 15px) */
.popular-category-header-container {
  margin-bottom: 15px !important; /* "Not too close, not too far" */
  min-height: auto !important;
}

.popular-category-grid {
  margin-top: 0 !important;
  gap: 15px !important; 
}

/* Mobile specific fixes */
@media (max-width: 768px) {
  .popular-category-section {
    padding: 10px 15px !important;
  }
  
  .popular-category-section .section-title {
    font-size: 1.2rem !important;
    margin-bottom: 0 !important;
  }
  
  .popular-category-header-container {
    margin-bottom: 15px !important;
  }
  
  .popular-category-grid {
    gap: 12px !important; 
  }
}

/* ==================== MODERN DOWNLOAD CONFIGURATION ==================== */
.download-config-modern {
    background: linear-gradient(145deg, rgba(22, 33, 62, 0.9), rgba(15, 15, 35, 0.95));
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 217, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.download-config-modern:hover {
    border-color: rgba(0, 217, 255, 0.6);
    box-shadow: 0 15px 40px rgba(0, 217, 255, 0.15), inset 0 0 20px rgba(0, 217, 255, 0.1);
}

.download-config-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.form-control-modern, .form-select-modern {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    height: 45px !important; /* Uniform Height Fix */
    padding: 0.375rem 0.75rem !important; /* Standardize padding */
    line-height: 1.5;
}

.form-control-modern:focus, .form-select-modern:focus {
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: #00d9ff !important;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.2) !important;
    outline: none;
}

.modern-label {
    color: #00d9ff;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.add-link-btn-modern {
    background: rgba(0, 217, 255, 0.1);
    border: 1px dashed rgba(0, 217, 255, 0.4);
    color: #00d9ff;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.add-link-btn-modern:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: #00d9ff;
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.4);
}

.link-row .remove-link-btn {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff5b5b;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.link-row .remove-link-btn:hover {
    background: #dc3545;
    color: white;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

