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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #fff;
  background: linear-gradient(to bottom right, #0d0d0d, #1a1a2e, #16213e);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.6);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-left .site-title {
  font-size: 1.5rem;
  color: #ff4c29;
  text-shadow: 0 0 10px rgba(255, 76, 41, 0.7);
  margin: 0;
}

.logo {
  height: 50px;
  vertical-align: middle;
  margin-right: 10px;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

nav a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: #ff4c29;
}

/* Footer */
footer {
  text-align: center;
  padding: 15px;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.6);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 25px;
  font-size: 0.9rem;
  font-weight: bold;
  border: none;
  border-radius: 30px;
  background: #ff4c29;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, background 0.3s;
}

.btn:hover {
  background: #ff6347;
  transform: scale(1.05);
}

/* Hero */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 20px 50px;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #ff4c29;
  text-shadow: 0 0 10px rgba(255, 76, 41, 0.7);
}

.hero p {
  font-size: 1rem;
  max-width: 90%;
  margin-bottom: 25px;
  line-height: 1.5;
}

/* Game Cards Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.game-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 76, 41, 0.2);
  border-color: rgba(255, 76, 41, 0.4);
}

.game-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.game-card .card-body {
  padding: 20px;
}

.game-card h3 {
  font-size: 1.3rem;
  color: #ff4c29;
  margin-bottom: 8px;
}

.game-card p {
  font-size: 0.9rem;
  color: #ccc;
  line-height: 1.5;
  margin-bottom: 15px;
}

.game-card .tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 5px;
}

.tag.browser {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.4);
}

.tag.server {
  background: rgba(33, 150, 243, 0.2);
  color: #2196f3;
  border: 1px solid rgba(33, 150, 243, 0.4);
}

.tag.multiplayer {
  background: rgba(255, 152, 0, 0.2);
  color: #ff9800;
  border: 1px solid rgba(255, 152, 0, 0.4);
}

.tag.wip {
  background: rgba(255, 76, 41, 0.2);
  color: #ff4c29;
  border: 1px solid rgba(255, 76, 41, 0.4);
}

/* Container */
.container {
  flex: 1;
  padding: 120px 20px 50px;
}

.container h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: #ff4c29;
  text-shadow: 0 0 10px rgba(255, 76, 41, 0.7);
  text-align: center;
}

/* Server Games Table */
.server-games {
  max-width: 1000px;
  margin: 40px auto 0;
}

.server-games h3 {
  font-size: 1.3rem;
  color: #ff4c29;
  margin-bottom: 15px;
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
}

th, td {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.9rem;
}

th {
  background: rgba(0, 0, 0, 0.8);
  color: #ff4c29;
  text-transform: uppercase;
  font-size: 0.8rem;
}

td img {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
}

tr:hover {
  background: rgba(255, 76, 41, 0.15);
  transition: background 0.3s;
}

/* Instructions dropdown */
.instructions {
  display: none;
  background: rgba(0, 0, 0, 0.4);
  padding: 15px;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.6;
}

.instructions ul {
  margin: 0;
  padding-left: 20px;
}

.dropdown-row td {
  border-top: none;
  text-align: left;
  padding: 0;
}

tr.active + .dropdown-row .instructions {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

tr.clickable {
  cursor: pointer;
}

/* Typewriter */
#typewriter {
  font-family: monospace;
  font-size: 14px;
  border-right: 2px solid #ff4c29;
  white-space: pre-wrap;
  overflow: hidden;
  padding-right: 5px;
}

/* Responsive */
@media screen and (min-width: 768px) {
  th, td {
    padding: 15px;
    font-size: 1rem;
  }

  td img {
    width: 60px;
    height: 60px;
  }
}

@media screen and (max-width: 600px) {
  .games-grid {
    grid-template-columns: 1fr;
  }

  header {
    padding: 10px 15px;
  }

  .header-left .site-title {
    font-size: 1.2rem;
  }

  nav ul {
    gap: 10px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
