:root {
  --pozadie: #121212;
  --info: #000000;
  --text: #ffffff;
  --podtext: #b0b3b8;
  --okraje: #333333;
  --akcent: #1a73e8;
}

[data-theme="light"] {
  --pozadie: #f0f2f5;
  --info: #ffffff;
  --text: #1a1a1a;
  --podtext: #65676b;
  --okraje: #eeeeee;
}

* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
  font-family: 'Roboto', sans-serif; 
}

body { 
  background-color: var(--pozadie); 
  color: var(--text); 
  transition: 0.3s; 
}

.main-container { 
  width: 100%; 
  max-width: 1100px; 
  margin: 0 auto;
}

.sekcia-profil {
  display: flex;
  flex-direction: column;
  height: auto; 
  width: 100%;
  overflow: hidden;
}

.header-image { 
  position: relative; 
  width: 100%; 
  aspect-ratio: 3 / 5;
  flex-shrink: 0;
  overflow: hidden;
}

.header-image img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  object-position: center 20%;
}

.name-overlay {
  position: absolute; 
  bottom: 0; 
  left: 0; 
  right: 0;
  padding: 40px 20px 30px;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  text-align: center;
}

.name-overlay h2 { 
  font-weight: 700; 
  font-size: 22px; 
  color: #ffffff; 
}

.kontajnerik { 
  background-color: var(--info); 
  border-radius: 12px; 
  position: relative; 
  z-index: 5; 
  overflow: hidden; 
}

.profil-karta { 
  margin: 0;
  flex-shrink: 0;
  border-radius: 0;
}

.info { 
  display: flex; 
  justify-content: space-around; 
  padding: 15px 10px; 
}

.infocast { 
  text-align: center; 
}

.infofunkcia { 
  display: block; 
  font-weight: 700; 
  color: var(--akcent); 
  font-size: 20px; 
}

.infofunkcia1 { 
  font-size: 10px; 
  color: var(--podtext); 
  text-transform: uppercase; 
}

.predmety { 
  margin-top: 5px; 
  display: flex;
  justify-content: center;
}

.predmetylist { 
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  font-size: 14px;
  color: var(--podtext);
}

.obkec { 
  padding: 15px 20px; 
  text-align: center; 
}

.omne { 
  font-size: 14px; 
  letter-spacing: 4px; 
  color: var(--podtext); 
  margin-bottom: 8px; 
  font-weight: 300; 
  text-transform: uppercase;
}

.text { 
  margin-bottom: 10px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--podtext);
}

.tlacidla-row {
  display: flex;
  flex-direction: row;
  gap: 10px;
  width: 100%;
}

.tlacidla-row a {
  flex: 1;
  text-decoration: none;
}

.dokabinetu { 
  width: 100%; 
  padding: 16px 5px; 
  background-color: var(--akcent); 
  color: white; 
  border: none; 
  border-radius: 50px; 
  font-weight: 700; 
  cursor: pointer; 
  font-size: 12px;
  white-space: nowrap;
}

.rozvrhnapis { 
  font-size: 18px; 
  letter-spacing: 8px; 
  color: var(--podtext); 
  padding: 15px 0; 
  text-align: center;
  font-weight: 300; 
  background-color: var(--pozadie);
  flex-shrink: 0;
}

.rozvrh-sekcia { 
  padding: 0px 15px 40px; 
}

.rozvrh-img { 
  width: 100%; 
  max-width: 800px; 
  display: block;  
  margin: 0 auto; 
  transition: filter 0.3s ease;
}

[data-theme="light"] .rozvrh-img {
  filter: invert(1) hue-rotate(180deg);
}

.modal-overlay {
  position: fixed; 
  top: 0; left: 0; 
  width: 100%; 
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex; 
  justify-content: center; 
  align-items: center;
  z-index: 2000;
  opacity: 0; 
  visibility: hidden; 
  pointer-events: none;
  transition: all 0.3s ease;
}

.modal-overlay.active { 
  opacity: 1; 
  visibility: visible; 
  pointer-events: auto;
}

.modal-box {
  background: var(--info); 
  padding: 30px; 
  border-radius: 20px;
  text-align: center; 
  width: 85%; 
  max-width: 320px;
  border: 1px solid var(--okraje);
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

@media (min-width: 900px) {
  .main-container { 
    display: flex; 
    padding: 20px; 
    gap: 40px; 
    align-items: flex-start;
    max-width: 1400px;
    height: auto; 
    margin: 0 auto;
  }

  .sekcia-profil { 
    flex: 0 0 400px;
    height: auto; 
    position: sticky; 
    top: 20px; 
    display: flex;
    flex-direction: column;
  }

  .header-image { 
    aspect-ratio: 3 / 4; 
    flex-grow: 0;
  }

  .profil-karta { 
    border-radius: 0 0 12px 12px; 
    margin-top: 0; 
  }

  .rozvrh-sekcia { 
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  .rozvrh-karta {
    flex-grow: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .rozvrh-img { 
    max-width: 100%; 
    max-height: 85vh;
    width: auto; 
    object-fit: contain;
  }

  .rozvrhnapis { 
    background: transparent; 
    padding-top: 0; 
    margin-bottom: 10px;
  }
}