/* ==== Grundtema ==== */
body {
  font-family: "Segoe UI", sans-serif;
  background: #101010 url('https://wallpapercave.com/wp/wp1886399.jpg') no-repeat center center fixed;
  background-size: cover;
  color: #f0f0f0;
  margin: 0;
  padding: 0;
  transition: background 0.3s, color 0.3s;
}

/* ==== Header ==== */
header {
  background: rgba(0, 0, 0, 0.7);
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #e74c3c;
}

header p {
  font-size: 1.2rem;
  color: #ccc;
}

#themeToggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #e74c3c;
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

#themeToggle:hover {
  background: #c0392b;
}

/* ==== Navigering ==== */
nav {
  display: flex;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  gap: 1rem;
  padding: 0.5rem;
}

nav button {
  background: none;
  border: none;
  color: #f0f0f0;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 8px;
  transition: 0.2s;
}

nav button:hover,
nav button.active {
  background: #e74c3c;
}

/* ==== Innehåll ==== */
main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 12px;
}

.server-info {
  text-align: center;
  margin-bottom: 2rem;
}

.connect-btn {
  display: inline-block;
  background: #e74c3c;
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.2s;
}

.connect-btn:hover {
  background: #c0392b;
}

#serverStatus {
  margin-bottom: 1rem;
  font-weight: bold;
}

/* ==== Mods ==== */
.mod-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.mod-card {
  background: rgba(255, 255, 255, 0.08);
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  transition: 0.2s;
}

.mod-card:hover {
  background: rgba(255, 255, 255, 0.15);
}

.mod-card img {
  width: 100%;
  border-radius: 8px;
}

.mod-card a {
  color: #e74c3c;
  text-decoration: none;
  font-weight: bold;
}

.mod-card a:hover {
  text-decoration: underline;
}

/* ==== Regler ==== */
ul.rules {
  list-style: none;
  padding: 0;
}

ul.rules li {
  background: rgba(255,255,255,0.1);
  margin: 0.5rem 0;
  padding: 0.7rem;
  border-radius: 6px;
}

/* ==== Footer ==== */
footer {
  text-align: center;
  padding: 1rem;
  color: #aaa;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.5);
  margin-top: 2rem;
}

/* ==== Flikarna ==== */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

/* ==== Ljust tema ==== */
body.light {
  background: #f5f5f5;
  color: #222;
}

body.light header {
  background: rgba(255,255,255,0.8);
}

body.light nav {
  background: rgba(255,255,255,0.9);
}

body.light nav button {
  color: #222;
}

body.light nav button.active {
  background: #e74c3c;
  color: white;
}

body.light .mod-card {
  background: rgba(0,0,0,0.05);
}

body.light footer {
  background: rgba(255,255,255,0.8);
  color: #555;
}
/* === Modkategorier === */
.mod-category {
  margin-bottom: 2rem;
}

.mod-category h3 {
  color: #e74c3c;
  border-bottom: 2px solid #e74c3c;
  padding-bottom: 0.3rem;
  margin-bottom: 1rem;
}

.mod-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mod-item {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.7rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.mod-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

body.light-theme .mod-item {
  background: rgba(255, 255, 255, 0.7);
}

.mod-info {
  margin-top: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 0.8rem;
  animation: expand 0.25s ease-in-out;
}

.mod-info img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.mod-info a {
  color: #e74c3c;
  font-weight: bold;
  text-decoration: none;
}

.mod-info a:hover {
  text-decoration: underline;
}

@keyframes expand {
  from { opacity: 0; transform: scaleY(0.9); }
  to { opacity: 1; transform: scaleY(1); }
}
