:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --link-color: #000000;
  --border-color: #000000;
  --accent-bg: #e0e2db;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

a {
  color: var(--link-color);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

main {
  max-width: 600px;
  margin: 0 auto 100px auto;
}

h1 {
  text-align: center;
}

.zaznam {
  border: 1px solid var(--border-color);
  padding: 1em .5em;
  border-radius: 5px;
  margin-top: 1em;
}
.zaznam td {
  padding: 0 0.5em;
}

.accordion {
  cursor: pointer;
}

.hrac div {
  width: 25%;
  display: inline-block;
}
.hrac {
  padding: 3px 0;
}
.hrac:nth-child(2n) {
  background-color: var(--accent-bg);
}

.historia tr:nth-child(2n) {
  background-color: var(--accent-bg);
}

button {
  background-color: var(--accent-bg);
  color: var(--text-color);
  cursor: pointer;
  line-height: 1;
  text-align: center;
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.1s ease-in-out;
}

input[type], select {
  width: 100%;
  padding: 8px 2px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
}

.riadok {
  display: flex;
  display: -webkit-flex;
}
.riadok > div {
  margin: 6px;
}
.col1 { flex: 1; }
.col2 { flex: 2; }
.col3 { flex: 3; }

th {
  position: sticky;
  top: 0;
}

@media (max-width: 600px) {
  .riadok {
    flex-direction: column;
  }
}

.switch-field {
  display: flex;
  overflow: hidden;
}
.switch-field input {
  position: absolute !important;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  width: 1px;
  border: 0;
  overflow: hidden;
}
.switch-field label {
  background-color: var(--accent-bg);
  line-height: 1;
  text-align: center;
  padding: 8px 16px;
  margin-right: -1px;
  border: 1px solid var(--border-color);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.1s ease-in-out;
}
.switch-field label:hover {
  cursor: pointer;
}
.switch-field input:checked + label.yes {
  background-color: #00a86b;
}
.switch-field input:checked + label.no {
  background-color: #a8201a;
}
.switch-field label:first-of-type {
  border-radius: 5px 0 0 5px;
}
.switch-field label:last-of-type {
  border-radius: 0 5px 5px 0;
}

#transFrame {
  position: fixed;
  top: 0;
  right: 0;
  border: none;
  border-radius: 5px;
  width: 100%;
  max-width: 20em;
  height: 3em;
}


/* Tmavý režim – automaticky podľa systému */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --link-color: #e0e0e0;
    --border-color: #444;
    --accent-bg: #303030;
  }
}

/* Manuálne prepnutie cez triedu */
/* Svetlý režim */
body.light-mode {
  --bg-color: #ffffff;
  --text-color: #000000;
  --link-color: #000000;
  --border-color: #000000;
  --accent-bg: #e0e2db;
}

/* Tmavý režim */
body.dark-mode {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --link-color: #e0e0e0;
  --border-color: #444;
  --accent-bg: #303030;
}

/* profilový obrázok */
.poradie {
  display: inline-block;
  min-width: 2em;   /* nastavíš podľa potreby */
  text-align: right;
}

.profile-pic {
    display: inline-block;
    width: 1em;
    height: 1em;
    position: relative;
}

.profile-pic .thumb {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    background-color:white;
}

.reg {
  position: absolute;
  top: -.5em;
  right: -.6em;
  color: green;
  font-size: 0.6em;
  font-weight: bold;
}


/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0; /* skrátený zápis left:0; top:0; right:0; bottom:0 */
    background: rgba(0,0,0,0.8);
    text-align: center;
}

.lightbox .lightbox-img {
    max-width: min(90vw, 500px);
    max-height: min(90vh, 500px);
    width: auto;
    height: auto;
    margin-top: 5%;
    border-radius: 8px; 
    background-color: white;
}

.lightbox .close {
    position: absolute;
    top: 20px; right: 30px;
    color: #fff;
    font-size: 2em;
    cursor: pointer;
}

#offline-warning {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  color: #fff;
  background: linear-gradient(90deg, #d32f2f, #c62828); /* červený gradient */
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  border-top: 3px solid #ffeb3b; /* žltý akcent */
  transition: all 0.3s ease;
}