/* Root variables for consistent theming */
:root {
  --bg-color: #0a0a0a;
  --text-color: #eaeaea;
  --accent-red: #e50914;
  --accent-dark: #1c1c1c;
  --card-bg: #121212;
  --border: #2c2c2c;
}

/* Base styles */
body {
  margin: 0;
  background-color: var(--bg-color);
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}

/* Header styles */
header {
  background: linear-gradient(to right, #1c1c1c, #0a0a0a);
  padding: 2rem 3rem;
  text-align: center;
  border-bottom: 2px solid var(--accent-red);
}

header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 3rem;
  color: var(--accent-red);
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.2rem;
  color: #aaa;
}

/* Navigation bar */
nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.25rem;
}

nav a:hover {
  border-bottom: 2px solid var(--accent-red);
}

/* Feature section */
#features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

#features h2 {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 1.5rem;
}

#features .card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.2);
}

/* General section layout */
.section {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.section h2 {
  color: var(--accent-red);
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Card component */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.2);
}

.card h3 {
  margin-top: 0;
  color: var(--accent-red);
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--accent-dark);
  color: #888;
  font-size: 0.9rem;
  margin-top: 4rem;
}

/* Badge styling */
.badge {
  display: inline-block;
  background: var(--accent-red);
  color: white;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  border-radius: 5px;
  margin-left: 0.5rem;
}

/* Device grid section */
.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.device-card {
  background: #1c1c1c;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.2);
  text-align: center;
}

/* Ensure consistent image sizing and prevent cropping */
.device-card img {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.device-card h3 {
  font-family: 'Orbitron', sans-serif;
  color: #e50914;
  margin-bottom: 0.5rem;
}

.device-card p {
  font-family: 'Roboto', sans-serif;
  color: #ccc;
  font-size: 0.95rem;
}

/* Responsive design adjustments */
@media (max-width: 768px) {
  header {
    padding: 1.5rem 1rem;
  }

  header h1 {
    font-size: 2.2rem;
  }

  header p {
    font-size: 1rem;
    padding: 0 0.5rem;
  }

  nav {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .section {
    padding: 0 1rem;
  }

  #features {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .card {
    padding: 1rem;
  }

  .section h2 {
    font-size: 1.6rem;
    text-align: center;
  }

  .card h3 {
    font-size: 1.2rem;
  }

  .footer {
    font-size: 0.8rem;
    padding: 1.5rem 1rem;
  }

  .badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }

  a.button,
  a[href^="https://github"] {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .device-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}