/* ===== General Styles ===== */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #0b0b0b, #1c1c1c); /* subtle gradient */
  color: #f0f0f0;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

header {
  position: relative;
  height: 100vh;
  background: url("pic2.jpg") center/cover no-repeat;
  overflow: hidden;
}

.hero {
  position: absolute;
  bottom: 20%;
  left: 10%;
  color: white;
  text-shadow: 0 0 15px red, 0 0 30px red;
}

.logo {
  color: #ff0000;
  font-weight: 800;
  font-size: 1.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 30px;
  background-color: rgba(17, 17, 17, 0.95);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: background 0.3s;
}

.navbar:hover {
  background-color: rgba(17, 17, 17, 1);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin: 0 12px;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background-color: #ff0000;
  left: 0;
  bottom: -3px;
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.section {
  padding: 100px 50px;
  text-align: center;
  background: #121212;
}

.section h2 {
  color: #ff0000;
  margin-bottom: 50px;
  letter-spacing: 1px;
  font-size: 2.2rem;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
}

.card {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 15px;
  transition: transform 0.4s, box-shadow 0.4s;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 20px #ff0000, 0 0 40px rgba(255, 0, 0, 0.5);
}

.card img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transition: transform 0.3s;
}

.card img:hover {
  transform: scale(1.05);
}

footer {
  background: #000;
  text-align: center;
  padding: 20px;
  position: relative;
  font-size: 0.9rem;
  color: #bbb;
}

#scrollTop {
  position: absolute;
  right: 30px;
  bottom: 20px;
  padding: 12px 16px;
  border: none;
  background: #ff0000;
  color: white;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 15px rgba(255,0,0,0.5);
}

#scrollTop:hover {
  background: #d40000;
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(255,0,0,0.8);
}

/* ===== Scroll Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

table {
  margin: 0 auto;
  border-collapse: collapse;
  width: 80%;
  color: white;
  border: 1px solid #ff0000;
  box-shadow: 0 0 15px rgba(255,0,0,0.5);
}

th, td {
  border: 1px solid #ff0000;
  padding: 12px;
  transition: background 0.3s;
}

th {
  background-color: #222;
  color: #ff0000;
}

td:hover {
  background-color: rgba(255, 0, 0, 0.1);
}

/* ===== Engine Sound Button Style ===== */
#engineButton {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #ff0000;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 1000;
}

#engineButton:hover {
  transform: scale(1.15);
  box-shadow: 0 0 35px rgba(255, 0, 0, 0.8);
}

/* ===== Preloader ===== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: white;
  font-family: 'Poppins', sans-serif;
  transition: opacity 0.8s ease;
  overflow: hidden;
}

.lights {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.light {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: rgb(50, 0, 0);
  opacity: 0.3;
  box-shadow: 0 0 10px red;
}

#preloader-text {
  opacity: 0;
  font-size: 1.2rem;
  letter-spacing: 1px;
  transition: opacity 0.5s ease;
}

.green {
  background-color: #00ff00 !important;
  box-shadow: 0 0 25px #00ff00;
}

/* ===== Quiz ===== */
#quiz-container {
  background-color: #111;
  color: white;
  padding: 25px;
  border-radius: 12px;
  max-width: 600px;
  margin: 30px auto;
  text-align: center;
  box-shadow: 0 0 15px rgba(255,0,0,0.5);
}

#quiz-container button {
  padding: 12px 22px;
  margin: 12px;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  background-color: #e10600;
  color: white;
  font-size: 1rem;
  transition: 0.3s;
}

#quiz-container button:hover {
  background-color: #ff4d4d;
  transform: scale(1.05);
}

.option-btn {
  display: block;
  width: 100%;
  margin: 10px 0;
  background-color: #222;
  color: white;
  border-radius: 8px;
  transition: background 0.3s, transform 0.3s;
}

.option-btn:hover {
  background-color: #333;
  transform: scale(1.02);
}

/* ===== Table Hover Effect ===== */
table tr {
  transition: background 0.3s, transform 0.2s;
}

table tr:hover {
  background-color: rgba(255, 0, 0, 0.2); /* subtle red glow */
  transform: scale(1.01); /* slight zoom for depth */
}

table th, table td {
  transition: background 0.3s, color 0.3s;
}

table th:hover {
  background-color: rgba(255, 0, 0, 0.3); /* optional hover for headers */
  cursor: default;
}
