/* ===========================
   BAS
=========================== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f5f5;
}

/* ===========================
   HEADER
=========================== */
header {
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #b00000, #ff0000);
  color: white;
  padding: 1rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 20;
}

.hamburger {
  font-size: 28px;
  cursor: pointer;
  color: white;
}

.logo-container {
  flex: 1;
  display: flex;
  justify-content: center;
}

.logo1 {
  font-size: 20px;
  font-weight: bold;
  white-space: nowrap;
}

/* ===========================
   SIDOMENY
=========================== */
nav {
  position: fixed;
  top: 0;
  left: -260px;
  width: 260px;
  height: 100%;
  background: linear-gradient(180deg, #a00000, #d00000);
  padding-top: 80px;
  transition: 0.3s ease;
  z-index: 30;
}

nav.open {
  left: 0;
}

nav a {
  display: block;
  padding: 1rem;
  color: white;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

nav a:hover {
  background: rgba(255,255,255,0.1);
}

/* Overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: none;
  z-index: 25;
}

.menu-overlay.show {
  display: block;
}

/* ===========================
   MAIN
=========================== */
main {
  padding: 80px 1rem 1rem 1rem;
}

/* ===========================
   TIPPA – MOBILFÖRST
=========================== */
.popup {
  background: #fff;
  padding: 12px;
  border-radius: 10px;
  width: 90%;
  max-width: 240px;
  margin: 12px auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Matchnummer */
.circle {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #d00;
  color: #fff;
  text-align: center;
  line-height: 30px;
  font-weight: bold;
  margin-right: 10px;
}

.group-name {
  display: inline-block;
  font-weight: bold;
  color: #333;
  vertical-align: middle;
}

/* Slutspelsbox */
.stage-box {
  background: #fff;
  padding: 10px;
  margin: 15px 0;
  border-radius: 8px;
  border: 1px solid #ccc;
}

/* Rubrik */
.stage-box h3 {
  margin: 0 0 8px 0;
  font-size: 1.05rem;
  text-align: center;
}

/* Grid – kompakt */
.lag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
}

/* En rad: checkbox + namn + odds */
.lag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: #f3f3f3;
  border-radius: 6px;
  border: 1px solid #bbb;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Checkbox mindre */
.lag-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 6px;
}

/* Namn */
.lag-name {
  flex: 1;
  margin-left: 6px;
  font-weight: 600;
}

/* Odds */
.lag-odds {
  font-size: 0.80rem;
  color: #333;
  opacity: 0.9;
  margin-left: 8px;
}

/* Mobiloptimering */
@media (max-width: 600px) {
  .lag-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  .lag-item {
    padding: 6px;
    font-size: 0.9rem;
  }
}




/* Rad med lag + input */
.row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.row-title {
  font-size: 14px;
  font-weight: bold;
  width: 160px;
}

.row-input {
  width: 2.4ch;        /* exakt plats för 2 tecken */
  max-width: 64px;
  padding: 3px;
  font-size: 18px;
  text-align: center;
  height: 32px;
  box-sizing: border-box;
}

/* 1-X-2 knappar */
.btn-group {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.btn-item {
  text-align: center;
}

.btn-label {
  font-size: 14px;
  margin-bottom: 2px;
}

.choice-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #555;
  background: #f0f0f0;
  font-size: 18px;
  cursor: pointer;
}

.choice-btn.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

/* ===========================
   DESKTOP – VÄNSTERSTÄLL RUTOR
=========================== */
@media (min-width: 768px) {

  main {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
  }

  .popup {
    margin: 12px 0;
    width: 260px;
    max-width: 260px;
  }
}

/* ===========================
   POPUP LOGIN / REGISTER
=========================== */
.popup-bg {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 50;
}

.popup-bg.show {
  display: flex;
}

.popup1,
.popup-login {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 300px;
}

.popup input,
.popup button {
  width: 100%;
  padding: 10px;
  margin: 6px 0;
  border-radius: 6px;
}

.popup input {
  border: 1px solid #ccc;
}

.popup button {
  background: #b00000;
  color: white;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

.close-popup {
  text-align: center;
  margin-top: 1rem;
  cursor: pointer;
  color: #b00000;
}

/* ===========================
   FELMEDDELANDEN
=========================== */
.error-box {
  background: #ffdddd;
  border-left: 4px solid #d8000c;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 6px;
  text-align: left;
}

#textarea {
  width: 100%;
  max-width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  padding: 10px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  resize: vertical; /* användaren kan dra i höjd */
}

/* Desktop – bilden är som vanligt */
img {
    display: block;
}

/* Mobilanpassning */
@media (max-width: 600px) {
    img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 600px) {

    /* Behåll vanlig tabell-layout på mobil */
    .score-table {
        display: table;
        width: 100%;
        font-size: 14px;
    }

    .score-table thead {
        display: table-header-group !important;
    }

    .score-table tr {
        display: table-row !important;
    }

    .score-table th,
    .score-table td {
        display: table-cell !important;
        padding: 8px 6px;
        border-bottom: 1px solid #ddd;
    }

    /* Ta bort mobilkort-layouten helt */
    .score-table td::before {
        content: none !important;
    }

    /* Kolumnjusteringar */
    .score-table th:nth-child(1),
    .score-table td[data-label="Pl."] {
        text-align: center;
        width: 40px;
    }

    .score-table th:nth-child(2),
    .score-table td[data-label="Namn"] {
        text-align: left;
    }

    .score-table th:nth-child(3),
    .score-table td[data-label="Poäng"] {
        text-align: right;
        width: 60px;
    }
}


.tab-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tab-buttons button {
    flex: 1;
    padding: 6px 8px;        /* mindre höjd */
    background: #d62828;     /* röd */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;         /* lite mindre text */
    font-weight: bold;
    cursor: pointer;
}

.tab-buttons button:hover {
    background: #b71c1c;
}



.tab-buttons button.active {
    background: #1e88e5 !important;   /* klar blå */
    color: white !important;
    border-color: #1e88e5 !important;
}

.forum-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: 15px 0 20px 0;
}

.forum-nav img {
    width: 22px;
    height: auto;
}

.nav-page {
    font-size: 18px;
    font-weight: bold;
}

.tipsrad {
    background: #f7f7f7;
    padding: 12px;
    margin-bottom: 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.tips-header {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
}

.tips-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 15px;
}

.tips-tecken {
    margin-top: 8px;
    font-size: 15px;
}

.reg-form {
    max-width: 350px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reg-form input {
    padding: 10px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.error-box {
    background: #ffdddd;
    border-left: 4px solid #c00;
    padding: 10px;
    margin-bottom: 20px;
}

.clean-url {
  text-decoration: none;
}


