/* Comments Wrapper Styling (from build.html) */
.comments-wrapper {
  margin: 20px auto;
  padding: 15px 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  font-family: Arial, sans-serif;
}

.comments-wrapper h4 {
  margin-bottom: 15px;
  color: #333;
  font-weight: 600;
  font-size: 1.5rem;
  border-bottom: 2px solid #4CAF50;
  padding-bottom: 5px;
}
body {
  background-color: #e6f0f7;
  font-family: "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.alert-warning {
  margin-top: 1rem;
  font-weight: 500;
  border-left: 6px solid #ffc107;
  background-color: #fff8e1;
}

.alert-danger {
  margin-top: 1rem;
}

.post-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 1rem;
}

/* Images in post content - full width only on mobile */
@media (max-width: 1024px) {
  .post-content img[style] {
    width: 100% !important;
  }
}

.featured-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 8px;
  overflow: hidden;
}

.badge {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 5px 10px;
}

.text-dark {
  text-decoration: none;
}



.social-icons {
  padding-bottom: 10px;
}

.social-icons a {
  color: #f8f9fa;
  font-size: 1.5rem;
  margin: 0 10px;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  color: #007bff;
  transform: scale(1.2);
}

.page-content {
  flex: 1;
  margin-top: 16px;
}

.style-h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #d4af37; /* Rich gold */
  background-color: #ffffff;
  padding: 10px 20px;
  display: inline-block;
  border-radius: 6px;

  text-shadow:
    1px 1px 0 #000,
    2px 2px 4px rgba(0, 0, 0, 0.3);

  position: relative;
  margin-bottom: 20px;
  border-bottom: 3px solid #d4af37;

  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.style-h1:hover {
  transform: scale(1.03);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.post-card-upgraded {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.post-card-upgraded:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.post-image-container {
  height: 200px;
  overflow: hidden;
}

.post-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.post-card-upgraded:hover .post-image {
  transform: scale(1.08);
}

.post-content {
  background: rgba(255, 255, 255, 0.85);
}

.post-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1f1f1f;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.post-link:hover .post-title {
  color: #4caf50;
}

.post-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  background: #e8f5e9;
  padding: 5px 10px;
  border-radius: 50px;
}

.edit-btn {
  font-size: 0.75rem;
  background: #ffe0b2;
  color: #bf360c;
  padding: 5px 10px;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.edit-btn:hover {
  background: #ffcc80;
}

.post-excerpt {
  font-size: 0.9rem;
  color: #333;
  line-height: 1.5;
}

.glass-nav {
  background: rgba(25, 40, 30, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 1050;
  transition: background-color 0.3s ease;
}

.navbar-brand {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 2px;
  color: #e0f2f1;
  text-shadow: 0 0 8px #4caf50;
  white-space: nowrap;
}

.navbar-brand:hover {
  color: #81c784;
  text-shadow: 0 0 12px #81c784;
}

.navbar-nav .nav-link {
  font-weight: 600;
  color: #c8e6c9;
  padding: 8px 12px;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: #a5d6a7;
  text-decoration: underline;
}

.play-game-link {
  font-weight: 800;
  color: #66bb6a !important;
  border: 2px solid #66bb6a;
  padding: 6px 14px;
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.play-game-link:hover {
  background-color: #66bb6a;
  color: #1b262c !important;
  text-decoration: none;
  box-shadow: 0 0 15px #66bb6a;
}

.btn-success {
  background-color: #4caf50;
  border-color: #4caf50;
  color: white;
  font-weight: 600;
}

.btn-success:hover {
  background-color: #388e3c;
  border-color: #2e7d32;
  color: white;
}

.btn-outline-light {
  border-color: #81c784;
  color: #81c784;
}

.btn-outline-light:hover {
  background-color: #81c784;
  color: #1b262c;
}

.navbar-toggler {
  border-color: #81c784;
}

.navbar-toggler-icon {
  filter: invert(1);
}

/* Responsive tweaks */
@media (max-width: 991.98px) {
  .container {
    flex-wrap: wrap !important;
  }
  
  .navbar-collapse {
    width: 100%;
    margin-top: 10px;
  }

  .navbar-nav {
    justify-content: center !important;
  }

  .d-flex.align-items-center.gap-2 {
    margin-top: 10px;
    width: 100%;
    justify-content: center !important;
  }
}



/* Style for game */
.game-container {
  display: flex;
  justify-content: center;
}

#game {
  position: relative;
  margin: 20px 0;
  width: 300px;
  height: 500px;
  background: #555;
  overflow: hidden;
  border: 3px solid #aaa;
  border-radius: 10px;
  font-size: 0;
}
.road-line {
  position: absolute;
  width: 6px;
  height: 30px;
  background: white;
  border-radius: 3px;
  user-select: none;
}
.road-line.lane1 {
  left: 100px;
}
.road-line.lane2 {
  left: 190px;
}

.car {
  position: absolute;
  bottom: 30px;
  width: 50px;
  height: 80px;
  background: linear-gradient(135deg, #ff4d4d 0%, #b30000 100%);
  border-radius: 15px 15px 12px 12px;
  text-align: center;
  font-size: 48px;
  line-height: 80px;
  color: white;
  transition: left 0.1s ease;
  box-shadow: 0 0 10px #ff4d4d, inset 0 0 20px #ff9999;
  user-select: none;
  filter: drop-shadow(0 0 4px #ff0000);
}

.enemy {
  position: absolute;
  width: 50px;
  height: 80px;
  background: linear-gradient(135deg, #444 0%, #111 100%);
  border-radius: 12px;
  text-align: center;
  font-size: 48px;
  line-height: 80px;
  color: #ccc;
  user-select: none;
  box-shadow: 0 0 10px #666 inset;
}

#game::before,
#game::after {
  content: "|";
  position: absolute;
  top: 0;
  width: 10px;
  font-size: 40px;
  color: white;
  user-select: none;
  pointer-events: none;
}
#game::before {
  left: 0;
}
#game::after {
  right: 0;
}

#controlBtn {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 28px;
  font-size: 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: #4caf50;
  color: white;
  box-shadow: 0 4px #357a38;
  transition: background 0.3s ease;
  user-select: none;
  z-index: 100;
}
#controlBtn:hover {
  background: #45a049;
}

#gameOver {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  color: #f00;
  font-weight: bold;
  text-shadow: 1px 1px 3px black;
  display: none;
  user-select: none;
  z-index: 90;
}

#muteBtn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #333;
  color: white;
  border: none;
  font-size: 22px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 100;
}

/* Score container */
#scoreContainer {
  width: 100px;
  height: 180px;
  background: #444;
  border-radius: 10px;
  border: 3px solid #aaa;
  box-shadow: 0 0 10px #4caf50 inset;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #4caf50;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 15px;
}
#scoreContainer h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  user-select: none;
}
#score {
  font-size: 48px;
  font-weight: bold;
  user-select: none;
}
