
/* =======================
   Reset i ogólne
======================= */
body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background-color: #fff;
}

/* Główna zawartość – otoczka z marginesami */
.container {
    max-width: 1600px;
	width:100%;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
}

.form-group {
    margin-bottom: 16px;
}

/* =======================
   Logo i menu główne
======================= */
.menu-wrapper img {
    max-width: 100%;
    height: 80px;
}


/* przywitanie usera w menu  */
.menu-greeting {
    text-align: center;
    margin-bottom: 3px;	
    background-color: #f4f4f4;
    padding: 10px;
    margin: 10px auto;
    text-align: center;
    border-left: 4px solid #444;
    font-size: 16px;
}
@media (max-width: 768px) {
    .menu-greeting {
        font-size: 10px;
		padding: 5px;
    }
}




.menu-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin: 5px;
}

.menu-logo {
	text-align: center;

}


.menu-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.menu-item img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border: 2px solid #000;
    border-radius: 4px;
    padding: 3px;
    background-color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.menu-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    cursor: pointer;
}

/* Kolorowe sekcje menu */
.row-news  { background-color: #f6f6f6; padding: 10px; border-radius: 10px; }
.row-main  { background-color: #eef;    padding: 10px; border-radius: 10px; }
.row-user  { background-color: #efe;    padding: 10px; border-radius: 10px; }
.row-quiz  { background-color: #FFFACD;    padding: 10px; border-radius: 10px; }
.row-admin { background-color: #fee;    padding: 10px; border-radius: 10px; }
.row-auth  { background-color: #f9f9f9; padding: 10px; border-radius: 10px; }



/* Akordeon */
.accordion-header {
    display: none; /* domyślnie tylko na mobile */
    color: #333;
    padding: 10px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 10px;
}


@media (max-width: 600px) {
    .menu-container {
        display: block; /* <-- to najważniejsze */
        margin: 5px;
    }
	


    .accordion-header {
        display: block;
        color: #333;
        padding: 10px;
        font-weight: bold;
        cursor: pointer;
        border-radius: 5px;
		font-size: 10px;
        margin-top: 2px;
    }

    .menu-row {
        display: none;
        padding: 10px;
    }

    .menu-row.active {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 10px;
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .menu-item {
        display: block;
        margin: 0 auto;
        text-align: center;
    }

    .menu-item img {
        width: 50px;
        height: 50px;
    }
	
	.menu-logo {
    height: 40px;
	text-align: center;

	}
	
	.menu-wrapper img {
    max-width: 100%;
    height: 40px;
	}
	
}


/* =======================
   Formularze i pola
======================= */
button,
input[type="submit"],
input[type="button"] {
    padding: 10px 16px;
    font-size: 16px;
    border: 2px solid #000;
    border-radius: 6px;
    background-color: #eee;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background-color: #ddd;
    transform: scale(1.02);
}

button:active,
input[type="submit"]:active,
input[type="button"]:active {
    transform: scale(0.98);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    max-width: 400px;
    padding: 10px 14px;
    font-size: 16px;
    border: 2px solid #000;
    border-radius: 6px;
    box-sizing: border-box;
    margin-bottom: 10px;
    background-color: #fff;
    transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #666;
    outline: none;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
}

/* =======================
   Tabela rankingowa
======================= */
.table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-width: 90%;
    max-height: 40vh;
    background-color: white;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
    width: auto;
    min-width: 600px;
}

td {
    white-space: normal;
    word-wrap: break-word;
}

th, td {
    padding: 8px;
    border: 1px solid #ccc;
	max-width:200px;
    text-align: center;
    white-space: wrap;
    word-break: normal;
    height: 36px;
    line-height: 36px;
}

thead th {
    position: sticky;
    top: 0;
    background-color: #f0f0f0;
    z-index: 3;
}

.sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: inherit;
	
}

thead .sticky-col {
    z-index: 4;
    background-color: #f0f0f0;
}

.ranking-table {
    font-size: 12px;
}

.ranking-table-typer {
    font-size: 12px;
}

.table-wrapper-typer {
    overflow-x: auto;
    max-width: 100%;
	margin: 0 auto;
}

.table-wrapper-news {
    overflow-x: auto;
    max-width: 100%;
	margin: 0 auto;
}

.table-wrapper-news table {
    width: auto;
    min-width: 400px;
    border-collapse: collapse;
	margin: 0 auto;
}

.table-wrapper-news th, .table-wrapper-news td {
    padding: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    text-align: center;
}

@media (max-width: 600px) {
  .table-wrapper-news {
      overflow-x: visible;
      max-width: 90%;
      margin: 0 auto;
  }

  .table-wrapper-news table {
      width: 90%;
      min-width: unset;
      font-size: 12px;
      margin: 0 auto;
  }
	.table-wrapper-typer {
		overflow-x: auto;
		max-width: 100%;
		margin: 0 auto;
	}
  .ranking-table-typer {
      font-size: 10px;
      width: auto;
      min-width: unset;
	  border-collapse: collapse;
  }	
  
    .ranking-table-typer th, .ranking-table-typer td {
    padding: 2px;
    line-height: 1.2;
	min-width: 45px;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
  }
  


  /* Zwęż inputy w kolumnie „Twój typ” */
  .ranking-table-typer input[type="number"] {
      width: 40px;
      padding: 2px;
      font-size: 10px;
  }

  /* Sticky kolumna (nazwa gry) — ograniczenie szerokości */
  .ranking-table-typer .sticky-col {
      min-width: 120px;
      max-width: 120px;
  }
  
  .table-wrapper-news table:not(.ranking-table-typer) th,
  .table-wrapper-news table:not(.ranking-table-typer) td {
      padding: 2px 2px;
      line-height: 1.2;
      max-width: 80px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
  }
}

/* =======================
   Linki
======================= */
a {
    color: #0044cc;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 68, 204, 0.4);
    transition: color 0.2s, border-color 0.2s;
}

a:hover,
a:focus {
    color: #002b80;
    border-bottom-color: #002b80;
    text-decoration: none;
}

a:visited {
    color: #0044cc;
    border-bottom-color: #663399;
}



/* =======================
   Guessthescore
======================= */

.attempt-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
    justify-content: flex-start;
}

.attempt-box {
    width: 50px;
    height: 60px;
    border-radius: 8px;
    background-color: #1f2937;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    color: #fff;
    line-height: 1.1;
}




/* zielona strzałka */
.attempt-box .arrow {
    color: #22c55e; /* zielona strzałka */
    font-size: 22px;
}

.attempt-box .value {
    font-size: 12px;
    color: #e5e7eb;
    margin-top: 2px;
}

.attempt-low {
    background-color: #b91c1c; /* czerwony */
}

.attempt-high {
    background-color: #b91c1c; /* czerwony */
}

.attempt-correct {
    background-color: #059669; /* zielony */
}

.attempt-close {
    background-color: #d97706; /* pomarańczowy */
}


.rules {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    line-height: 1.7;
    font-size: 1.1em;
}

.rules h1 {
    font-size: 1.6em;
    margin-bottom: 20px;
    text-align: center;
}

.rules ol {
    padding-left: 20px;
}

.rules li {
    margin-bottom: 16px;
}

/* podział kolumn na głównej  */
.homepage-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.left-column, .right-column {
    flex: 1 1 300px;
    min-width: 280px;
}

.left-column {
    max-width: 400px;
}

@media (max-width: 768px) {
    .homepage-columns {
        flex-direction: column;
    }
}



.sticky-news {
    background-color: #fff4d2;
    border: 1px solid #e0c471;
    padding: 10px;
    margin: 20px auto;
    max-width: 700px;
    font-size: 16px;
    border-radius: 8px;
}

.activity-log {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

.activity-user-link {
    color: black;
    text-decoration: none;
    font-weight: bold;
}

.activity-user-link:hover {
    text-decoration: underline;
	color: black;
}

.activity-item {
    border-bottom: 1px solid #ccc;
    padding: 8px 0;
}

.demo-info-box {
    background-color: #f1f1f1;
    border: 2px dashed #888;
    padding: 16px;
    margin-top: 20px;
    font-size: 16px;
    max-width: 500px;
    border-radius: 8px;
}

.demo-info-box ul {
    padding-left: 20px;
    margin: 10px 0;
}

.demo-info-box li {
    margin-bottom: 6px;
}

.demo-btn {
    display: inline-block;
    margin: 8px 10px 0 0;
    padding: 10px 16px;
    background-color: white;
    color: black;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 15px;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    white-space: nowrap;
    vertical-align: middle;
}

.demo-btn:hover {
    background-color: #004799;
    text-decoration: none;
}

/* achievementy */
.achievement-card.locked img {
  filter: grayscale(100%) brightness(80%);
  opacity: 0.6;
}


/* === USER PROFILE GRID LAYOUT === */
.profile-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;

}

.profile-left,
.profile-right {
    flex: 1;
    min-width: 300px;
}

.profile-left {
    max-width: 600px;
}

.profile-right {
    max-width: 600px;
}

.chart-wrapper {
    max-width: 600px;
    margin: 30px auto;
}

/* Avatar and info styling */
.profile-avatar {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
}

.profile-info h2 {
    margin-top: 0;
}

/* Achievements na profilach */
.profile-achievements img {
    margin: 5px;
    width: 50px;
    height: 50px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .profile-grid {
        flex-direction: column;
    }
}

/* === swipethescore === */
.swipe-wrapper {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.swipe-track {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
}

/* Karty gry – ogólnie */
.game-card {
  border: 3px solid #ccc;
  border-radius: 12px;
  padding: 10px;
  background-color: #111;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  width: 140px;
  flex-shrink: 0;
}

.game-card:hover {
  transform: scale(1.05);
  border-color: #00cc88;
}

.game-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.game-title {
  font-size: 18px;
  margin-top: 8px;
  color: #fff;
}

/* MOBILE: zamieniamy wrap na poziomy scroll */
@media (max-width: 768px) {
  .swipe-wrapper {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .swipe-track {
    flex-wrap: nowrap;
    width: 100%;
    padding: 0 0 0 10px;
  }

  .game-card {
    flex: 0 0 calc(40vw - 40px);
    max-width: calc(40vw - 40px);
    scroll-snap-align: start;
    margin-right: 10px;
  }
}
