/* === RESET === */
:root {
  --bg-main: #f5f6f8;
  --bg-card: #ffffff;
  --text-color: #111827;
  --text-secondary: #4b5563;
  --accent: #10b981;
  --border-color: #e5e7eb;
  --shadow: rgba(0, 0, 0, 0.05);
}

body.dark-mode {
  --bg-main: #0f172a;
  --bg-card: rgba(17, 24, 39, 0.85);
  --text-color: #f3f4f6;
  --text-secondary: #9ca3af;
  --accent: #34d399;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow: rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #f7f9fc;
  color: #222;
}

/* === LANDING PAGE === */
body.landing {
  background: linear-gradient(135deg, #05070b, #073121);
  color: #f1f5f9;
  min-height: 100vh; /* Změna z auto na 100vh – zajistí minimální výšku viewportu a umožní růst */
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto; /* Explicitně povolte vertikální scroll (auto = scroll jen když potřeba) */
}

/* Hero sekce */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  max-width: 1100px;
  width: 90%;
  margin-top: 5rem;
  flex-wrap: wrap;
}

.hero-content {
  flex: 1;
  min-width: 320px;
}

.hero-content h1 {
  font-size: 2.6rem;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.hero-content h1 span {
  color: #6ee7b7;
}

.hero-content p {
  font-size: 1.1rem;
  color: #e2e8f0;
  margin-bottom: 2rem;
  line-height: 1.6;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.9rem 1.6rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

/* === BUTTONS === */
.log-btn {
  background: #22c55e;
  color: white;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
  padding: 0.9rem 1.6rem;
  border-radius: 10px;
  text-decoration: none;
}

.log-btn:hover {
  background: #16a34a;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
}

.reg-btn {
  background: transparent;
  border: 2px solid #6ee7b7;
  color: #6ee7b7;
  font-size: 25px;
}

.reg-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 12px rgba(110, 231, 183, 0.4);
}

.hero-primary-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.landing-header {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 50;
}

.header-login {
  color: #9ca3af;
  background: transparent;
  border: 2px solid #6ee7b7;
  font-size: 0.95rem;
 padding: 0.5rem 1.2rem;
  border-radius: 10px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color .2s ease, transform .2s ease;
}

.header-login:hover {
  color: #6ee7b7;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .landing-header {
    top: 16px;
    right: 20px;
  }

  .header-login {
    font-size: 0.85rem;
  }
}

/* ======================
   APP PREVIEW (SCREENY)
====================== */
.app-preview {
  max-width: 1100px;
  width: 90%;
  margin: 80px auto;
  text-align: center;
}

.preview-title {
  font-size: 2rem;
  color: #6ee7b7;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.preview-switch {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.switch-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 1.2rem;
  color: #d1d5db;
  cursor: pointer;
  transition: 0.25s ease;
}

.switch-btn.active,
.switch-btn:hover {
  background: linear-gradient(135deg, #22c55e, #4ade80);
  color: #000;
  transform: scale(1.05);
}

/* jednotlivé preview položky */
.preview-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.preview-item.reverse {
  flex-direction: row-reverse;
}

.preview-image {
  flex: 1;
  min-width: 280px;
  max-width: 500px;
  position: relative;
}

.preview-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: none; /* výchozí skryté všechny */
}

.preview-image img.active {
  display: block;
}

.preview-text {
  flex: 1;
  min-width: 280px;
  max-width: 450px;
  text-align: left;
}

.preview-text h3 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.preview-text p {
  font-size: 1rem;
  color: #d1d5db;
  line-height: 1.5;
}

/* CTA pod screeny */
.preview-cta {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

/* responsivita */
@media (max-width: 1024px) {
  .preview-item {
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .preview-item,
  .preview-item.reverse {
    flex-direction: column;
    text-align: center;
  }

  .preview-text {
    text-align: center;
  }

  .preview-text h3 {
    font-size: 1.25rem;
  }

  .preview-text p {
    font-size: 0.95rem;
  }

  .switch-btn {
    font-size: 1rem;
    padding: 8px 14px;
  }
}

/* Obecné obrázky preview */
.preview-img {
  display: none;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  transition: opacity 0.5s ease, transform 0.5s ease;
  opacity: 0;
}

/* Aktivní obrázek */
.preview-img.active {
  display: block;
  opacity: 1;
}

/* Rozměry pro desktop a mobil */
.preview-img.desktop {
  max-width: 500px; /* desktopové screeny */
}

.preview-img.mobile {
  max-width: 300px; /* mobilní screeny menší */
}

/* Preview boxy */
.preview-item {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Obrácené preview boxy */
.preview-item.reverse {
  flex-direction: row-reverse;
}

/* Text */
.preview-text {
  max-width: 400px;
}

/* Fade-in při scrollu */
.preview-item.visible,
.preview-img.active.visible,
.preview-text.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Přesun login buttonu pod CTA na mobilu */
@media (max-width: 768px) {
  .landing-header {
    display: none; /* skryjeme nahoře */
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .header-login-mobile {
    display: flex;
    margin-top: 10px;
  }
}

/* Skrytí desktop verze pro mobil */
.header-login-mobile {
  display: none;
}

@media (max-width: 768px) {
  .preview-image,
  .preview-text {
    max-width: 100%; /* zabraňuje přetékání */
  }

  .preview-image img {
    max-width: 250px; /* trošku zmenšit mobilní screeny */
  }

  .preview-item.reverse {
    flex-direction: column; /* zůstane pod sebou */
    align-items: center; /* vycentrovat */
  }
}

.cta-section {
    padding: 60px 20px;
    margin-top: 40px;
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.cta-content h3 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: #ffffff6c;
    text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.cta-btn {
    background: #000;
    color: #6ee7b7;
    font-size: 1.2rem;
    padding: 15px 35px;
    border-radius: 12px;
    font-weight: bold;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    transition: 0.3s ease;
}

.cta-btn:hover {
    background: #111;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

/* Responsivita */
@media (max-width: 768px) {
    .cta-section {
        padding: 40px 15px;
    }

    .cta-content h3 {
        font-size: 1.5rem;
    }

    .cta-btn {
        font-size: 1rem;
        padding: 12px 25px;
    }
}


/* HLAVNÍ CTA */
.try-btn {
  background: linear-gradient(135deg, #22c55e, #4ade80);
  color: #000;
  padding: 1.2rem 2.4rem;
  font-size: 1.2rem;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 10px 35px rgba(34,197,94,.45);
  transition: transform .25s ease, box-shadow .25s ease;
}

.try-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 18px 50px rgba(34,197,94,.6);
}

.login-link {
  font-size: .95rem;
  color: #9ca3af;
  text-decoration: none;
  transition: color .2s ease;
}

.login-link:hover {
  color: #6ee7b7;
  text-decoration: underline;
}


/* Hero obrázek */
.hero-image img {
  width: 360px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* === FEATURES === */
.features {
  text-align: center;
  max-width: 1100px;
  width: 90%;
}

.features h2 {
  font-size: 1.9rem;
  margin-bottom: 2rem;
  color: #6ee7b7;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.feature-box {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transition: 0.3s ease;
}

.feature-box:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.12);
}

.feature-box i {
  font-size: 2rem;
  color: #6ee7b7;
  margin-bottom: 1rem;
}

.feature-box h3 {
  margin-bottom: 0.6rem;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.feature-box p {
  color: #d1d5db;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* === FOOTER === */
.footer {
  margin-top: 5rem;
  text-align: center;
  opacity: 0.8;
  font-size: 0.9rem;
  padding: 2rem 0;
}

/* === ANIMACE === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fadeInUp {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fadeIn {
  opacity: 0;
  animation: fadeIn 1s ease-out forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

.features {
  padding: 80px 20px;
  text-align: center;
}

.feature-swiper {
  padding-top: 40px;
}

.feature-card {
background: rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 32px 24px;
  min-height: 240px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;

    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transition: transform .35s ease, box-shadow .35s ease;
}

.feature-card i {
  font-size: 28px;
  color: #4ade80;
}

.feature-card h3 {
  font-size: 1.2rem;
}

.feature-card p {
  color: #bbb;
  font-size: .95rem;
  line-height: 1.4;
}

.features {
  overflow: visible;     /* aby se nerozbil layout stránky */
}

body.landing {
  -ms-overflow-style: none;          /* Internet Explorer + starší Edge */
  scrollbar-width: none;             /* Firefox */
}

/* Chrome, Edge (novější), Safari, Opera */
body.landing::-webkit-scrollbar {
  display: none;
}

/* ──────────────────────────────────────────────
   Full-width infinite carousel + mobile swipe fixes + pause on touch
─────────────────────────────────────────────── */

.features {
  padding: 60px 0 100px;
  text-align: center;
  width: 100%;
  max-width: none;
}

.features h2 {
  margin-bottom: 2.5rem;
  padding: 0 20px;
}

.features-carousel-outer {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.features-carousel-wrapper {
  width: 100%;
  overflow-x: scroll;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 40px 0 60px;
  touch-action: pan-x;
  overscroll-behavior-x: none;
  scroll-behavior: smooth;
  -webkit-user-select: none;
  user-select: none;
}

.features-carousel-wrapper::-webkit-scrollbar {
  display: none;
}

.features-carousel-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: carouselScroll 32s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
  padding: 0 20px;
}

.feature-box {
  flex: 0 0 280px;
  scroll-snap-align: center;
}

/* Pauza animace – pro desktop hover, pro mobil JS třída */
.features-carousel-wrapper:hover .features-carousel-track,
.features-carousel-wrapper.paused .features-carousel-track {
  animation-play-state: paused;
}

@keyframes carouselScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.features-carousel-outer::before {
  left: 0;
  background: linear-gradient(to right, #05070b 15%, transparent);
}

.features-carousel-outer::after {
  right: 0;
  background: linear-gradient(to left, #05070b 15%, transparent);
}

/* Responzivita */
@media (max-width: 768px) {
  .feature-box {
    flex: 0 0 240px;
  }
  .features-carousel-wrapper {
    padding: 30px 0 50px;
  }
}


/* === MOBILE FIRST (INDEX) === */
@media (max-width: 768px) {

  .hero {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    margin-top: 3rem;
  }

  .hero-content {
    width: 100%;
  }

  .hero-content h1 {
    font-size: 2.1rem;
    line-height: 1.25;
  }

  .hero-content p {
    font-size: 1.05rem;
    margin-bottom: 1.6rem;
  }

  .hero-buttons {
    justify-content: center;
    gap: 0.8rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
    font-size: 1.05rem;
    padding: 1rem;
  }

  .hero-image {
    order: -1; /* obrázek nahoru */
  }

  .hero-image img {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .features {
    margin-top: 4rem;
  }

  .features h2 {
    font-size: 1.6rem;
  }

  .feature-box {
    padding: 1.6rem;
  }

  .feature-box h3 {
    font-size: 1.15rem;
  }

  .feature-box p {
    font-size: 0.95rem;
  }
}

/* === LOGIN & REGISTER === */
body.auth-page {
  background: linear-gradient(135deg, #05070b, #073121);
  color: #fff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
}

body.auth-page {
  position: relative;
  overflow: hidden;
}

body.auth-page::before,
body.auth-page::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #6ee7b7, #3b82f6);
  opacity: 0.15;
  filter: blur(50px);
  animation: floatBg 25s ease-in-out infinite;
  z-index: 0;
}

body.auth-page::before {
  top: -100px;
  left: -100px;
}

body.auth-page::after {
  bottom: -120px;
  right: -120px;
  animation-delay: 8s;
  background: linear-gradient(135deg, #3b82f6, #6ee7b7);
}

@keyframes floatBg {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(60px, 40px);
  }
  100% {
    transform: translate(0, 0);
  }
}

.auth-container {
  animation: fadeInUp 0.8s ease-out, glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  }
  50% {
    box-shadow: 0 20px 45px rgba(110, 231, 183, 0.25);
  }
}


.auth-container {
  background: rgba(255, 255, 255, 0.08);
  padding: 3rem 3.5rem;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  text-align: center;
  animation: fadeInUp 0.8s ease-out;
  backdrop-filter: blur(12px);
}

.auth-container h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #6ee7b7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-container p {
  font-size: 0.95rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  color: #e2e8f0;
}

/* INPUTS */
.auth-container form label {
  display: block;
  text-align: left;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  opacity: 0.9;
}

.auth-container form input {
  width: 100%;
  padding: 0.85rem 1rem;
  margin-bottom: 1.2rem;
  border-radius: 12px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.auth-container form input:focus {
  outline: none;
  background: rgba(255,255,255,0.2);
  box-shadow: 0 0 10px #6ee7b7;
}

/* BUTTONS */
.btn-primary {
  width: 100%;
  padding: 0.95rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, #6ee7b7, #3b82f6);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.4);
}

/* ERROR MESSAGE */
.error {
  background: rgba(255, 0, 50, 0.15);
  color: #ff4d6d;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

.success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

/* SMALL TEXT / LINKS */
.small-text {
  font-size: 0.85rem;
  margin-top: 1.5rem;
  opacity: 0.85;
}

.small-text a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
}

.small-text a:hover {
  text-decoration: underline;
}

/* ANIMATION */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .auth-container {
    max-width: 340px;
    padding: 2rem 1.8rem;
    border-radius: 16px;
  }

  .auth-container h1 {
    font-size: 1.6rem;
  }

  .auth-container p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .btn-primary {
    padding: 0.85rem;
    font-size: 0.95rem;
  }
}

/* === DASHBOARD === */
.container {
  display: flex;
  min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
  width: 250px;
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  color: white;
  padding: 2rem 1.4rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  transition: transform 0.3s ease;
  z-index: 15;
}

.logo {
  font-size: 1.9rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: #22c55e;
}

/* === PROFIL BOX === */
.profile-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.8rem 1rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  transition: background 0.3s;
}

.profile-box:hover {
  background: rgba(255, 255, 255, 0.1);
}

.profile-img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #22c55e;
}

.profile-info h3 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.2rem;
}

.profile-info p {
  font-size: 0.85rem;
  color: #9ca3af;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #cbd5e1;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  margin-bottom: 0.6rem;
  transition: all 0.25s ease;
}

.menu a:hover,
.menu a.active {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  transform: translateX(4px);
}

.menu a.active {
  position: relative;
}

.menu a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: #22c55e;
  border-radius: 0 4px 4px 0;
}

/* === MODERN DASHBOARD === */
body {
  background: linear-gradient(135deg, #e3f1ed, #059669);
  background-repeat: no-repeat;
  min-height: 100vh;
}

.modern-dashboard {
  margin-left: 250px;
  padding: 3rem;
  max-width: 1300px;
}

.dashboard-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #111827;
}

.dashboard-header p {
  color: #6b7280;
  margin-bottom: 2rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* === CARD === */
.card {
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.05);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.card-body p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
}

.card.small { height: 100%; }
.card.large { grid-column: span 2; }

/* === GRADIENTY === */
.gradient-blue {
  background: linear-gradient(135deg, blue, rgb(210, 189, 252));
}

.gradient-green {
  background: linear-gradient(135deg, #10b981, #5deabd);
}

.gradient-orange {
  background: linear-gradient(135deg, #f97316, #f49562);
}

.gradient-indigo {
  background: linear-gradient(135deg, #6366f1, #7670ed);
}

.white-border {
  background: #fff;
  border: 2px solid #d1fae5;
  color: #111827;
}

/* === PROGRESS BARS === */
.progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.25);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 0.8rem;
}

.progress-bar.thin {
  height: 6px;
  background: #e5e7eb;
}

.fill {
  height: 100%;
  border-radius: 6px;
  background: #fff;
}

.fill.green {
  background: #10b981;
}

.fill.blue {
  background: #3b82f6;
}

/* === TEXTY === */
.xp-text {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.8rem;
}

.streak-number {
  font-size: 3.2rem;
  font-weight: 700;
}

/* === BUTTON === */
.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn.white {
  background: #fff;
  color: #111827;
}

.btn.white:hover {
  background: #f3f4f6;
}

/* === BADGE === */
.badge {
  background: rgba(255,255,255,0.2);
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge.subtle {
  background: #d1fae5;
  color: #065f46;
  display: inline-block;
  margin-top: 0.8rem;
}

/* === NUTRITION CARD === */
.nutrition-card {
  text-align: center;
  position: relative;
}

.circle-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 1.5rem;
  margin-top: 15px;
}

.progress-circle {
  width: 160px;
  height: 160px;
  transform: rotate(-90deg); /* otočí kruh, aby začínal nahoře */
}

.progress-circle circle {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  transform-origin: 50% 50%; /* 🔥 důležité — rotuje kolem středu */
}

.progress-circle .bg {
  stroke: #e5e7eb;
}

.progress-circle .progress {
  stroke: #10b981;
  stroke-dasharray: 339.292; /* obvod pro r=54 */
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 0.6s ease, stroke 0.6s ease;
}



@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

.progress-circle .progress[style*='stroke-dashoffset: 0'] {
  animation: pulse-ring 1.5s infinite ease-in-out;
}

.circle-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.circle-center h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111827;
}

.circle-center p {
  font-size: 0.9rem;
  color: #6b7280;
}

/* Makra */
.macros {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: #374151;
  margin-bottom: 1rem;
}

.macros span {
  color: #6b7280;
  margin-right: 4px;
}

.nutrition-card .badge.subtle {
  margin-top: 0.8rem;
}

/* === BOXY: RYCHLÝ TRÉNINK + DNEŠNÍ JÍDLO === */
.quick-training, .daily-meal {
  position: relative;
  text-align: center;
  color: white;
  overflow: hidden;
  transition: all 0.35s ease;
}

.quick-training {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
}

.daily-meal {
  background: linear-gradient(135deg, #10b981, #059669);
}

/* Velké ikonky uprostřed */
.icon-large {
  font-size: 100px;
  margin: 1.5rem 0;
  margin-bottom: 60px;
  opacity: 0.9;
  text-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.icon-large::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  z-index: 0;
}


.icon-large.food {
  font-size: 100px;
}

/* Tlačítko uvnitř boxu */
.card-body .btn.btn-white {
  background: white;
  color: #111827;
  border-radius: 10px;
  font-weight: 600;
  margin-top: 1.2rem;
  padding: 0.7rem 1.4rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: 0.3s ease;
}

.card-body .btn.btn-white:hover {
  background: #f9fafb;
  transform: translateY(-2px);
}

/* Hover efekty na boxy */
.quick-training:hover,
.daily-meal:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  filter: brightness(1.08);
}

/* === RYCHLÝ TRÉNINK & JÍDLO – dynamický obsah === */
.workout-summary, .meal-summary {
  color: #f1f5f9;
  text-align: left;
  background: rgba(255, 255, 255, 0.08);
  padding: 1rem 1.2rem;
  border-radius: 12px;
  box-shadow: inset 0 0 10px rgba(255,255,255,0.05);
  backdrop-filter: blur(3px);
  height: 310px;
}

.workout-summary p {
    font-size: 15px;
    margin: 0.3rem 0;
    opacity: 0.9;
}

.workout-summary h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: #fff;
}

.meal-summary li {
  font-size: 0.95rem;
  margin: 0.3rem 0;
  opacity: 0.9;
}

.workout-summary i, .meal-summary i {
  margin-right: 6px;
  color: rgba(255,255,255,0.8);
}

.workout-summary .note {
  font-size: 1rem;
  color: #cbd5e1;
  margin-top: 0.8rem;
  font-style: italic;
}

.meal-summary ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.8rem 0;
}

.meal-summary li {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  margin-bottom: 6px;
  color: #fff;
}

.meal-summary .more-meals {
  text-align: center;
  font-size: 0.85rem;
  color: #cbd5e1;
  font-style: italic;
  background: none;
  margin-top: 0.5rem;
}


.meal-summary .total {
  font-weight: 600;
  text-align: right;
  color: #fff;
  margin-top: 15px;
}


/* Vypne scroll na desktopech */
@media (min-width: 1024px) {
  html, body {
    overflow: hidden;
  }
}

/* Upravíme výšku tak, aby se dashboard vždy vešel na obrazovku */
html, body {
  height: 100%;
}

.container {
  display: flex;
  height: 100vh;            /* vždy na výšku okna */
  overflow: hidden;         /* žádný scroll */
}

.dashboard {
  flex: 1;
  height: 100vh;
  overflow-y: auto;         /* interní scroll pro obsah (jen pokud by přetekl) */
  scrollbar-width: none;    /* schová scrollbar */
}

.dashboard::-webkit-scrollbar {
  display: none;            /* schová scrollbar i v Chrome */
}

/* === RESPONSIVITA === */
@media (max-width: 900px) {
  .modern-dashboard {
    margin-left: 0;
    padding: 1.5rem;
  }
}

/* === MOBILE TOPBAR === */
.mobile-topbar {
  display: none;
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 25;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.topbar-logo {
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #22c55e;
}

.menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 800px) {
  .mobile-topbar {
    display: flex;
  }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .dashboard {
    margin-left: 0;
    padding-top: 1rem;
  }
  body.menu-open {
    overflow: hidden;
  }
}

/* === RESPONSIVE DASHBOARD FIX === */

/* TABLETY – úprava layoutu */
@media (max-width: 1024px) {
  .modern-dashboard {
    margin-left: 0;
    padding: 1.5rem;
  }

  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
  }

  .card.large {
    grid-column: span 1;
  }

  .card {
    padding: 1.2rem 1.5rem;
  }

  .circle-wrapper {
    width: 140px;
    height: 140px;
  }

  .circle-center h3 {
    font-size: 1.4rem;
  }

  .circle-center p {
    font-size: 0.8rem;
  }
}

/* MOBILY – kompletní přeuspořádání */
@media (max-width: 700px) {
  .modern-dashboard {
    padding: 1rem;
  }

  .dashboard-header h1 {
    font-size: 1.6rem;
    text-align: center;
  }

  .dashboard-header p {
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .card {
    padding: 1.2rem;
    text-align: center;
  }

  .icon-large {
    font-size: 70px;
    margin-bottom: 1rem;
  }

  .progress-circle {
    width: 120px;
    height: 120px;
  }

  .macros {
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
  }

  .circle-center h3 {
    font-size: 1.2rem;
  }

  .circle-center p {
    font-size: 0.8rem;
  }

  .badge.subtle {
    font-size: 0.8rem;
  }

  .meal-summary li {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }

  .workout-summary {
    height: auto;
    padding: 0.8rem;
  }

  .meal-summary {
    height: auto;
    font-size: 30px;
  }

  .circle-wrapper {
    width: 120px;
    height: 120px;
  }

  .progress-circle circle {
    stroke-width: 10;
  }

  .circle-center h3 {
    font-size: 1.2rem;
  }

  .circle-center p {
    font-size: 0.8rem;
  }
}

/* === OPRAVA KRUHU NA MOBILU (POSUN A ZAROVNÁNÍ) === */
@media (max-width: 700px) {
  .circle-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .progress-circle {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
    transform-origin: 50% 50%; /* drží kruh uprostřed */
    display: block;
  }

  .progress-circle circle {
    stroke-width: 10;
    transform-origin: 50% 50%;
  }

  .progress-circle .bg {
    stroke: #e5e7eb;
  }

  .circle-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
  }

  .circle-center h3 {
    font-size: 1.3rem;
  }

  .circle-center p {
    font-size: 0.8rem;
  }
}

@keyframes progressFill {
  from {
    stroke-dashoffset: 339.292;
  }
  to {
    stroke-dashoffset: var(--offset, 0);
  }
}

.progress-circle .progress {
  transition: stroke 0.6s ease;
  animation: progressFill 1.2s ease forwards;
}

/* ULTRA SMALL MOBILY (např. iPhone SE) */
@media (max-width: 400px) {
  .dashboard-header h1 {
    font-size: 1.4rem;
  }

  .circle-wrapper {
    width: 100px;
    height: 100px;
  }

  .circle-center h3 {
    font-size: 1rem;
  }

  .card {
    padding: 1rem;
  }

  .icon-large {
    font-size: 55px;
  }
}

/* === FIX: CENTROVANÝ KRUH + RESPONSIVE === */
.circle-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 160px;
  margin: 0 auto 1.5rem;
}

.progress-circle {
  width: 100%;
  height: auto;
  transform: rotate(-90deg);
}

.progress-circle circle {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  transform-origin: 50% 50%;
}

.circle-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

@media (max-width: 700px) {
  .circle-wrapper {
    width: 160px;
    height: 160px;
  }

  .progress-circle circle {
    stroke-width: 10;
  }

  .circle-center h3 {
    font-size: 1.2rem;
  }

  .circle-center p {
    font-size: 0.8rem;
  }
}


/* === SKRÝT TOPBAR NA DESKTOPU === */
@media (min-width: 801px) {
  .mobile-topbar {
    display: none !important;
  }
}

/* === OVERLAY (tmavé pozadí při otevřeném menu) === */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* === TRÉNINKY === */
/* === TRÉNINKY – NOVÝ DESIGN === */
.training-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.training-card {
  text-align: center;
  padding: 2.4rem 1.8rem;
  border-radius: 20px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.training-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  filter: brightness(1.05);
}

/* Specifické styly pro "Přidat trénink" */
.add-training {
  position: relative;
  overflow: hidden;
}

.add-training .training-icon {
  font-size: 90px;
  margin-bottom: 1.4rem;
  transition: transform 0.3s ease;
}

.add-training:hover .training-icon {
  transform: scale(1.1);
}

.add-training::after {
  content: "";
  position: absolute;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.add-training:hover::after {
  opacity: 1;
}

.training-card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.training-card p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1.2rem;
  color: rgba(255,255,255,0.9);
}

.training-card .btn {
  margin-top: auto;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.training-card .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.2);
}

.training-icon {
  font-size: 80px;
  color: white;
  margin-bottom: 1.2rem;
  text-shadow: 0 4px 10px rgba(0,0,0,0.25);
}


/* === MODAL – NOVÝ DESIGN === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border-radius: 18px;
  padding: 2rem 2.5rem;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 10px 35px rgba(0,0,0,0.25);
  text-align: center;
  position: relative;
  animation: slideUp 0.4s ease;
  border: 2px solid #bbf7d0;
}

/* === MODAL SCROLL FIX === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow-y: auto; /* umožní scroll celé vrstvy při menších displejích */
  padding: 2rem 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border-radius: 18px;
  padding: 2rem 2.5rem;
  width: 90%;
  max-width: 750px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
  text-align: center;
  position: relative;
  border: 2px solid #bbf7d0;
  max-height: 90vh;         /* výška max. 90 % obrazovky */
  overflow-y: auto;         /* scrolluje se v rámci modalu */
  scrollbar-width: thin;    /* decentní scrollbar */
  scrollbar-color: #16a34a #e5e7eb;
}

.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
  background-color: #16a34a;
  border-radius: 8px;
}

/* === CVIKY (RESPONZIVNÍ ROZLOŽENÍ) === */
.exercise-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.exercise-row input {
  flex: 1;
  min-width: 100px;
  padding: 0.6rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: border 0.2s ease;
}

.exercise-row input:focus {
  border-color: #10b981;
  outline: none;
}

.btn-remove {
  background: #ef4444;
  color: white;
  border: none;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-remove:hover {
  background: #dc2626;
}

/* 📱 MOBILNÍ REŽIM */
@media (max-width: 700px) {
  .exercise-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .exercise-row input {
    width: 100%;
    min-width: auto;
  }

  .btn-remove {
    align-self: flex-end;
    width: 100%;
    background: #f87171;
    text-align: center;
  }

  #addExercise {
    width: 100%;
    padding: 0.8rem;
    border-radius: 10px;
  }
}



@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.training-form input,
.training-form textarea {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  margin-bottom: 1rem;
  font-size: 1rem;
  transition: all 0.2s ease;
  margin-top: 15px;
}

.training-form input:focus,
.training-form textarea:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
  outline: none;
}

.training-form button {
  width: 100%;
  margin-top: 0.5rem;
}

.btn-secondary {
  background: #f3f4f6;
  color: #111827;
  border: none;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

/* === FIX KLIKATELNOSTI MODALU A BUTTONU === */

/* Ujistí se, že modal je nad vším */
.modal-overlay {
  z-index: 9999 !important;
}

/* Ujistí se, že tlačítko jde normálně kliknout */
.add-training button {
  position: relative;
  z-index: 10;
  cursor: pointer;
}

/* Opraví překrývání ikon nebo animací */
.add-training::after {
  pointer-events: none;
}

/* Pokud by někde nějaká karta měla překrývat ostatní */
.training-card {
  position: relative;
  z-index: 1;
}

/* Sidebar nesmí překrývat obsah */
.sidebar {
  z-index: 100;
}

.large-modal {
  max-width: 750px;
  width: 95%;
}

.exercise-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr) 50px;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  align-items: center;
}

.exercise-row input {
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
}

.exercise-row input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.15);
  outline: none;
}

.btn-remove {
  background: #f87171;
  color: white;
  border: none;
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-remove:hover {
  background: #dc2626;
}

.gradient-green .btn-white {
  background: #fff;
  color: #065f46;
}

.gradient-orange .btn-white {
  background: #fff7ed;
  color: #c2410c;
}

.btn-white {
  outline: none;
}

.btn-white:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.4); /* volitelné – jemné zvýraznění při fokusu */
}

/* === TOAST NOTIFIKACE === */
#toastContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  min-width: 240px;
  max-width: 320px;
  padding: 1rem 1.4rem;
  border-radius: 10px;
  color: white;
  font-weight: 500;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
  animation: slideIn 0.4s ease, fadeOut 0.4s ease 3s forwards;
  opacity: 0.95;
}

.toast.success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.toast.error {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateX(120%); }
}

/* === FIX: MOBILE RESPONSIVE CVIKY === */
@media (max-width: 700px) {
  .exercise-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .exercise-row input {
    width: 100% !important;
    min-width: auto !important;
  }

  .btn-remove {
    width: 100% !important;
    align-self: flex-end;
    background: #f87171;
    text-align: center;
  }

  #addExercise {
    width: 100% !important;
    padding: 0.8rem;
    border-radius: 10px;
  }
}

@media (max-width: 700px) {
  .exercise-row {
    background: #f9fafb;
    padding: 0.8rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
  }
}

/* === STYL CVIKŮ A SÉRIÍ V MODALU === */

.exercise-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: #f9fafb;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.exercise-row input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 0.75rem;
}

/* === SÉRIE === */
.sets-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 0.8rem;
  border-left: 3px solid #10b981; /* zelený proužek */
  margin-top: 0.3rem;
}

.set-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.set-row input {
  flex: 1;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.add-set {
  background: #e0f2f1;
  color: #047857;
  font-size: 0.85rem;
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  align-self: flex-start;
  transition: 0.2s ease;
}

.add-set:hover {
  background: #bbf7d0;
}

/* === TLAČÍTKA === */
.btn-remove {
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
  transition: 0.2s ease;
}

.btn-remove:hover {
  background: #fecaca;
}

.btn-secondary {
  background: #f3f4f6;
  color: #111827;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: 0.2s ease;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

/* === RESPONSIVITA === */
@media (max-width: 768px) {
  .modal-content.large-modal {
    width: 90%;
    padding: 1.2rem;
  }

  .set-row {
    flex-direction: column;
    align-items: stretch;
  }

  .set-row input {
    width: 100%;
  }

  .btn-remove {
    align-self: flex-end;
  }
}

.workout-history {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* === HISTORIE TRÉNINKŮ === */
.workout-history {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* Každá karta tréninku */
.workout-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  color: #111;
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.15);
  border: 2px solid #bbf7d0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.workout-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.25);
}

/* Nadpis tréninku */
.workout-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 0.6rem;
}

/* Texty uvnitř */
.workout-card p {
  color: #1e293b;
  font-size: 0.95rem;
  margin: 0.2rem 0;
}

.workout-card strong {
  color: #111;
  font-weight: 600;
}

/* Tlačítko "Zobrazit detaily" */
.workout-card .btn {
  margin-top: 1rem;
  align-self: flex-start;
  background: #22c55e;
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1.4rem;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 3px 8px rgba(34, 197, 94, 0.3);
}

.workout-card .btn:hover {
  background: #16a34a;
  transform: translateY(-2px);
}

.workout-card {
  position: relative;
  overflow: hidden;
}

.workout-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, #22c55e, #16a34a);
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
}

/* === MODAL DETAIL TRÉNINKU – UPGRADE === */
.modal-content.workout-detail-modal {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border-radius: 18px;
  padding: 2.2rem 2.6rem;
  max-width: 800px;
  border: 2px solid #bbf7d0;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: modalPop 0.35s ease;
}

/* Animace pro přirozené zobrazení */
@keyframes modalPop {
  from {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Nadpis */
.modal-content.workout-detail-modal h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  color: #065f46;
  font-weight: 700;
  margin-bottom: 1.6rem;
}

/* Emoji ikona vedle názvu */
.modal-content.workout-detail-modal h2::before {
  content: "🧠";
  font-size: 1.5rem;
}

/* Základní informace o tréninku */
.workout-detail-info {
  background: #ecfdf5;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  margin-bottom: 1.4rem;
  border: 1px solid #d1fae5;
}

.workout-detail-info p {
  margin: 0.3rem 0;
  color: #064e3b;
  font-size: 0.95rem;
}

.workout-detail-info strong {
  color: #065f46;
}

.exercise-detail {
  margin-bottom: 1.8rem;
  padding: 1rem 1.2rem;
  background: #f9fafb;
  border-radius: 12px;
  border-left: 5px solid #22c55e;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden; /* 🟢 Tohle odstraní černou linku */
}

.sets-table {
  width: 100%;
  border-collapse: separate; /* 🟢 Změna z collapse na separate */
  border-spacing: 0;
  margin-top: 0.6rem;
  border: none; /* 🟢 Zruší nechtěné okraje */
}

.exercise-detail h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #047857;
  display: flex;
  align-items: center;
  gap: 6px;
}

.exercise-detail h4::before {
  content: "🏋️";
}

/* Název stroje */
.exercise-detail small {
  display: block;
  margin-bottom: 0.8rem;
  color: #6b7280;
  font-style: italic;
}

.sets-table th {
  background: #bbf7d0;
  color: #064e3b;
  text-align: center;
  padding: 0.6rem;
  font-weight: 600;
  border-bottom: 2px solid #10b981;
}

.sets-table td {
  padding: 0.6rem;
  text-align: center;
  color: #111827;
  border-bottom: 1px solid #e5e7eb;
}

.sets-table tr:last-child td {
  border-bottom: none;
}

/* Tlačítko zavřít */
.modal-content.workout-detail-modal .btn-close {
  background: #f87171;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-weight: 600;
  margin-top: 1.4rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
}

.modal-content.workout-detail-modal .btn-close:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

/* === Vylepšený horní blok detailu === */
.workout-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 1rem 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-top: 10px;
}

.workout-header-left h2 {
  font-size: 1.4rem;
  color: #065f46;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.workout-date {
  font-size: 0.95rem;
  color: #047857;
  font-weight: 500;
}

.workout-header-left .muscle {
  margin-top: 0.3rem;
  color: #064e3b;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.workout-header-right {
  text-align: right;
}

.workout-header-right p {
  margin: 0.2rem 0;
  color: #064e3b;
  font-size: 0.95rem;
}

.workout-header-right i {
  color: #10b981;
  margin-right: 4px;
}

.workout-notes {
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-style: italic;
  color: #92400e;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-divider {
  border: none;
  height: 1px;
  background: #d1fae5;
  margin: 1.2rem 0;
}

.history-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0 1.5rem;
  background: #ecfdf5;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  border: 1px solid #bbf7d0;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.history-summary {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
  flex-wrap: wrap;
}

.summary-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  flex: 1;
  min-width: 180px;
  text-align: center;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.summary-box h4 {
  color: #065f46;
  margin-bottom: 0.4rem;
}

.summary-box p {
  font-size: 1.3rem;
  font-weight: bold;
  color: #047857;
}

/* === Styl pro inputy s datem === */
.history-filters input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff;
  border: 2px solid #bbf7d0;
  border-radius: 10px;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  font-size: 0.95rem;
  color: #064e3b;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: all 0.25s ease;
  position: relative;
}

/* 🟢 Hover a focus efekt */
.history-filters input[type="date"]:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

/* 🟢 Ikona kalendáře vlevo */
.history-filters input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: url('https://api.iconify.design/mdi:calendar-outline.svg') no-repeat center;
  background-size: 18px 18px;
  opacity: 0.8;
  cursor: pointer;
}

/* 🟢 Malé doladění */
.history-filters label {
  color: #065f46;
  font-weight: 600;
  font-size: 0.95rem;
}

/* 🟢 Tlačítka vedle inputů */
.history-filters .btn {
  border-radius: 8px;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  margin-bottom: 20px;
}

/* === MOBILE FIX: FILTRY HISTORIE TRÉNINKŮ === */
@media (max-width: 700px) {
  .history-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.2rem;
    text-align: center;
  }

  .filter-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.8rem;
  }

  .history-filters input[type="date"] {
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }

  .history-filters .btn {
    width: 100%;
    margin-top: 0.1rem;
    padding: 0.8rem;
    font-size: 1rem;
  }

  .history-filters label {
    text-align: left;
    font-size: 0.9rem;
  }

  .history-filters button#resetBtn {
    width: 100%;
    background: #f3f4f6;
    color: #111827;
    border-radius: 8px;
    font-weight: 600;
  }

  .history-filters button#resetBtn:hover {
    background: #e5e7eb;
  }
}

.card.white-border h2 {
  color: #065f46;
}

.card.white-border strong {
  font-size: 1.1rem;
}

/* === DETAIL PROGRESS MODAL === */
#exerciseModal .modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
  border-radius: 20px;
  padding: 2rem 2.2rem;
  border: 2px solid #bbf7d0;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
  animation: modalPop 0.3s ease;
  max-width: 700px;
  overflow-y: auto;
}

/* Hlavička cviku */
.workout-detail-header {
  background: #d1fae5;
  border-radius: 12px;
  padding: 0.8rem 1.2rem;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #064e3b;
}

.workout-detail-header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.workout-detail-header .workout-date {
  font-size: 0.95rem;
  color: #047857;
}

/* Styl grafu */
#exerciseChart {
  display:block;
  width:100%;
  height:280px !important;
  background:#f9fafb;
  border-radius:10px;
  padding:0.5rem;
}

/* Seznam tréninků */
ul.exercise-workouts {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

ul.exercise-workouts li {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

ul.exercise-workouts li:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

ul.exercise-workouts a {
  text-decoration: none;
  color: #065f46;
  font-weight: 600;
}

ul.exercise-workouts a:hover {
  color: #059669;
}

#exerciseModal .btn.btn-secondary {
  margin-top: 1.4rem;
  padding: 0.7rem 1.3rem;
  border-radius: 10px;
  background: #6b7280;
  color: white;
  font-weight: 600;
  border: none;
  transition: background 0.25s;
}

#exerciseModal .btn.btn-secondary:hover {
  background: #4b5563;
}

#exerciseChart {
  display: block;
  width: 100% !important;
  height: auto !important;
  min-height: 240px;
  max-height: 320px;
  background: #f9fafb;
  border-radius: 14px;
  padding: 0.5rem;
  margin-top: 0.8rem;
}

/* Na mobilech trošku víc místa a kompaktnější vzhled */
@media (max-width: 600px) {
  #exerciseChart {
    min-height: 200px;
    max-height: 240px;
    padding: 0.3rem;
  }
}

#workoutDetailModal .modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
  border-radius: 18px;
  padding: 2rem 2.4rem;
  border: 2px solid #bbf7d0;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  max-width: 800px;
  overflow-y: auto;
  max-height: 85vh;
}

#workoutDetailModal.active {
  display: flex;
}

#workoutDetailModal .btn.btn-secondary {
  margin-top: 1.2rem;
  padding: 0.7rem 1.3rem;
  border-radius: 10px;
  background: #6b7280;
  color: white;
  font-weight: 600;
  border: none;
  transition: background 0.25s;
}

#workoutDetailModal .btn.btn-secondary:hover {
  background: #4b5563;
}

/* === Živý trénink – fullscreen overlay === */
.live-training-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.live-training-modal {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  width: 90%;
  max-width: 400px;
}

.live-training-modal h2 {
  color: #065f46;
  margin-bottom: 1rem;
}

.timer-display {
  font-size: 2.5rem;
  font-weight: 700;
  color: #059669;
  margin-bottom: 1.5rem;
}

.btn-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.btn-danger {
  background: #dc2626;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-danger:hover {
  background: #b91c1c;
}

.pause-timer {
  font-size: 1.1rem;
  color: #374151;
  margin-top: 0.5rem;
}

/* === ZÁKLADNÍ STRUKTURA === */
.modal-content {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  padding: 1.8rem 1.6rem;
  width: 95%;
  max-width: 880px;
  box-sizing: border-box;
  overflow-y: auto;
  max-height: 95vh;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

#liveTitle {
  font-size: 1.5rem;
  font-weight: 700;
}

#liveSubtitle {
  font-size: 0.95rem;
  color: #6b7280;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #9ca3af;
}

.close-modal:hover {
  color: #111827;
}

/* === ČASOVAČE === */
.timer-wrapper {
  justify-content: space-between;
  align-items: stretch;
  gap: 1rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
}

.timer-box {
  flex: 1 1 45%;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 1rem 0.8rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  min-width: 250px;
}

.timer-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #059669;
  margin-top: 20px;
  justify-content: center;
  align-items: center;
}

.timer-label-pause {
  font-size: 0.9rem;
  font-weight: 600;
  color: #059669;
  margin-top: 20px;
  justify-content: center;
  align-items: center;
  margin-left: 225px;
}

.timer-display {
  font-family: 'Consolas', monospace;
  font-size: 1.9rem;
  font-weight: 700;
  color: #16a34a;
  margin-bottom: 0.4rem;
  padding: 0px 15px;
}

.timer-display.small {
  font-size: 1.3rem;
  color: #10b981;
  margin-top: 15px;
}

.timer-hint {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 10px;
}

.timer-buttons {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
}

.btn.btn-secondary,
.btn.btn-danger {
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
}

.btn.btn-secondary {
  background: #e5e7eb;
  color: #111827;
  border: 1px solid #d1d5db;
}

.btn.btn-secondary:hover {
  background: #f3f4f6;
}

.btn.btn-danger {
  background: #ef4444;
  color: white;
  border: none;
}

.btn.btn-danger:hover {
  background: #dc2626;
}

/* === SEKCE CVIKŮ === */
h3 {
  margin-top: 1rem;
  margin-bottom: 0.6rem;
  color: #111827;
  font-size: 1.15rem;
  font-weight: 700;
}

.exercise-row {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.exercise-header {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.6rem;
}

.exercise-header input {
  flex: 1;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: white;
  font-size: 0.9rem;
}

.exercise-header input:focus {
  border-color: #10b981;
  outline: none;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.btn.btn-remove {
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: 0.2s;
}

.btn.btn-remove:hover {
  background: #fecaca;
}

/* === SÉRIE === */
.set-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.4rem;
}

.set-row input {
  padding: 0.4rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
  font-size: 0.9rem;
  width: 90px;
  text-align: center;
}

.set-row input:focus {
  border-color: #10b981;
  outline: none;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.btn.btn-secondary.live-add-set {
  background: #ecfdf5;
  border: 1px dashed #10b981;
  color: #065f46;
  width: 100%;
  border-radius: 10px;
  padding: 0.45rem 0;
  margin-top: 0.5rem;
  font-weight: 600;
}

.btn.btn-secondary.live-add-set:hover {
  background: #d1fae5;
}

/* === CVIKY - ADD BUTTON === */
#liveAddExercise {
  background: #dbeafe;
  color: #1e3a8a;
  font-weight: 600;
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  padding: 0.55rem 1rem;
  margin-top: 0.6rem;
  width: 100%;
}

#liveAddExercise:hover {
  background: #bfdbfe;
}

/* === DOPLŇKOVÉ POLE === */
.live-extra {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.live-extra input,
.live-extra textarea {
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  background: white;
}

.live-extra textarea {
  min-height: 70px;
  resize: vertical;
}

.live-extra input:focus,
.live-extra textarea:focus {
  border-color: #10b981;
  outline: none;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* === RESPONSIVITA === */
@media (max-width: 700px) {
  .timer-wrapper {
    flex-direction: column;
  }
  .exercise-header {
    flex-direction: column;
  }
  .timer-display {
    font-size: 1.6rem;
  }
  .timer-label-pause {
    margin-left: 75px;
  }
}

/* === MODAL OBECNÝ === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 800px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  overflow-y: auto;
  max-height: 90vh;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  margin: 0;
}

/* === FORM STYLING === */
#manualTrainingForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#manualTrainingForm label {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

#manualTrainingForm input,
#manualTrainingForm textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fafafac6;
}

#manualTrainingForm textarea {
  resize: vertical;
  min-height: 70px;
}

/* === CVIKY === */
#manualExerciseList {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.exercise-row {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 50px;
  background: #fafafac6;
}

.exercise-header {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.sets-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.set-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

#planExerciseList .exercise-row {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  transition: 0.2s ease;
}

#planExerciseList .exercise-row:hover {
  background: #f1f5f9;
}

.exercise-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.exercise-header input {
  flex: 1;
  min-width: 140px;
}

#addPlanExercise {
  margin-top: 10px;
}

/* === MODERNÍ INPUTY === */
.training-form input[type="text"],
.training-form input[type="number"],
.training-form select,
.training-form textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  transition: all 0.2s ease;
  outline: none;
}

.training-form input:focus,
.training-form select:focus,
.training-form textarea:focus {
  border-color: #10b981;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* === GRID INPUTY NAHORU (NÁZEV, SVALOVÁ SKUPINA) === */
.training-form label {
  font-weight: 600;
  color: #1e293b;
}

.training-form input::placeholder {
  color: #9ca3af;
}

.training-form .top-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

/* === SEKCE CVIKŮ === */
#planExerciseList .exercise-row {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  transition: background 0.2s ease;
}

#planExerciseList .exercise-row:hover {
  background: #f1f5f9;
}

.exercise-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.exercise-header input {
  flex: 1;
  min-width: 140px;
}

.exercise-header .btn-remove {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.9rem;
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.exercise-header .btn-remove:hover {
  background: #fca5a5;
}

/* === TLAČÍTKA === */
#addPlanExercise {
  display: inline-block;
  margin-top: 5px;
  background: #e2e8f0;
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
}

#addPlanExercise:hover {
  background: #d1d5db;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* === KARTY PLÁNŮ === */
.training-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.training-card {
  border-radius: 18px;
  padding: 25px;
  color: #fff;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.training-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.gradient-green {
  background: linear-gradient(135deg, #059669, #10b981);
}

.gradient-yellow {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.training-icon {
  font-size: 42px;
  margin-bottom: 12px;
}

.training-card h3 {
  margin: 8px 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.training-card p {
  opacity: 0.9;
  font-size: 0.95rem;
}

.card-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.card-actions .btn {
  border-radius: 8px;
  font-weight: 600;
  padding: 8px 16px;
}

.btn-white {
  background: #fff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

.btn-white:hover {
  background: #f1f5f9;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
  border: none;
}

.btn-danger:hover {
  background: #b91c1c;
}

/* === MODAL === */
.modal-content.large-modal {
  max-width: 700px;
}

.modal-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === MODAL POZNÁMKY === */
.note-modal {
  max-width: 480px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  padding: 30px;
  animation: fadeInScale 0.25s ease;
}

.note-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.note-modal .modal-header h2 {
  font-size: 1.3rem;
  margin: 0;
  color: #111827;
}

.note-modal .close-modal {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #9ca3af;
  transition: color 0.2s ease;
}

.note-modal .close-modal:hover {
  color: #374151;
}

.note-modal .note-text-intro {
  color: #4b5563;
  font-size: 1rem;
  margin-bottom: 10px;
}

.note-modal textarea {
  width: 100%;
  height: 100px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 12px;
  font-size: 0.95rem;
  resize: none;
  transition: all 0.2s ease;
}

.note-modal textarea:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
  outline: none;
}

.note-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* === HLAVNÍ OBAL === */
.training-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  margin: 2rem auto;
  max-width: 1100px;
}

/* === DVOJITÉ ŘADY === */
.training-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

/* === BOXY === */
.training-card {
  width: 300px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 2rem 1.5rem;
  text-align: center;
  color: #111827;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.training-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Barvy ikon */
.add-training .training-icon { background: #22c55e; }
.manual-training .training-icon { background: #6366f1; }
.plans-card .training-icon { background: #facc15; color: #111; }
.history-card .training-icon { background: #3b82f6; }
.progress-card .training-icon { background: #fb923c; }

/* === TEXT === */
.training-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.training-card p {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 1.4rem;
}

/* === TLAČÍTKA === */
.btn-white {
  background: #fff;
  color: #111827;
  border: none;
  font-weight: 600;
  padding: 0.5rem 1.3rem;
  border-radius: 10px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
}
.btn-white:hover {
  background: #f3f4f6;
  transform: scale(1.05);
}

/* === RESPONSIVE === */
@media (max-width: 700px) {
  .training-row {
    flex-direction: column;
    align-items: center;
  }
}

.training-icon {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 1.4rem auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  background: #ccc;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  overflow: hidden;
  transition: all 0.25s ease;
}

/* 💡 sjednocený střed – pseudo-element zajistí dokonalé vycentrování */
.training-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 70%);
  z-index: 0;
}

/* samotná ikona */
.training-icon i {
  position: relative;
  z-index: 1;
  font-size: 30px;
  transform: translateY(2px); /* optické doladění všech ikon */
}

/* efekty */
.training-icon:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
}

/* Barvy */
.add-training .training-icon { background: linear-gradient(145deg, #22c55e, #16a34a); }
.manual-training .training-icon { background: linear-gradient(145deg, #6366f1, #4f46e5); }
.plans-card .training-icon { background: linear-gradient(145deg, #facc15, #eab308); color: #111; }
.history-card .training-icon { background: linear-gradient(145deg, #3b82f6, #2563eb); }
.progress-card .training-icon { background: linear-gradient(145deg, #fb923c, #f97316); }

#viewPlanContent h3, #viewPlanContent h4 {
  text-align: center;
}

.exercise-list {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exercise-list .exercise-row {
  background: rgba(255,255,255,0.15);
  padding: 10px 14px;
  border-radius: 10px;
  transition: background 0.2s;
}

.exercise-list .exercise-row:hover {
  background: rgba(255,255,255,0.25);
}

.workout-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 25px;
}

.workout-actions .btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #10b981;
  color: white;
}
.btn-primary:hover {
  background: #059669;
}

.btn-warning {
  background: #facc15;
  color: #111827;
}
.btn-warning:hover {
  background: #eab308;
}

.btn-danger {
  background: #ef4444;
  color: white;
}
.btn-danger:hover {
  background: #dc2626;
}

#editWorkoutModal.active,
#detailsModal.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

#editWorkoutModal .modal-content {
  max-width: 800px;
  width: 90%;
  border-radius: 16px;
  background: white;
  overflow-y: auto;
  max-height: 90vh;
}

.edit-workout-modal input,
.edit-workout-modal textarea {
  width: 100%;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 8px 200px;
}

#editWorkoutForm {
  margin-top: 20px;
}

.edit-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

#toastContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  color: white;
  font-size: 0.95rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.35s ease;
  backdrop-filter: blur(8px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast i {
  font-size: 1.2rem;
}

.exercise-suggestions div {
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.exercise-suggestions div:hover {
  background: #10b9811a;
}

.exercise-suggestions {
  background: white;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  overflow: hidden;
}

.exercise-suggestions {
  background: rgba(16,185,129,0.08);
}

.autocomplete-suggestions {
  background: white;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  overflow: hidden;
}

.autocomplete-suggestions .suggestion-item:hover {
  background: rgba(16,185,129,0.08);
}

.autocomplete-suggestions {
  position: absolute;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  overflow-y: auto;
  max-height: 240px;
  z-index: 9999;
  backdrop-filter: blur(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  opacity: 0;
  transform: translateY(-2px);
}

/* při zobrazení */
.autocomplete-suggestions.active {
  opacity: 1;
  transform: translateY(0);
}

/* položky */
.autocomplete-suggestions .suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: background 0.15s;
}

.autocomplete-suggestions .suggestion-item strong {
  font-size: 0.95rem;
  color: #111;
}

.autocomplete-suggestions .suggestion-item:hover {
  background: rgba(16,185,129,0.08);
}

/* === mobilní přizpůsobení === */
@media (max-width: 768px) {
  .autocomplete-suggestions {
    width: 90vw !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(0);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    max-height: 60vh;
  }
}

.modal-content {
  position: relative; /* důležité, aby autocomplete měl správný kontext */
}

.autocomplete-suggestions {
  background: white;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  overflow-y: auto;
  max-height: 240px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.autocomplete-suggestions.active {
  opacity: 1;
  transform: translateY(0);
}

.autocomplete-suggestions .suggestion-item:hover {
  background: rgba(16,185,129,0.08);
}

/* 📱 Mobilní přizpůsobení */
@media (max-width: 768px) {
  .autocomplete-suggestions {
    width: 90vw !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(0);
    border-radius: 12px;
    max-height: 60vh;
  }
}
.modal-content {
  position: relative;
  overflow-y: auto;
  scroll-behavior: smooth;
}

/* === Autocomplete fix pro mobily === */
@media (max-width: 768px) {
  .modal-content {
    position: fixed !important; /* místo transform: translate */
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
  }

  .autocomplete-suggestions {
    position: fixed !important; /* pevné pozicování k obrazovce */
    left: 50% !important;
    transform: translateX(-50%) translateY(0);
    width: 90vw !important;
    max-height: 60vh;
    border-radius: 12px;
    z-index: 10000;
  }
}

.autocomplete-suggestions {
  position: fixed !important;
  max-width: 95vw;
  border-radius: 8px;
  background: #fff;
  overflow-y: auto;
  z-index: 10000;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .autocomplete-suggestions {
    left: 2.5vw !important;
    width: 95vw !important;
  }
}
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background-color: #111827; /* nebo barva pozadí aplikace */
}
.modal-overlay {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: none;
  box-shadow: none;
  overflow: hidden;
}

html, body {
  background-color: #111827; /* stejné jako pozadí dashboardu */
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-transform: translateZ(0); /* ✅ vynutí jeden compositing layer */
  transform: translateZ(0);
}

.modal-overlay,
.autocomplete-suggestions {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #111827; /* stejná barva jako pozadí */
  z-index: 999999;
  pointer-events: none;
}

/* 🔧 Fix pruhů kolem inputů (Chrome subpixel bug) */
.modal-content input,
.modal-content select,
.modal-content textarea {
  outline: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: none;
  background-color: #fff;
  position: relative;
  z-index: 0;
  will-change: auto;
}

/* 🔧 Upravuje i autocomplete, aby nezasahoval do inputu */
.autocomplete-suggestions {
  border: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  background: #fff;
  margin-top: 2px;
  z-index: 9999;
}

.autocomplete-suggestions div {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.autocomplete-suggestions div:last-child {
  border-bottom: none;
}

.training-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
  justify-items: center;
}

.plan-card {
  position: relative;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,0.14), rgba(255,255,255,0.08));
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  padding: 2.2rem 1.8rem;
  text-align: center;
  transition: all 0.35s ease;
}

.plan-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 14px 40px rgba(0,0,0,0.18);
}

.plan-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #16a34a);
  box-shadow: 0 5px 12px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.plan-card:hover .plan-icon {
  transform: rotate(10deg) scale(1.1);
}

.plan-card h3 {
  font-size: 1.4rem;
  color: #111827;
  margin-bottom: 0.3rem;
}

.plan-card p {
  color: #6b7280;
  font-size: 0.95rem;
  margin-bottom: 1.4rem;
}

.plan-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  z-index: 1000;
  list-style: none;
  padding: 4px 0;
  margin: 4px 0 0;
  max-height: 180px;
  overflow-y: auto;
}

.search-results li {
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.search-results li:hover {
  background: #f0f0f0;
}

.search-results .no-results {
  opacity: 0.6;
  text-align: center;
}

.sidebar-avatar {
  position: relative;
  width: 55px;
  height: 55px;
}

.sidebar-xp-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 55px;
  height: 55px;
  transform: rotate(-90deg);
}

.sidebar-xp-ring .xp-bg {
  fill: none;
  stroke: #1f2937;
  stroke-width: 4;
}

.sidebar-xp-ring .xp-progress {
  fill: none;
  stroke: url(#sidebarXPGradient);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 163.36; /* 2πr for r=26 */
  stroke-dashoffset: 163.36;
  transition: stroke-dashoffset 1s ease-in-out;
  animation: xpPulseSmall 2.5s infinite ease-in-out;
}

@keyframes xpPulseSmall {
  0%, 100% { filter: drop-shadow(0 0 0px #22c55e); }
  50% { filter: drop-shadow(0 0 4px #22c55e); }
}

.profile-img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  top: 5px;
  left: 5px;
  border: 2px solid #111827;
  cursor: pointer;
}

/* === GRID === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

/* === KARTA CVIKU === */
.exercise-card {
  background: linear-gradient(145deg, #f9fafb, #f3f4f6);
  border-radius: 20px;
  padding: 1.8rem;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  border: 2px solid transparent;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* === HOVER EFEKT === */
.exercise-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 10px 25px rgba(22,197,94,0.2);
  border-color: #22c55e;
}

/* === TITULEK CVIKU === */
.exercise-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
  color: #111827;
  font-weight: 700;
}

/* === TEXTY === */
.exercise-card p {
  margin: 0.4rem 0;
  font-size: 1rem;
  color: #374151;
}

/* === PROGRESS BAR PODLE ZMĚNY === */
.exercise-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 6px;
  width: 0%;
  background: linear-gradient(to right, #22c55e, #3b82f6);
  border-radius: 0 0 20px 20px;
  transition: width 1.2s ease-in-out;
}

.exercise-card.visible::after {
  width: var(--progress);
}

/* === BUTTON === */
.exercise-card .btn {
  margin-top: 1.2rem;
  width: 100%;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(34,197,94,0.25);
}
/* === Tréninky hlavní stránka (opravené barvy a styl karet) === */
.training-main-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  text-align: center;
  color: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  backdrop-filter: blur(6px);
}

.training-main-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.12);
}

.training-main-card h3 {
  font-size: 1.3rem;
  margin-top: 0.8rem;
  margin-bottom: 0.4rem;
  color: #fff;
}

.training-main-card p {
  opacity: 0.85;
  font-size: 0.95rem;
  line-height: 1.4;
}

.training-main-card .btn {
  margin-top: 1rem;
}

/* ✅ Barevné ikonky zůstávají s gradientem */
.training-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 10px;
  color: white;
  font-size: 1.8rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gradient-green   { background: linear-gradient(135deg, #34d399, #10b981); }
.gradient-purple  { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.gradient-yellow  { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.gradient-orange  { background: linear-gradient(135deg, #f97316, #ea580c); }

/* ✅ Rozložení */
.training-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
}

/* === Rozložení karet na stránce Tréninky === */
.training-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

/* každý řádek = 2 karty vedle sebe */
.training-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 950px; /* zarovnání na střed */
  justify-content: center;
}

/* samotná karta */
.training-main-card {
  flex: 1;
  min-width: 280px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2rem;
  color: white;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.training-main-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-icon {
  background: #10b981;
  border: none;
  color: white;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  margin-left: 10px;
  cursor: pointer;
  transition: 0.2s;
}
.btn-icon:hover {
  background: #059669;
  transform: rotate(30deg);
}

.settings-section {
  margin-bottom: 1.5rem;
}
.setting-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.theme-options {
  display: flex;
  gap: 1.5rem;
}

/* 🔧 Tlačítko nastavení v profilu */
.btn-settings {
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 50px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: all 0.25s ease;
  cursor: pointer;
  top: 25px;
  right: 30px;
}

.btn-settings i {
  font-size: 1.1rem;
}

.btn-settings:hover {
  background: #0ea370;
  transform: rotate(25deg) scale(1.05);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

/* 🌿 ZÁKLADNÍ NASTAVENÍ */
.profile-page {
  font-family: 'Poppins', sans-serif;
}

.profile-container {
  max-width: 1100px;
  margin: 4rem auto;
  background: #fff;
  border-radius: 30px;
  padding: 3rem 4rem;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
  animation: fadeIn 0.6s ease;
  margin-left: 350px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 🧍 PROFIL HLAVIČKA */
.profile-top {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 3rem;
  padding: 2rem 0 3rem;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
  padding-bottom: 75px;
}

.btn-settings {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #444;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn-settings:hover {
  transform: rotate(30deg);
}

/* 🧬 XP RING + AVATAR */
.avatar-wrapper {
  flex: 0 0 260px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.xp-ring {
  position: relative;
  width: 180px;
  height: 180px;
}

.xp-circle {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
}

.xp-bg {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 10;
}

.xp-progress {
  fill: none;
  stroke: url(#xpGradient);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 452.39;
  stroke-dashoffset: 452.39;
  transition: stroke-dashoffset 1.2s ease-in-out;
  animation: xpPulse 2.2s infinite ease-in-out;
}

@keyframes xpPulse {
  0%, 100% { filter: drop-shadow(0 0 0px #22c55e); }
  50% { filter: drop-shadow(0 0 6px #22c55e); }
}

.xp-ring img {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 152px;
  height: 152px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}

.xp-center {
  position: absolute;
  bottom: -50px;
  width: 100%;
  text-align: center;
  font-weight: 600;
}

.xp-center h3 { margin: 0; font-size: 1.4rem; }
.xp-center span { font-size: 1rem; color: #555; }

/* 🧾 DETAILY UŽIVATELE */
.user-details {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

.user-details h1 {
  font-size: 2.4rem;
  margin: 0;
}

.user-details .email {
  color: #6b7280;
  font-size: 1.05rem;
}

.btn.edit-btn {
  align-self: flex-start;
  margin-top: 1.2rem;
  background: #22c55e;
  color: white;
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(34,197,94,0.35);
}

.btn.edit-btn:hover {
  background: #16a34a;
  transform: translateY(-2px);
}

/* 🧮 STATISTIKY */
.profile-stats {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.stat-card {
  background: #f9fafb;
  border-radius: 20px;
  padding: 1.8rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

/* 🏆 ACHIEVEMENTY */
.achievements-section {
  margin-top: 4rem;
  text-align: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 2.5rem;
}

.achievements-section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.8rem;
}

.no-achievements {
  color: #6b7280;
  font-size: 1.1rem;
  font-style: italic;
}

/* 🎨 MODAL OKNA */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  color: #111;
  animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 🧍‍♂️ AVATAR UPLOAD */
.avatar-upload {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow: 0 3px 15px rgba(0,0,0,0.15);
}

.avatar-upload:hover { transform: scale(1.04); }

.avatar-upload img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.avatar-upload:hover .avatar-overlay { opacity: 1; }
.avatar-overlay i { font-size: 1.4rem; margin-bottom: 0.3rem; }

/* 🖼️ POZADÍ V NASTAVENÍ */
.background-preview {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  cursor: pointer;
}

.background-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
  border-radius: 16px;
}

.background-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0);
  color: #fff;
  font-size: 2rem;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.background-preview:hover img { filter: brightness(0.5); }
.background-preview:hover .background-overlay {
  background: rgba(0, 0, 0, 0.4);
  opacity: 1;
  pointer-events: all;
}

.background-overlay i { font-size: 1.8rem; margin-bottom: 5px; }
.background-overlay span { font-size: 0.9rem; opacity: 0.9; }

/* 📱 RESPONSIVITA */
@media (max-width: 900px) {
  .profile-container {
    margin: 2rem auto;
    padding: 2rem;
  }

  .user-details h1 { font-size: 2rem; }
  .xp-ring { width: 150px; height: 150px; }
}

@media (max-width: 600px) {
  .profile-container {
    padding: 1.5rem;
    border-radius: 20px;
  }

  .profile-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }

  .user-details h1 {
    font-size: 1.8rem;
  }

  .btn.edit-btn {
    align-self: center;
  }

  .profile-stats {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stat-card {
    font-size: 1rem;
    padding: 1.2rem;
  }

  .achievements-section h2 {
    font-size: 1.3rem;
  }

  .background-preview {
    height: 150px;
  }
}

.xp-ring {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto;
}

.xp-ring img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

@media (max-width: 600px) {
    .xp-ring {
        width: 130px;
        height: 130px;
    }

    .xp-ring img {
        width: 75px;
        height: 75px;
    }

    .xp-circle {
        transform: scale(0.82); /* krásné optické vyrovnání */
        transform-origin: center;
    }
}

@media (max-width: 600px) {

    .profile-top {
        margin-top: 1rem !important;
        padding-top: 0 !important;
    }

    .avatar-wrapper {
        margin-top: 0 !important;
    }

    .profile-container {
        padding-top: 0 !important;
    }
}

/* Zabránění nechtěným transformacím SVG */
.xp-ring svg {
    transform: none !important;
}

/* === 🧊 MODALY (upravené pro lepší vzhled) === */
.modal-content {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  color: #111;
  animation: fadeInModal 0.3s ease;
  max-width: 600px;
  width: 95%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Nadpis + header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.close-modal {
  background: none;
  border: none;
  color: #555;
  font-size: 1.8rem;
  cursor: pointer;
  transition: 0.2s;
}

.close-modal:hover {
  color: #000;
  transform: scale(1.1);
}

/* Sekce nastavení */
.settings-section {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: background 0.2s ease;
}

.settings-section:hover {
  background: rgba(255, 255, 255, 0.35);
}

.settings-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
}

/* Barevné téma a zvuky */
.theme-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.theme-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.25);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.theme-options label:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.03);
}

/* Pozadí aplikace */
.background-preview-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.background-preview {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.25s ease;
}

.background-preview:hover {
  transform: scale(1.02);
}

.background-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  transition: filter 0.3s ease;
}

.background-preview:hover img {
  filter: brightness(0.5);
}

.background-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1.8rem;
  font-weight: 600;
  opacity: 0;
  background: rgba(0, 0, 0, 0);
  transition: all 0.3s ease;
}

.background-preview:hover .background-overlay {
  background: rgba(0, 0, 0, 0.35);
  opacity: 1;
}

.background-overlay span {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 4px;
}

/* Tlačítka ve footru */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 1rem;
}

.modal-footer .btn {
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: 0.2s ease;
}

.modal-footer .btn-primary {
  background: linear-gradient(135deg, #10b981, #22c55e);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.modal-footer .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.35);
}

.modal-footer .btn-secondary {
  background: rgba(255, 255, 255, 0.8);
  color: #111;
}

.modal-footer .btn-secondary:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

/* Lepší spacing uvnitř formuláře */
#settingsForm {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* === 🧍‍♂️ MODAL UPRAVIT PROFIL === */
#editProfileModal .modal-content {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  color: #111;
  animation: fadeInModal 0.3s ease;
  max-width: 600px;
  width: 95%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#editProfileModal h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

#editProfileForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#editProfileForm .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#editProfileForm label {
  font-weight: 600;
  font-size: 1rem;
}

#editProfileForm input,
#editProfileForm select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  transition: all 0.2s ease;
}

#editProfileForm input:focus,
#editProfileForm select:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* Avatar náhled */
#editProfileModal .centered-avatar {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

#editProfileModal .avatar-upload {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease;
  box-shadow: 0 3px 15px rgba(0,0,0,0.15);
}

#editProfileModal .avatar-upload:hover {
  transform: scale(1.05);
}

#editProfileModal .avatar-upload img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

#editProfileModal .avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#editProfileModal .avatar-upload:hover .avatar-overlay {
  opacity: 1;
}

#editProfileModal .avatar-overlay i {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

/* Tlačítka */
#editProfileModal .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 1rem;
}

#editProfileModal .modal-actions .btn {
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

#editProfileModal .btn-primary {
  background: linear-gradient(135deg, #10b981, #22c55e);
  color: white;
}

#editProfileModal .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(34,197,94,0.4);
}

#editProfileModal .btn-secondary {
  background: rgba(255,255,255,0.8);
  color: #111;
}

#editProfileModal .btn-secondary:hover {
  background: white;
  transform: translateY(-2px);
}

/* 📱 Responsivita */
@media (max-width: 600px) {
  #editProfileModal .modal-content {
    padding: 1.5rem;
  }

  #editProfileForm label {
    font-size: 0.95rem;
  }

  #editProfileModal h2 {
    font-size: 1.3rem;
  }

  #editProfileModal .avatar-upload {
    width: 100px;
    height: 100px;
  }
}
/* === 🌬️ Elegantní scrollbar pro modaly === */
#settingsModal form,
#editProfileModal form {
  overflow-y: auto;
  max-height: 75vh;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}

/* --- Chrome, Edge, Safari --- */
#settingsModal form::-webkit-scrollbar,
#editProfileModal form::-webkit-scrollbar {
  width: 8px;
}

#settingsModal form::-webkit-scrollbar-track,
#editProfileModal form::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

#settingsModal form::-webkit-scrollbar-thumb,
#editProfileModal form::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34,197,94,0.6), rgba(59,130,246,0.6));
  border-radius: 10px;
  transition: background 0.3s ease;
}

#settingsModal form::-webkit-scrollbar-thumb:hover,
#editProfileModal form::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(34,197,94,0.8), rgba(59,130,246,0.8));
}

/* 🌑 Tmavé pozadí */
body.dark-bg {
  color: #f2f2f2;
}

body.dark-bg .card,
body.dark-bg .profile-container,
body.dark-bg .modal-content {
  background: rgba(0, 0, 0, 0.4);
  color: #f5f5f5;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

body.dark-bg .btn {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

body.dark-bg .btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ☀️ Světlé pozadí */
body.light-bg {
  color: #111;
}

body.light-bg .card,
body.light-bg .profile-container,
body.light-bg .modal-content {
  background: rgba(255, 255, 255, 0.6);
  color: #111;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

body.light-bg .btn {
  background: rgba(0, 0, 0, 0.05);
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-bg .btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

body {
  transition: color 0.3s ease, background-color 0.3s ease, background-image 0.6s ease;
}

body.dark-bg, body.light-bg {
  transition: all 0.5s ease-in-out;
}

.diet-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.diet-section h3 {
  margin-bottom: 20px;
  font-weight: 600;
  color: white;
}

.diet-section .macro-row {
  display: flex;
  gap: 10px;
}

.diet-section .macro-row > div {
  flex: 1;
  margin-top: 15px;
}

/* === 🌫️ Průhledný univerzální modal overlay === */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.45); /* poloprůhledné pozadí */
  backdrop-filter: blur(6px);       /* jemné rozostření za modalem */
  z-index: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}

/* Aktivní modal */
.modal-overlay.active {
  display: flex;
  opacity: 1;
}

/* === 💎 Průhledné tělo modalu === */
.modal-content {
  background: rgba(255, 255, 255, 0.08); /* průhledný skleněný efekt */
  backdrop-filter: blur(15px) saturate(150%);
  border-radius: 16px;
  padding: 1.8rem 2rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  overflow-y: auto;
  color: #fff; /* pro tmavé pozadí */
  transition: all 0.3s ease;
}

/* Pokud používáš velké modaly */
.modal-content.large-modal {
  width: 90%;
  max-width: 950px;
}

/* Malé modaly */
.modal-content.small-modal {
  width: 400px;
  max-width: 95%;
}

body .modal-overlay {
  background: rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: blur(6px) !important;
  z-index: 9999 !important;
}

body .modal-content,
body .add-food-modal {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(15px) saturate(150%) !important;
  color: #fff !important;
}

/* 🧊 Vylepšení viditelnosti obsahu v glass modal okně */
.modal-content, 
.add-food-modal {
  background: rgba(30, 30, 30, 0.7); /* tmavší průhledné pozadí */
  backdrop-filter: blur(20px) saturate(180%);
  color: black;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Karty s potravinami */
.food-item, 
.food-result, 
.search-results li {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: black;
  padding: 10px;
  transition: background 0.2s ease;
}

/* Hover efekt */
.food-item:hover, 
.food-result:hover, 
.search-results li:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Inputy uvnitř modalu */
.modal-content input,
.modal-content select,
.modal-content textarea {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: black;
}

.modal-content input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Sekce s přidanými potravinami */
.added-foods, 
.selected-items {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  color: black;
}

/* === 🌿 Lepší čitelnost inputů a selectů v glass modalu === */
.add-food-modal input[type="text"],
.add-food-modal input[type="number"],
.add-food-modal select {
  background: rgba(255, 255, 255, 0.25); /* mléčné pozadí */
  color: black;                       /* bílý text */
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
}

/* Placeholder text */
.add-food-modal input::placeholder {
  color: black;
}

/* Hover & Focus efekty */
.add-food-modal input:focus,
.add-food-modal select:focus {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 8px rgba(0, 255, 150, 0.35);
}

/* 🌞 světlý (výchozí) režim – jen pro jistotu */
body.theme-default {
  background: linear-gradient(
    135deg,
    rgb(181, 243, 211) 0%,
    rgb(19, 211, 122) 100%
  ) !important;
  background-size: cover;
  background-attachment: fixed;
}

/* 🌚 tmavý režim – černo-zelené pozadí */
body.theme-dark {
  background: radial-gradient(circle at top left, #16a34a 0%, #66ff99 5%, #020617 100%) !important;
  background-size: cover;
  background-attachment: fixed;
}

/* === DARK THEME – GLOBAL === */
.theme-dark {
    --bg-main: #0f172a;
    --bg-card: rgba(17, 24, 39, 0.7);
    --text-main: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent: #22c55e;
    --border-color: rgba(255,255,255,0.1);
}

.theme-dark .card,
.theme-dark .white-border,
.theme-dark .training-card,
.theme-dark .workout-card,
.theme-dark .modal-content {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

.theme-dark input,
.theme-dark select,
.theme-dark textarea {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.theme-dark .sidebar {
    background: linear-gradient(180deg, #000000, #0f172a);
}

/* =========================================================
   ACHIEVER – DARK THEME (PRO EDITION)
   Aktivuje se přes: <body class="theme-dark">
   ========================================================= */

/* === GLOBAL BASE === */
.theme-dark {
    --bg-main: #0e131a;
    --bg-card: rgba(15, 23, 42, 0.75); /* dark navy w/ glass effect */
    --bg-card-solid: #111827;
    --text-main: #e5e7eb; /* light gray */
    --text-secondary: #9ca3af;
    --accent: #22c55e; /* Achiever green */
    --accent-blue: #3b82f6;
    --border-light: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.15);
    --input-bg: rgba(255,255,255,0.06);
    --input-border: rgba(255,255,255,0.15);
}

/* === BODY / PAGE BG === */
.theme-dark {
    background: linear-gradient(135deg, #05070b, #073121) !important;
    color: var(--text-main);
}

/* === TEXT === */
.theme-dark h1,
.theme-dark h2,
.theme-dark h3,
.theme-dark h4,
.theme-dark h5,
.theme-dark p,
.theme-dark label,
.theme-dark span,
.theme-dark strong {
    color: var(--text-main) !important;
}

.theme-dark .email {
    color: var(--text-secondary) !important;
}

/* === SIDEBAR === */
.theme-dark .sidebar {
    background: linear-gradient(180deg, #000000, #0a0f15);
    border-right: 1px solid var(--border-light);
}

.theme-dark .menu a {
    color: var(--text-secondary);
}

.theme-dark .menu a.active {
    color: var(--accent);
    background: rgba(34, 197, 94, 0.12);
}

/* === TOPBAR (mobile) === */
.theme-dark .mobile-topbar {
    background: rgba(0,0,0,0.6);
    color: var(--text-main);
}

/* === CARDS (Dashboard / Tréninky / Jídelníček) === */
.theme-dark .card,
.theme-dark .stat-card,
.theme-dark .summary-box,
.theme-dark .exercise-card,
.theme-dark .workout-card,
.theme-dark .food-item,
.theme-dark .food-card,
.theme-dark .training-card {
    background: var(--bg-card) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light) !important;
    color: var(--text-main) !important;
}

/* === BUTTONS === */
.theme-dark .btn-primary {
    background: var(--accent);
    color: #000;
}

.theme-dark .btn-secondary {
    background: rgba(255,255,255,0.08);
    color: var(--text-main);
    border: 1px solid var(--border-light);
}

.theme-dark .btn-danger {
    background: #dc2626;
    color: white;
}

/* === INPUTS === */
.theme-dark input,
.theme-dark select,
.theme-dark textarea {
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--input-border);
}

.theme-dark input::placeholder,
.theme-dark textarea::placeholder {
    color: var(--text-secondary);
}

/* === MODALS === */
.theme-dark .modal-content {
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid var(--border-light);
    backdrop-filter: blur(12px);
}

.theme-dark .modal-header,
.theme-dark .modal-footer {
    border-color: var(--border-light) !important;
}

/* === SEARCH RESULTS === */
.theme-dark .search-wrapper ul.search-results {
    background: rgba(0,0,0,0.8);
    border: 1px solid var(--border-strong);
}

.theme-dark .search-results li {
    color: var(--text-main);
}

.theme-dark .search-results li:hover {
    background: rgba(34, 197, 94, 0.15);
}

/* === JÍDELNÍČEK SPECIFICKY === */
.theme-dark .food-input,
.theme-dark .food-amount input,
.theme-dark .meal-card {
    background: var(--bg-card);
    border-color: var(--border-strong);
    color: var(--text-main);
}

/* === ACHIEVEMENTS SECTION === */
.theme-dark .achievements-section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
}

/* === XP RINGS === */
.theme-dark .xp-bg {
    stroke: rgba(255,255,255,0.1);
}

.theme-dark .xp-progress {
    stroke: url(#xpGradient);
}

/* === SCROLLBAR === */
.theme-dark ::-webkit-scrollbar {
    width: 10px;
}

.theme-dark ::-webkit-scrollbar-thumb {
    background: rgba(34, 197, 94, 0.4);
    border-radius: 10px;
}

.theme-dark ::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

/* === DARK THEME – GLOBÁLNÍ NASTAVENÍ === */

body.theme-dark {
  /* černo-zelený gradient, !important kvůli inline stylu z PHP */
  background: linear-gradient(135deg, #020617, #064e3b) !important;
  color: #e5e7eb;
}

/* top texty */
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark h5,
body.theme-dark h6 {
  color: #e5e7eb;
}

body.theme-dark p,
body.theme-dark span,
body.theme-dark li {
  color: #cbd5f5;
}

/* SIDEBAR už má tmavé barvy, jen lehce doladíme */
body.theme-dark .sidebar {
  background: linear-gradient(180deg, #020617 0%, #020617 100%);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.7);
}

body.theme-dark .mobile-topbar {
  background: linear-gradient(180deg, #020617 0%, #020617 100%);
  border-bottom-color: rgba(15, 23, 42, 0.8);
}

/* obsah dashboardu */
body.theme-dark .modern-dashboard {
  color: #e5e7eb;
}

/* hlavička dashboardu */
body.theme-dark .dashboard-header h1 {
  color: #e5e7eb;
}

body.theme-dark .dashboard-header p {
  color: #9ca3af;
}

/* základní karty – místo bílé hezký tmavý panel */
body.theme-dark .card,
body.theme-dark .card.white-border,
body.theme-dark .training-card,
body.theme-dark .workout-card,
body.theme-dark .summary-box,
body.theme-dark .history-filters,
body.theme-dark .workout-detail-info,
body.theme-dark .workout-notes,
body.theme-dark .exercise-detail,
body.theme-dark .exercise-row,
body.theme-dark .workout-summary,
body.theme-dark .meal-summary {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.55);
}

/* levý zelený proužek u workout-card necháme, jen text ztmavíme */
body.theme-dark .workout-card h3 {
  color: #bbf7d0;
}

body.theme-dark .workout-card p {
  color: #cbd5f5;
}

/* white-border karta – ať už není bílá */
body.theme-dark .card.white-border {
  background: rgba(15, 23, 42, 0.96);
  border-color: #22c55e;
  color: #e5e7eb;
}

body.theme-dark .card.white-border h2,
body.theme-dark .card.white-border strong {
  color: #bbf7d0;
}

body.theme-dark .modal-content,
body.theme-dark .modal-content.large-modal,
body.theme-dark .modal-content.medium-modal,
body.theme-dark #exerciseModal .modal-content,
body.theme-dark #workoutDetailModal .modal-content,
body.theme-dark .live-training-modal {
  background: linear-gradient(135deg, #020617 0%, #0b1120 100%);
  border-color: rgba(34, 197, 94, 0.5);
  color: #e5e7eb;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75);
}

/* hlavičky v modalech */
body.theme-dark .modal-header,
body.theme-dark .workout-detail-header {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(55, 65, 81, 0.8);
}

/* poznámky v modalu */
body.theme-dark .workout-notes {
  background: rgba(250, 204, 21, 0.06);
  border-color: rgba(250, 204, 21, 0.4);
  color: #facc15;
}

body.theme-dark input[type="text"],
body.theme-dark input[type="number"],
body.theme-dark input[type="email"],
body.theme-dark input[type="password"],
body.theme-dark input[type="date"],
body.theme-dark input[type="time"],
body.theme-dark textarea,
body.theme-dark select {
  background: #020617;
  color: #e5e7eb;
  border: 1px solid #1f2937;
}

body.theme-dark input[type="text"]::placeholder,
body.theme-dark input[type="number"]::placeholder,
body.theme-dark input[type="email"]::placeholder,
body.theme-dark input[type="password"]::placeholder,
body.theme-dark input[type="date"]::placeholder,
body.theme-dark input[type="time"]::placeholder,
body.theme-dark textarea::placeholder {
  color: #6b7280;
}

/* focus efekt – zelený outline i v dark režimu */
body.theme-dark input:focus,
body.theme-dark textarea:focus,
body.theme-dark select:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4);
  outline: none;
}

body.theme-dark .history-filters {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(55, 65, 81, 0.8);
}

body.theme-dark .history-filters label {
  color: #e5e7eb;
}

body.theme-dark .history-filters input[type="date"] {
  background: #020617;
  color: #e5e7eb;
  border-color: #1f2937;
}

body.theme-dark .summary-box {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(34, 197, 94, 0.6);
}

body.theme-dark .summary-box h4 {
  color: #bbf7d0;
}

body.theme-dark .summary-box p {
  color: #22c55e;
}

body.theme-dark .timer-wrapper {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(31, 41, 55, 0.9);
}

body.theme-dark .timer-box {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(31, 41, 55, 0.9);
}

body.theme-dark .timer-display,
body.theme-dark .timer-display.small {
  color: #4ade80;
}

body.theme-dark .timer-hint {
  color: #9ca3af;
}

body.theme-dark .btn-white,
body.theme-dark .btn.btn-secondary {
  background: #111827;
  color: #e5e7eb;
  border-color: #374151;
}

body.theme-dark .btn-white:hover,
body.theme-dark .btn.btn-secondary:hover {
  background: #1f2937;
}

/* 🌑 1) INPUTY v modalech – moc světlé → dáme tmavé */
.theme-dark .modal-content input,
.theme-dark .modal-content select,
.theme-dark .modal-content textarea {
    background: rgba(20, 20, 30, 0.9) !important;
    color: #e8e8e8 !important;
    border: 1px solid rgba(110, 255, 180, 0.4) !important;
}

.theme-dark .modal-content input::placeholder,
.theme-dark .modal-content textarea::placeholder {
    color: rgba(200, 200, 200, 0.4) !important;
}

/* 🌑 2) Seznam potravin – ztmavení položek */
.theme-dark .food-item {
    background: rgba(20, 20, 30, 0.8) !important;
    border: 1px solid rgba(80, 255, 180, 0.2) !important;
}

.theme-dark .food-item:hover {
    background: rgba(40, 40, 60, 0.9) !important;
}

/* 🌑 3) Vybrané potraviny (ty zelené světlé boxy) */
.theme-dark .selected-food-item {
    background: rgba(16, 30, 25, 0.8) !important;
    color: #e8e8e8 !important;
}

.theme-dark .selected-food-item .macro-summary {
    color: #90eeac !important;
}

/* 🌑 4) Cards – u jidelníčku, tréninku i dashboardu */
.theme-dark .meal-card,
.theme-dark .workout-card,
.theme-dark .stat-card {
    background: rgba(12, 18, 30, 0.85) !important;
    border: 1px solid rgba(0, 250, 140, 0.15) !important;
}

/* Hover efekt pro karty */
.theme-dark .meal-card:hover,
.theme-dark .workout-card:hover {
    background: rgba(20, 30, 45, 0.9) !important;
}

/* 🌑 5) Buttons - moc světlé texty */
.theme-dark .btn-primary {
    background: #10b981 !important;
    color: #ffffff !important;
}

.theme-dark .btn-secondary {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #eaeaea !important;
}

/* 🌑 6) Modal – glow fix */
.theme-dark .modal-content {
    background: rgba(10, 15, 25, 0.45) !important;
    box-shadow: 0 0 30px rgba(0, 255, 140, 0.15) !important;
    backdrop-filter: blur(12px) !important;
}

/* 🌑 7) Oddělovače – moc světlé */
.theme-dark hr,
.theme-dark .divider {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* 🌑 8) Dropdown fix (select menu) */
.theme-dark select {
    background: rgba(20, 20, 30, 0.9) !important;
    color: #f1f1f1 !important;
}

.theme-dark select option {
    background: #111827 !important;
    color: #e5e7eb !important;
}

/* 🌑 9) Makra v jídle – zesvětlení barvy */
.theme-dark .macro {
    color: #b6f2d1 !important;
}

/* 🌙 DARK MODE FIX – přebití inline světlých stylů */

/* ==== Date picker ==== */
.theme-dark .date-picker,
.theme-dark .modern-date-picker {
    background: rgba(10, 20, 30, 0.7) !important;
    border: 1px solid rgba(0, 255, 150, 0.15) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5) !important;
}

.theme-dark .date-arrow.big {
    background: rgba(20, 30, 40, 0.8) !important;
    border-color: rgba(0, 255, 150, 0.35) !important;
    color: #bfffe0 !important;
}

.theme-dark .large-date {
    background: rgba(20, 30, 40, 0.8) !important;
    color: #e5e5e5 !important;
    border-color: rgba(0, 255, 150, 0.3) !important;
}

/* ==== Summary sekce ==== */
.theme-dark .summary-section {
    background: rgba(10, 20, 30, 0.8) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4) !important;
}

.theme-dark .summary-card {
    background: rgba(20, 30, 40, 0.8) !important;
    color: #d4d4d4 !important;
    border: 1px solid rgba(0, 255, 150, 0.15) !important;
}

/* ==== Meal Cards ==== */
.theme-dark .meal-card {
    background: rgba(15, 25, 35, 0.9) !important;
    border: 1px solid rgba(0, 255, 150, 0.15) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.45) !important;
}

.theme-dark .meal-card:hover {
    background: rgba(25, 35, 45, 0.95) !important;
}

/* Název jídla / ikonka */
.theme-dark .meal-header h3,
.theme-dark .meal-header span {
    color: #e5e5e5 !important;
}

/* No items */
.theme-dark .no-items {
    color: #aaa !important;
}

/* === Mini kartičky potravin === */
.theme-dark .food-mini-card {
    background: rgba(20, 30, 40, 0.7) !important;
    border: 1px solid rgba(0, 255, 150, 0.15) !important;
}

.theme-dark .food-mini-info strong {
    color: #caffdd !important;
}

.theme-dark .food-mini-info small,
.theme-dark .food-macros {
    color: #9ae8c0 !important;
}

/* ==== Otevřít tlačítko ==== */
.theme-dark .btn-open {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
}

/* ==== Stats box (kcal / B / S / T pod kartou) ==== */
.theme-dark .meal-stats {
    background: rgba(20, 30, 40, 0.65) !important;
    color: #aaf5c8 !important;
}

/* ==========================
   🌙 DARK MODE – ADD FOOD MODAL
   ========================== */

.theme-dark .add-food-modal {
    background: rgba(15, 20, 30, 0.95) !important;
    border: 1px solid rgba(0, 255, 150, 0.15) !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6) !important;
    color: #e5e5e5 !important;
}

/* Header */
.theme-dark .add-food-modal .modal-header h2 {
    color: #d1ffe8 !important;
}

.theme-dark .add-food-modal .close-modal {
    color: #ccc !important;
}
.theme-dark .add-food-modal .close-modal:hover {
    color: #14ff9e !important;
}

/* Search bar */
.theme-dark #foodSearch {
    background: rgba(30, 40, 50, 0.6) !important;
    border: 1px solid rgba(0, 255, 150, 0.3) !important;
    color: #e6e6e6 !important;
}
.theme-dark #foodSearch::placeholder {
    color: rgba(255,255,255,0.5) !important;
}

/* Výsledky vyhledávání */
.theme-dark .food-results {
    background: rgba(20, 25, 35, 0.95) !important;
    border: 1px solid rgba(0,255,150,0.2) !important;
}
.theme-dark .food-item {
    background: rgba(25, 30, 40, 0.85) !important;
    border-bottom: 1px solid rgba(0,255,150,0.07) !important;
}
.theme-dark .food-item:hover {
    background: rgba(35, 45, 55, 0.8) !important;
}
.theme-dark .food-item .food-info {
    color: #e5e5e5 !important;
}
.theme-dark .food-item small {
    color: #9deec7 !important;
}

/* “Již přidané potraviny” box */
.theme-dark #existingContainer {
    background: rgba(20, 30, 40, 0.8) !important;
    border: 1px solid rgba(0,255,150,0.2) !important;
}
.theme-dark #existingContainer h3 {
    color: #c5ffe4 !important;
}

/* Každá existující položka */
.theme-dark .existing-item {
    background: rgba(25, 30, 40, 0.9) !important;
    border: 1px solid rgba(0,255,150,0.15) !important;
    color: #e8e8e8 !important;
}
.theme-dark .existing-item:hover {
    background: rgba(40, 50, 60, 0.9) !important;
}
.theme-dark .existing-item strong {
    color: #caffdd !important;
}
.theme-dark .existing-item small {
    color: #9deec7 !important;
}

/* Inputy uvnitř existujících potravin */
.theme-dark .existing-item input,
.theme-dark .existing-item select {
    background: rgba(20, 30, 40, 0.8) !important;
    border: 1px solid rgba(0,255,150,0.25) !important;
    color: #e8e8e8 !important;
}

/* Delete button */
.theme-dark .btn-delete-existing {
    background: rgba(80,0,0,0.4) !important;
    border: 1px solid rgba(255,80,80,0.4) !important;
    color: #ff9e9e !important;
}
.theme-dark .btn-delete-existing:hover {
    background: rgba(120,0,0,0.5) !important;
}

/* ------------------
   Vybrané položky (spodní sekce)
   ------------------ */
.theme-dark .selected-wrapper {
    border-top: 2px dashed rgba(0,255,150,0.3) !important;
}
.theme-dark .selected-header h3 {
    color: #d2ffe8 !important;
}
.theme-dark .selected-header .totals {
    color: #9deec7 !important;
}

/* Vybraná potravina */
.theme-dark .sel-row {
    background: rgba(20, 30, 40, 0.8) !important;
    border: 1px solid rgba(0,255,150,0.2) !important;
    color: #e8e8e8 !important;
}
.theme-dark .sel-row:hover {
    background: rgba(35, 45, 55, 0.85) !important;
}
.theme-dark .sel-row .meta strong {
    color: #caffdd !important;
}
.theme-dark .sel-row small {
    color: #9deec7 !important;
}

/* Inputs ve vybrané položce */
.theme-dark .sel-row input,
.theme-dark .sel-row select {
    background: rgba(20, 30, 40, 0.75) !important;
    border: 1px solid rgba(0,255,150,0.25) !important;
    color: #e8e8e8 !important;
}

/* G/ks box */
.theme-dark .g-per-piece span {
    color: #9deec7 !important;
}

/* Empty text */
.theme-dark .selected-empty {
    background: rgba(0,0,0,0.2) !important;
    border: 1px dashed rgba(0,255,150,0.25) !important;
    color: #cccccc !important;
}

/* Footer buttons */
.theme-dark .btn.btn-primary {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
}
.theme-dark .btn.btn-secondary {
    background: rgba(40, 50, 60, 0.8) !important;
    color: #e8e8e8 !important;
    border: 1px solid rgba(0,255,150,0.2) !important;
}
.theme-dark .btn.btn-secondary:hover {
    background: rgba(50,60,70,0.9) !important;
}

/* ==========================================
   🌙 DARK MODE — PROFIL PAGE
   ========================================== */

/* 🔳 Hlavní bílá karta (ta velká kolem celé sekce) */
.theme-dark .profile-container,
.theme-dark .profile-wrapper,
.theme-dark .profile-card,
.theme-dark .profile-header {
    background: rgba(15, 20, 30, 0.85) !important;
    border: 1px solid rgba(0, 255, 150, 0.12) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4) !important;
}

/* 🔹 Uživatelské jméno + email */
.theme-dark .profile-name,
.theme-dark .profile-email {
    color: #e7fdf1 !important;
}

/* 🔵 Level a XP text */
.theme-dark .profile-level,
.theme-dark .profile-xp {
    color: #a8ffd9 !important;
}

/* ⚙️ Nastavení */
.theme-dark .profile-settings-btn {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(0,255,150,0.15) !important;
    color: #d8fff0 !important;
}
.theme-dark .profile-settings-btn:hover {
    background: rgba(255,255,255,0.1) !important;
}

/* 🟩 Tlačítko Upravit profil */
.theme-dark .btn-edit-profile {
    background: #059669 !important;
    color: white !important;
    border: 1px solid rgba(0,255,150,0.25) !important;
}
.theme-dark .btn-edit-profile:hover {
    background: #047857 !important;
    transform: scale(1.03);
}

/* 📦 Statistické boxy (výška / váha / cíl) */
.theme-dark .stat-card {
    background: rgba(25, 32, 45, 0.9) !important;
    border: 1px solid rgba(0,255,150,0.15) !important;
    color: #e8e8e8 !important;
}
.theme-dark .stat-card h3,
.theme-dark .stat-card strong {
    color: #caffdd !important;
}

/* Achievements sekce */
.theme-dark .achievements-container {
    background: rgba(20, 26, 35, 0.85) !important;
    border: 1px solid rgba(0,255,150,0.15) !important;
    box-shadow: 0 6px 25px rgba(0,0,0,0.35) !important;
}
.theme-dark .achievements-title {
    color: #d8ffe9 !important;
}
.theme-dark .achievement-item {
    background: rgba(28, 36, 48, 0.9) !important;
    border: 1px solid rgba(0,255,150,0.15) !important;
    color: #e5e5e5 !important;
}

/* Ikonky */
.theme-dark .achievement-item i,
.theme-dark .stat-card i {
    color: #0df2a3 !important;
}

/* Divider (ten světlej proužek) */
.theme-dark .profile-divider {
    border-color: rgba(255,255,255,0.08) !important;
}

/* Kruh XP kolem avataru */
.theme-dark .xp-ring circle.xp-bg {
    stroke: rgba(255,255,255,0.05) !important;
}

/* ==========================================
   🌙 DARK MODE — MODAL HISTORIE TRÉNINKŮ
   ========================================== */

.theme-dark .training-history-modal,
.theme-dark .modal-history,
.theme-dark .modal-history-content {
    background: rgba(15, 20, 30, 0.85) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,255,150,0.12) !important;
    color: #e9ffee !important;
}

/* 🔹 Názvy cviků */
.theme-dark .exercise-title,
.theme-dark .history-exercise-name {
    color: #caffde !important;
    font-weight: 600 !important;
    text-shadow: 0 0 6px rgba(0,255,150,0.15);
}

/* 🔹 Sekundární text (typ cviku / stroj apod.) */
.theme-dark .exercise-subtext,
.theme-dark .history-exercise-type {
    color: #9fdcc1 !important;
    opacity: 0.9;
}

/* 🔳 Box jednotlivého cviku */
.theme-dark .history-exercise-box {
    background: rgba(20, 26, 40, 0.75) !important;
    border: 1px solid rgba(0,255,150,0.10) !important;
}

/* 🟩 Zelený záhlaví řádků ponechat čitelné */
.theme-dark .history-header-row {
    background: rgba(0,255,170,0.18) !important;
    color: #ffffff !important;
}

/* 📝 Text v řádcích (Série, opakování, váha) */
.theme-dark .history-row,
.theme-dark .history-row span,
.theme-dark .history-row input {
    color: #eafff5 !important;
}

/* 🔹 Čáry mezi řádky */
.theme-dark .history-divider {
    border-color: rgba(255,255,255,0.08) !important;
}

/* 🧾 Poznámka nahoře (ta oranžová bublina) */
.theme-dark .history-note {
    background: rgba(255, 166, 0, 0.1) !important;
    color: #ffe9b3 !important;
    border: 1px solid rgba(255,166,0,0.28) !important;
}

/* Scrollbar v modalu */
.theme-dark .history-modal::-webkit-scrollbar {
    width: 6px;
}
.theme-dark .history-modal::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 10px;
}
.theme-dark .history-modal::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

/* 🌙 GLOBÁLNÍ FIX PRO TEXTY V DIALOGU S CVIKY */
.theme-dark .modal-content,
.theme-dark .modal-content * {
    color: #eafff6 !important;
}

/* Zesvětlení nadpisů */
.theme-dark .modal-content h1,
.theme-dark .modal-content h2,
.theme-dark .modal-content h3 {
    color: #ffffff !important;
}

/* Zesvětlení sekundárního textu */
.theme-dark .modal-content p,
.theme-dark .modal-content span {
    color: #d2fbe8 !important;
}

/* Oprava zeleného headeru tabulky */
.theme-dark .modal-content .table-header,
.theme-dark .modal-content .header-row {
    color: #ffffff !important;
}

/* Čáry mezi sériemi */
.theme-dark .modal-content hr,
.theme-dark .modal-content .divider {
    border-color: rgba(255,255,255,0.15) !important;
}

/* --- DARK MODE: nový plán modal --- */
.theme-dark .modal-content.large-modal {
    background: rgba(10, 14, 22, 0.90);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(80, 255, 120, 0.25);
}

/* inputy uvnitř modalu */
.theme-dark .modal-content.large-modal input,
.theme-dark .modal-content.large-modal textarea,
.theme-dark .modal-content.large-modal select {
    background: rgba(0,0,0,0.35);
    color: #fff;
    border: 1px solid rgba(80, 255, 120, 0.3);
}

.theme-dark .modal-content.large-modal input::placeholder {
    color: rgba(255,255,255,0.45);
}

/* světlé růžové boxy – změna na tmavší */
.theme-dark .modal-content.large-modal .set-box {
    background: rgba(255, 0, 75, 0.07);
    border: 1px solid rgba(255, 0, 75, 0.25);
}
.theme-dark .modal-content.large-modal .set-box input {
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* --- DARK MODE: delete icon --- */
.theme-dark .btn-danger,
.theme-dark .remove-set,
.theme-dark .remove-exercise-btn,
.theme-dark .food-remove-btn {
    background: rgba(255, 50, 100, 0.15) !important;
    border: 1px solid rgba(255, 80, 120, 0.4) !important;
    color: #ff6b8a !important;
}

.theme-dark .btn-danger:hover,
.theme-dark .remove-set:hover,
.theme-dark .remove-exercise-btn:hover,
.theme-dark .food-remove-btn:hover {
    background: rgba(255, 50, 100, 0.35) !important;
    color: #ff89a5 !important;
}

/* samotná ikonka 🗑 */
.theme-dark .btn-danger i,
.theme-dark .remove-set i,
.theme-dark .food-remove-btn i {
    filter: brightness(0.8) saturate(1.5);
}

/* --- DARK MODE: progress detail modal --- */
.theme-dark #exerciseDetailModal .modal-content,
.theme-dark #exerciseDetailModal,
.theme-dark .progress-detail-modal {
    background: rgba(10, 14, 22, 0.92) !important;
    color: #fff !important;
    border: 1px solid rgba(80, 255, 120, 0.25);
}

/* položky tréninků */
.theme-dark #exerciseDetailModal li,
.theme-dark #exerciseDetailModal .exercise-entry {
    background: rgba(0,0,0,0.35) !important;
    border: 1px solid rgba(80,255,120,0.25) !important;
    color: #fff !important;
}

/* graf má bílé texty */
.theme-dark #exerciseDetailModal canvas {
    filter: brightness(1.2);
}

/* Zrušit světlé inline styly v dark mode */
body.theme-dark *[style*="background"],
body.theme-dark *[style*="background-color"] {
    background: rgba(255,255,255,0.05) !important;
    color: #e2e8f0 !important;
}

body.theme-dark .btn-danger i,
body.theme-dark .remove-set i,
body.theme-dark .remove-exercise-btn i,
body.theme-dark .remove-btn i {
    color: #ff6b6b !important;
    opacity: 0.9;
}

body.theme-dark .btn-danger {
    background: rgba(220, 38, 38, 0.2) !important;
    border: 1px solid rgba(220,38,38,0.4) !important;
    color: #ff8787 !important;
}

/* ===========================================================
   🔥 DARK MODE – GLOBAL OVERRIDE FIX FOR ALL MODALS & INPUTS
   =========================================================== */

body.dark-mode .modal-content,
body.dark-mode .modal-content.workout-detail-modal,
body.dark-mode #exerciseModal .modal-content,
body.dark-mode #workoutDetailModal .modal-content {
    background: #0f172a !important;
    border: 2px solid rgba(255,255,255,0.08) !important;
    color: #e5e7eb !important;
}

/* Inputs inside modals */
body.dark-mode .modal-content input,
body.dark-mode .modal-content textarea,
body.dark-mode .modal-content select {
    background: #1e293b !important;
    color: #f3f4f6 !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
}

body.dark-mode .modal-content input::placeholder {
    color: #9ca3af !important;
}

/* Exercise blocks */
body.dark-mode .exercise-row,
body.dark-mode .exercise-detail {
    background: #1f2937 !important;
    border-color: rgba(255,255,255,0.08) !important;
}

/* Sets table */
body.dark-mode .sets-table th {
    background: #1e3a8a !important;
    color: #dbeafe !important;
}
body.dark-mode .sets-table td {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: rgba(255,255,255,0.1) !important;
}

/* Charts background */
body.dark-mode #exerciseChart {
    background: #1e293b !important;
}

/* Close buttons */
body.dark-mode .btn-close,
body.dark-mode .close-modal {
    color: #f3f4f6 !important;
}

/* Workout detail blocks */
body.dark-mode .workout-detail-info,
body.dark-mode .workout-detail-header,
body.dark-mode .summary-box,
body.dark-mode .exercise-workouts li {
    background: #1f2937 !important;
    border-color: rgba(255,255,255,0.08) !important;
    color: #e5e7eb !important;
}

body.dark-mode .workout-detail-header h2,
body.dark-mode .summary-box h4 {
    color: #34d399 !important;
}

/* Title/icon colors */
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
    color: #f3f4f6 !important;
}

/* ✨ GLOBAL DARK MODE FIX FOR ALL MODAL CONTENT ✨ */

/* Modal background */
body.dark-mode .modal-overlay {
    background: rgba(0, 0, 0, 0.45) !important;
}

/* Hlavní krabička modalu */
body.dark-mode .modal-content {
    background: #0f1b24 !important;
    border-color: rgba(0,255,153,0.15) !important;
    color: #e8f5e9 !important;
}

/* 🔥 VŠECHNO uvnitř modalu bude tmavé */
body.dark-mode .modal-content * {
    background-color: transparent !important;
    color: #e8f5e9 !important;
    border-color: rgba(0,255,153,0.2) !important;
}

/* Platí i pro dynamický obsah z PHP */
body.dark-mode #exerciseModalContent *,
body.dark-mode #addPlanModal * {
    background-color: transparent !important;
    color: #e8f5e9 !important;
    border-color: rgba(0,255,153,0.2) !important;
}


/* Části, které mají být viditelně oddělené (např. boxy s cviky) */
body.dark-mode .exercise-card,
.exercise-row,
body.dark-mode .exercise-details,
body.dark-mode .exercise-title,
body.dark-mode .exercise-box,
body.dark-mode .history-block,
body.dark-mode .history-card,
body.dark-mode .exercise-item,
body.dark-mode ul.exercise-workouts li,
body.dark-mode .set-row,
body.dark-mode .exercise-wrapper {
    background: rgba(0,0,0,0.35) !important;
    padding: 14px;
    border-radius: 12px;
}

/* Inputy */
 .modal-content input,
 .modal-content textarea,
 .modal-content select {
    background: rgba(0,0,0,0.45) !important;
    border: 1px solid rgba(0,255,153,0.35) !important;
    color: #e8f5e9 !important;
}

/* Scrollbar */
body.dark-mode .modal-content::-webkit-scrollbar {
    width: 10px;
}
body.dark-mode .modal-content::-webkit-scrollbar-thumb {
    background: #00d084;
    border-radius: 6px;
}

/* Ikony mazání */
body.dark-mode .modal-content button,
body.dark-mode .modal-content i,
body.dark-mode .modal-content svg {
    filter: brightness(0.8) invert(0) !important;
    color: #ff6b6b !important;
}

/* =============================== */
/*   FIX: Table rows background    */
/* =============================== */

table.sets-table tr,
table.sets-table td,
table.sets-table th {
    background: var(--bg-card) !important;
    color: var(--text-color) !important;
}

/* 🌑 Dark theme – remove button fix */
.theme-dark .btn-remove-exercise,
.theme-dark .btn-remove {
    background: rgba(239, 68, 68, 0.1) !important; /* Jemně červené, průhledné */
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #fca5a5 !important; /* světlá červená */
    transition: 0.2s ease;
}

.theme-dark .btn-remove-exercise:hover,
.theme-dark .btn-remove:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
    color: #fecaca !important;
}

/* ========================== */
/*     🖤 DARK THEME FIX       */
/* ========================== */

.theme-dark #customFoodForm,
.theme-dark .custom-food-box {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text-color) !important;
}

/* Nadpis */
.theme-dark #customFoodForm h3 {
  color: white !important;
}

/* Inputy */
.theme-dark #customFoodForm input[type="text"],
.theme-dark #customFoodForm input[type="number"] {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

/* Obrázkový box */
.theme-dark #customFoodForm .image-upload,
.theme-dark .custom-food-box .image-upload {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 2px dashed rgba(255, 255, 255, 0.2) !important;
}

.theme-dark #customFoodForm .image-upload img {
  border-radius: 12px;
}

/* Tlačítko Uložit */
.theme-dark #customFoodForm button,
.theme-dark .custom-food-box button {
  background: var(--accent) !important;
  color: white !important;
}

/* ===== Sidebar XP Kruh FIX ===== */

.sidebar-avatar {
    position: relative;
    width: 70px;
    height: 70px;
}

.sidebar-avatar svg.sidebar-xp-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 70px !important;
    height: 70px !important;
    overflow: visible;
}

.sidebar-avatar .xp-bg {
    fill: none;
    stroke: rgba(255,255,255,0.15);
    stroke-width: 6;
}

.sidebar-avatar img.profile-img {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    left: 8px;
    object-fit: cover;
    z-index: 5;
}

.sidebar-xp-ring circle {
    transform-origin: center;
    transition: stroke-dashoffset 0.6s ease;
}

.sidebar-avatar {
    position: relative;
    width: 70px;
    height: 70px;
}

.sidebar-avatar svg.sidebar-xp-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 70px;
    height: 70px;
    transform: rotate(-90deg);  /* jediná správná rotace */
    transform-origin: 50% 50%;
}

.sidebar-avatar .xp-bg {
    fill: none;
    stroke: rgba(255,255,255,0.15);
    stroke-width: 6;
}

.sidebar-avatar .xp-progress {
    fill: none;
    stroke: url(#sidebarXPGradient);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset .4s ease;
}

.profile-page .xp-ring svg {
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

/* === FIX: XP KRUH NA PROFILU — ROTACE O -90° === */
.xp-ring svg {
    transform: rotate(-90deg) !important;
    transform-origin: 50% 50% !important;
}

.xp-ring circle {
    transform-origin: 50% 50% !important;
}

.exercise-library-modal {
  max-height: 90vh;
  overflow-y: auto;
}

.input-search {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.2);
  margin-bottom: 15px;
}

.exercise-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.exercise-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exercise-item {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--card-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(0,0,0,0.05);
}

.exercise-left {
  display: flex;
  flex-direction: column;
}

.exercise-tags {
  margin-top: 5px;
  display: flex;
  gap: 6px;
}

.exercise-tag {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 8px;
  opacity: 0.8;
}

.tag-favorite { background: gold; color: black; }
.tag-history  { background: #22c55e; color: white; }
.tag-user     { background: #3b82f6; color: white; }

.exercise-star {
  font-size: 1.5rem;
  cursor: pointer;
}

.exercise-star.active {
  color: gold;
}

#toastContainer {
    position: fixed !important;
    top: 20px;
    right: 20px;
    z-index: 999999 !important; /* NAD VŠÍM */
    pointer-events: none;
}

#toastContainer .toast {
    position: relative;
    z-index: 9999999 !important;
}

.tag-used {
    background-color: rgba(34,197,94,0.2); /* zelená, light */
    color: #22c55e;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.exercise-library-modal {
    max-width: 720px;
    padding: 30px;
    border-radius: 16px;
    background: var(--card-bg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.exercise-library-modal h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* INPUT SEARCH */
.exercise-library-modal .input-search {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    margin-bottom: 16px;
    font-size: 1rem;
}

/* FILTRY */
.exercise-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.exercise-filters select,
.exercise-filters .small-btn {
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--btn-bg);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 0.9rem;
}

.small-btn.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* LIST */
.exercise-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 18px;
    background: var(--card-light);
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    transition: 0.2s;
}

.exercise-item:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
}

/* NADPIS CVIKU */
.exercise-item h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 6px 0;
}

/* TAGY */
.exercise-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(0,0,0,0.1);
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-muscle { background: rgba(59,130,246,0.2); color: #3b82f6; }
.tag-eq     { background: rgba(249,115,22,0.2); color: #f97316; }
.tag-custom { background: rgba(168,85,247,0.2); color: #a855f7; }

.tag-used { background: rgba(34,197,94,0.2); color: #22c55e; }

/* FAVORITE BUTTON */
.fav-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    font-size: 1.3rem;
    color: var(--text);
    transition: 0.2s;
}

.fav-btn.active {
    color: #facc15; /* žlutá */
}

.fav-btn:hover {
    transform: scale(1.15);
}

/* DARK MODE */
body.dark .exercise-library-modal {
    background: #1e1e1e;
}

body.dark .exercise-item {
    background: #252525;
}

body.dark .input-search,
body.dark .exercise-filters select,
body.dark .small-btn {
    background: #2d2d2d;
    color: #fff;
}

/* ===== CUSTOM EXERCISE MODAL ===== */

#customExerciseModal .modal-content {
    width: 100%;
    max-width: 420px;
    padding: 24px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    animation: fadeInScale 0.25s ease;
}

#customExerciseModal .modal-header h2 {
    font-size: 1.4rem;
    margin: 0;
    font-weight: 700;
}

#customExerciseModal label {
    margin-bottom: 6px;
    margin-top: 15px;
    display: block;
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
}

#customExerciseModal input,
#customExerciseModal select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #d6d6d6;
    outline: none;
    font-size: 1rem;
    transition: 0.2s;
    background: #fafafa;
}

#customExerciseModal input:focus,
#customExerciseModal select:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.20);
}

#customExerciseModal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
}

#customExerciseModal .btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
}

#customExerciseModal .btn.btn-secondary {
    background: #e5e7eb;
    color: #111;
}

#customExerciseModal .btn.btn-secondary:hover {
    background: #d1d5db;
}

#customExerciseModal .btn.btn-primary {
    background: #3b82f6;
    color: #fff;
}

#customExerciseModal .btn.btn-primary:hover {
    background: #2563eb;
}

/* Modal fade + scale animation */
@keyframes fadeInScale {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.add-custom-ex-btn {
    margin-top: 10px;
    width: 100%;
    background: #4ade80; /* zelená */
    color: #0f172a;
    font-weight: 600;
}
.add-custom-ex-btn:hover {
    background: #22c55e;
}

body.theme-dark ul.exercise-workouts li,
body.theme-dark #exerciseChart,
body.theme-dark .exercise-edit-card {
  background: none;
}

/* ============================================
   FILTER MODAL – DARK THEME (Izolovaný vzhled)
============================================ */
#filterModal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#filterModal.active {
    display: flex;
}

#filterModal .modal-content.dark-modal {
    background: #1b1b1d;
    width: 420px;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0,0,0,0.55);
    border: 1px solid #2b2b2b;
    color: #f3f4f6;
    position: relative;
    animation: filterModalPop .25s ease;
}

@keyframes filterModalPop {
    from {
        transform: translateY(20px) scale(0.97);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* HEADER */
#filterModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

#filterModal .modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

#filterModal .close-modal {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #9ca3af;
    transition: .2s;
}

#filterModal .close-modal:hover {
    color: #fff;
    transform: scale(1.1);
}

/* BODY */
#filterModal .filter-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#filterModal .filter-modal-body label {
    font-size: 14px;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 4px;
}

/* INPUTY & SELECTY */
#filterModal input,
#filterModal select {
    background: #262628;
    border: 1px solid #353537;
    color: #e5e7eb;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    transition: .2s;
}

#filterModal input:focus,
#filterModal select:focus {
    border-color: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25);
    outline: none;
}

/* FOOTER */
#filterModal .modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
}

/* Reset btn */
#filterModal .btn.btn-secondary {
    background: #3f3f45;
    color: #f3f4f6;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    transition: .2s;
    font-weight: 600;
}

#filterModal .btn.btn-secondary:hover {
    background: #4a4a50;
}

/* Apply btn */
#filterModal .btn.btn-primary {
    background: #34d399;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    transition: .2s;
    font-weight: 600;
}

#filterModal .btn.btn-primary:hover {
    background: #41e0a7;
}

/* MOBILE */
@media (max-width: 500px) {
    #filterModal .modal-content.dark-modal {
        width: 90%;
        padding: 20px;
    }
}

/* Styl pro výběr tréninkového plánu */
.manual-plan-select,
.edit-plan-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--input-bg, #2b2b2b);
    border: 1px solid var(--input-border, #3a3a3a);
    color: var(--text-color, #e5e5e5);
    border-radius: 10px;
    font-size: 15px;
    appearance: none;
    outline: none;
    transition: .2s ease;
}

.manual-plan-select:focus,
.edit-plan-select:focus {
    border-color: var(--accent, #34d399);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25);
}

/* Šipka vpravo */
.manual-plan-select,
.edit-plan-select {
    background-image: url("data:image/svg+xml,%3Csvg fill='%23d1d5db' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.516 7.548L10 12.032l4.484-4.484L16 8.564l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 38px;
}

/* Light mode */
body:not(.dark-mode) .manual-plan-select,
body:not(.dark-mode) .edit-plan-select {
    background: #fff;
    border: 1px solid #ccc;
    color: #222;
    background-image: url("data:image/svg+xml,%3Csvg fill='%23666' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.516 7.548L10 12.032l4.484-4.484L16 8.564l-6 6-6-6z'/%3E%3C/svg%3E");
}

.active-filter-bar {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 12px 18px;
    border-radius: 10px;
    color: #fff;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.active-filter-bar span:not(:empty)::before {
    content: "• ";
    opacity: 0.6;
}

/* ============================
   FILTER PANEL (nad statistikami)
============================ */
.history-filters-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 18px 25px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 0 25px rgba(0,0,0,0.25);
}

/* levá část (tlačítka) */
.history-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

/* pravá část – přehled aktivních filtrů */
.active-filters-box {
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    color: #d7e1ff;
    border: 1px solid rgba(255,255,255,0.08);
    width: 50%;
}

.active-filters-box span {
    opacity: 0.8;
}

.active-filters-box strong {
    opacity: 1;
}

/* mobilní přizpůsobení */
@media (max-width: 768px) {
    .history-filters-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .active-filters-box {
        justify-content: center;
        text-align: center;
    }
}

/* ==== box "Počet sérií na partie" ==== */
.summary-box-clickable {
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}
.summary-box-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.3);
}

/* ==== modal pro objem sérií ==== */
.medium-modal {
    max-width: 720px;
}

.volume-modal-body {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.volume-filter-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.volume-filter-row label {
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.volume-filter-row input[type="week"] {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(148,163,184,0.6);
    background: rgba(15,23,42,0.8);
    color: #e5e7eb;
    font-size: 0.95rem;
}

.volume-filter-row input[type="week"]:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16,185,129,0.35);
}

.volume-filter-actions {
    display: flex;
    gap: 10px;
}

.volume-result {
    border-radius: 12px;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.25);
    padding: 14px 16px;
    max-height: 360px;
    overflow-y: auto;
}

/* tabulka se sériemi */
.volume-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.volume-table th,
.volume-table td {
    padding: 8px 10px;
    text-align: left;
}

.volume-table thead th {
    border-bottom: 1px solid rgba(148,163,184,0.4);
    font-weight: 600;
    color: #e5e7eb;
}

.volume-table tbody tr:nth-child(even) {
    background: rgba(15,23,42,0.75);
}

/* barevné označení stavu do budoucna */
.volume-tag-ok {
    color: #bbf7d0;
}
.volume-tag-low {
    color: #fbbf24;
}
.volume-tag-high {
    color: #fca5a5;
}

.week-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin: 20px 0;
    padding: 12px;
    background: #0d1220;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    width: 100%;
}

.week-arrow {
    background: rgba(255,255,255,0.07);
    border: none;
    color: white;
    padding: 8px 12px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.15s;
}

.week-arrow:hover {
    background: rgba(255,255,255,0.15);
}

.week-display {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.week-display span {
    opacity: 0.9;
}

/* Karta cviku */
.exercise-row {
  border: 1px solid rgba(148,163,184,0.4);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #0f172a;
  box-shadow: 0 8px 20px rgba(15,23,42,0.55);
}

/* Horní lišta cviku */
.exercise-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Drag handle (za který se tahá) */
.drag-handle {
  cursor: grab;
  user-select: none;
  font-size: 18px;
  padding: 0 6px;
  opacity: .7;
}
.drag-handle:active {
  cursor: grabbing;
}

/* Pravá část hlavičky – puntíky + šipka */
.exercise-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Puntíky sérií */
.set-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}
.set-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid #64748b;
  background: transparent;
}
.set-dot.filled {
  background: #22c55e;
  border-color: #22c55e;
}

/* Tělo cviku (série) */
.exercise-body {
  margin-top: 8px;
}
.exercise-body.collapsed {
  display: none;
}

/* Malé ikonové tlačítko šipky */
.btn.btn-icon.toggle-exercise-body {
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1;
}

.toggle-exercise-body {
    transition: transform 0.25s ease;
}

.toggle-exercise-body.rotated {
    transform: rotate(-90deg);
}

.drag-ghost {
  opacity: 0.4;
  background: #f3f4f6;
  border-radius: 12px;
}

/* Šipka v hlavičce cviku */
.btn-detail-icon {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.25s ease, color 0.2s ease;
    padding: 4px;
    margin-left: 8px;
}

/* Hover efekt */
.btn-detail-icon:hover {
    color: #fff;
    transform: scale(1.1);
}

/* Rotace při sbalení */
.btn-detail-icon.rotated {
    transform: rotate(-90deg);
}

/* Kontejner sets – jemná animace */
.exercise-body {
    overflow: hidden;
    transition: height 0.25s ease;
}

/* Skrytý stav */
.exercise-body.collapsed {
    height: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: 0.25s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--bg-card);
    padding: 2rem;
    width: 90%;
    max-width: 420px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.close-btn {
    margin-top: 1.5rem;
    width: 100%;
    padding: 0.8rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
}
.close-btn:hover {
    background: #059669;
}

.macro-progress-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.2rem;
}

.macro-progress-row {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 14px;
  padding: 0.8rem 1rem;
}

.macro-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .4rem;
}

.macro-label {
  font-weight: 600;
}

.macro-value {
  font-size: 0.9rem;
  opacity: 0.85;
}

.macro-percent {
  margin-top: .3rem;
  font-size: 0.8rem;
  opacity: 0.9;
}

.macro-percent--muted {
  opacity: 0.7;
  font-style: italic;
}

.progress-subtitle {
  margin-top: .2rem;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* === týdenní přepínač v progress modalu === */
.week-switcher {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin: 0.4rem 0 1rem 0;
    flex-wrap: wrap;
}

.week-switcher button {
    border-radius: 999px;
    border: 1px solid #4ade80;
    background: rgba(16,185,129,0.15);
    color: #ecfdf5;
    padding: 0.4rem 0.9rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

.week-switcher button:hover:not(.disabled) {
    background: rgba(16,185,129,0.3);
    transform: translateY(-1px);
}

.week-switcher button.disabled {
    opacity: .45;
    cursor: not-allowed;
}

.week-label {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: #e5e7eb;
}

.week-badge {
    display: inline-block;
    margin-left: .4rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(37,99,235,0.2);
    font-size: .75rem;
    color: #bfdbfe;
}

/* === PROGRESS BARY FINAL === */
.progress-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(148, 163, 184, 0.3);
    border-radius: 999px;
    position: relative;
    overflow: visible;
    margin: 6px 0;
}

/* vnitřní container — REŽE PŘESAH */
.progress-bar-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
}

/* zelený bar */
.macro-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #34d399, #10b981);
    border-radius: inherit;
    transition: width .4s ease;
}

/* červený bar */
.progress-bar-over {
    background: linear-gradient(90deg, #f87171, #dc2626) !important;
}

/* animace */
.macro-progress-bar.progress-bar-over {
    animation: macroPulse 1.4s ease-in-out infinite;
}

@keyframes macroPulse {
    0%   { transform: scale(1);   box-shadow:0 0 0 rgba(255,70,70,0.3); }
    50%  { transform: scale(1.05); box-shadow:0 0 12px rgba(255,70,70,0.6); }
    100% { transform: scale(1);   box-shadow:0 0 0 rgba(255,70,70,0.3); }
}


.week-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    margin-bottom: 1.2rem;
}

.week-switcher button {
    padding: 0.45rem 0.8rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    color: #e5e7eb;
    border: 1px solid rgba(255,255,255,0.1);
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    transition: .15s ease;
}

.week-switcher button:hover:not(.disabled) {
    background: rgba(255,255,255,0.12);
}

.week-switcher button.disabled {
    opacity: .3;
    cursor: not-allowed;
}

.week-center {
    text-align: center;
    font-weight: 600;
    color: #fff;
}

.week-badge {
    display: inline-block;
    margin-top: .15rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(37,99,235,0.25);
    font-size: .7rem;
    color: #bfdbfe;
}

.macro-warning {
    margin-left: 6px;
    font-size: 0.9rem;
    color: #f87171;
    text-shadow: 0 0 6px rgba(255,50,50,0.6);
}

.food-modal {
  max-width: 720px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.food-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.close-icon {
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 1.4rem;
  cursor: pointer;
}

.food-filters {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.food-filters input,
.food-filters select {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.5);
  background: rgba(15,23,42,0.8);
  color: #e5e7eb;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
}

.food-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-right: 0.3rem;
}

.food-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  background: rgba(15,23,42,0.7);
}

.food-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.food-name {
  font-weight: 600;
}

.food-tag {
  font-size: 0.75rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(56,189,248,0.25);
  color: #bae6fd;
}

.food-macros {
  display: flex;
  gap: 0.7rem;
  font-size: 0.8rem;
  opacity: 0.9;
}

.food-fav-toggle {
    cursor: pointer;
    font-size: 1.1rem;
    margin-left: 8px;
    transition: 0.2s;
    opacity: 0.6;
}

.food-fav-toggle.active {
    opacity: 1;
    text-shadow: 0 0 5px #facc15;
    color: #facc15;
}

.food-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* ===== MODAL ===== */
#addFoodModal.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#addFoodModal.hidden {
    display: none;
}

#addFoodModal .modal-content {
    background: #0f172a;
    padding: 2rem;
    border-radius: 14px;
    width: 95%;
    max-width: 420px;
    color: white;
    box-shadow: 0 0 25px rgba(0,0,0,0.45);
}

#addFoodModal input {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.6rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.form-message {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

.btn-green {
  background: rgba(96, 222, 95);
}

.btn-red {
  background: rgb(245, 73, 39);
}

/* ===========================
   🔥 GLOBAL MODAL STYLING
=========================== */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #0f1620;
  color: #fff;
  border-radius: 16px;
  padding: 30px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 30px rgba(0,255,150,0.15);
  animation: fadeIn .25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}

.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #1f2937;
  border-radius: 10px;
}


/* ===========================
   🔥 INPUTY
=========================== */
.modal-content input[type="text"],
.modal-content input[type="number"],
.modal-content select {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 15px;
  transition: 0.2s;
}

.modal-content input:focus {
  border-color: #22c55e;
  background: #0f172a;
}


/* ===========================
   🔥 CUSTOM FILE UPLOAD BUTTON
=========================== */
input[type="file"] {
  display: none;
}

.upload-label {
  display: inline-block;
  background: #1e293b;
  border: 1px solid #334155;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 500;
  color: #e2e8f0;
  margin-bottom: 14px;
  width: 100%;
  text-align: center;
  transition: .2s;
}

.upload-label:hover {
  background: #22c55e;
  border-color: #22c55e;
  color: #0f172a;
}

.file-name {
  font-size: 14px;
  opacity: 0.75;
  margin-top: -8px;
  margin-bottom: 14px;
}


/* ===========================
   🔥 BUTTONS
=========================== */
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
}

.modal-actions .btn {
  flex: 1;
}

@media (max-width: 500px) {
  .modal-content {
    padding: 20px;
    max-width: 95%;
    border-radius: 12px;
  }

  .upload-label {
    padding: 12px;
  }
}

#categoryFilter {
  background: #1e293b;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #334155;
  appearance: none;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s;
  width: 100%;
}

#categoryFilter:hover {
  border-color: #22c55e;
}

#categoryFilter:focus {
  border-color: #22c55e;
  outline: none;
}

#categoryFilter {
  background-image: url("data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjZTJlOGYwIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+PHBhdGggZD0iTTEyIDE1bC02LTYgMS4zLTEuM0wxMiAxMi40bDUuNy01LjcgMS4zIDEuM0wxMiAxNXoiLz48L3N2Zz4=");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.food-fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: #999;
    transition: 0.15s ease;
}

.food-fav-btn.active {
    color: #facc15; /* hezká žlutá */
}

.food-fav-btn:hover {
    transform: scale(1.1);
}

.detail-modal, .type-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.detail-content {
    background: white;
    width: 92%;
    max-width: 430px;
    border-radius: 20px;
    padding: 20px;
    animation: fadeIn 0.25s ease-out;
    text-align: center;
}

.detail-image {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 15px;
}

.detail-category {
    color: #777;
    margin-bottom: 10px;
}

.detail-macros {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

.detail-macros div {
    text-align: center;
}

.detail-add-btn {
    margin-top: 20px;
    width: 100%;
}

.detail-close {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    float: right;
    margin-bottom: 10px;
}

.type-content {
    background: white;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    width: 90%;
    max-width: 350px;
    animation: fadeIn 0.25s ease-out;
}

.type-btn {
    width: 100%;
    margin: 8px 0;
    padding: 12px;
    border-radius: 12px;
    font-size: 17px;
    background: #f5f5f5;
}

.type-btn:hover {
    background: #e2e2e2;
}

.close-type-btn {
    margin-top: 15px;
}

@keyframes fadeIn {
    from { opacity:0; transform: translateY(15px); }
    to { opacity:1; transform: translateY(0); }
}

/* ===== FULLSCREEN FOOD DETAIL MODAL ===== */

#foodDetailModal {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: flex-end;
    z-index: 999999;
    animation: fadeIn 0.25s ease;
}

#foodDetailModal.active {
    display: flex;
}

.food-detail-card {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    max-height: 92%;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); }
    to { transform: translateY(0); }
}

.food-detail-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
}

.food-detail-content {
    padding: 20px;
    text-align: center;
}

.food-detail-name {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.food-detail-category {
    font-size: 0.9rem;
    margin-bottom: 16px;
    color: #666;
}

.food-detail-macros {
    display: flex;
    justify-content: space-around;
    padding-bottom: 20px;
}

.food-detail-macros div {
    font-size: 0.9rem;
}

.food-detail-actions {
    padding: 14px;
    border-top: 1px solid #eee;
}

.btn-add-to-diet {
    width: 100%;
    padding: 14px;
    background: #22c55e;
    border: none;
    color: white;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

/* Klikací food-row */
.food-row {
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.food-row:hover {
    background: rgba(255,255,255,0.05);
}

.food-row:active {
    transform: scale(0.98);
}

/* HVĚZDIČKA NESMÍ OTEVŘÍT DETAIL */
.food-fav-btn {
    cursor: pointer;
    z-index: 10;
}
/* Backdrop */
#foodDetailModal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: flex-end;
    backdrop-filter: blur(10px);
    background: rgba(0,0,0,0.7);
    z-index: 999999;
}

#foodDetailModal:not(.hidden) {
    display: flex;
}

/* Modal Card */
.food-detail-card {
    width: 95%;
    max-width: 480px;
    background: var(--card-bg, #fff);
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    max-height: 92%;
    animation: slideUp .25s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

/* Dark mode */
body.theme-dark #foodDetailModal .food-detail-card,
body.theme-ocean #foodDetailModal .food-detail-card {
    --card-bg: rgba(25, 25, 25, 0.92);
    color: #f1f1f1;
}

.close-detail-btn {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
}

body.theme-dark .close-detail-btn,
body.theme-ocean .close-detail-btn {
    color: #ccc;
}

/* Food Image */
.food-detail-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
}

/* Content */
.food-detail-content {
    padding: 22px;
    text-align: center;
}

.food-detail-name {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.food-detail-category {
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 12px;
}

/* Macros grid */
.food-detail-macros {
    display: flex;
    justify-content: space-around;
    margin: 10px 0 25px;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Add button */
.btn-add-to-diet {
    width: 90%;
    max-width: 400px;
    margin: 0 auto 20px;
    padding: 14px 20px;
    border-radius: 12px;
    background: #22c55e;
    border: none;
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    display: block;
    transition: 0.2s;
}

.btn-add-to-diet:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(34,197,94,0.4);
}

body.theme-dark .btn-add-to-diet,
body.theme-ocean .btn-add-to-diet {
    background: #16a34a;
}

/* Animation */
@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.type-modal {
    display: none;
    position: fixed;
    inset: 0;
    backdrop-filter: blur(12px);
    background: rgba(0,0,0,0.65);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.type-modal:not(.hidden) {
    display: flex;
}

.type-content {
    background: rgba(25, 25, 25, 0.92);
    padding: 25px;
    border-radius: 18px;
    width: 90%;
    max-width: 360px;
    text-align: center;
    color: #fff;
    animation: popIn 0.25s ease;
}

.type-btn {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 14px;
    border-radius: 12px;
    margin: 8px 0;
    font-size: 1.05rem;
    cursor: pointer;
    transition: 0.2s;
}

.type-btn:hover {
    background: rgba(255,255,255,0.16);
    transform: scale(1.03);
}

.close-type-btn {
    margin-top: 12px;
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
}

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* === EPIC LEVEL UP ANIMATION === */

#levelUpEpic {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0;
    pointer-events: none;
}

.levelup-text {
    font-size: 3rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 20px rgba(255,255,255,0.6);
    margin-top: 10px;
    animation: epicPulse 1.4s ease-out forwards;
}

.levelup-crown {
    font-size: 4.5rem;
    opacity: 0;
    animation: epicCrown 1.6s ease-out forwards;
}

/* glowing explosion behind text */
.levelup-glow {
    position: absolute;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255,215,0,0.9), rgba(255,165,0,0.0));
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
    filter: blur(10px);
    animation: epicGlow 1.3s ease-out forwards;
}

.levelup-circle {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 6px solid rgba(255,215,0,0.9);
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
    animation: epicCircle 1.2s ease-out forwards;
}

/* Animace */
@keyframes epicGlow {
    0% { opacity: 0; transform: scale(0.2); }
    60% { opacity: 1; transform: scale(1.4); }
    100% { opacity: 0; transform: scale(2.2); }
}

@keyframes epicCircle {
    0% { opacity: 0; transform: scale(0.2); }
    40% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0; transform: scale(1.7); }
}

@keyframes epicPulse {
    0% { opacity: 0; transform: scale(0.3); }
    40% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes epicCrown {
    0% { opacity: 0; transform: scale(0.3) rotate(-20deg); }
    40% { opacity: 1; transform: scale(1.4) rotate(15deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* konfety */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--c);
    top: -10px;
    left: calc(50% + var(--x));
    opacity: 0;
    transform: translateY(0);
    z-index: 9999999;
    border-radius: 3px;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(120vh) rotate(720deg);
        opacity: 0;
    }
}

/* --- Achievement Cards in Profile --- */

.achievements-list .achievement {
  display: flex;
  gap: 12px;
  background: rgba(255,255,255,0.15);
  padding: 12px 16px;
  border-radius: 20px;
  margin-bottom: 12px;
  backdrop-filter: blur(4px);
}

.achievement .icon {
  font-size: 1.8rem;
}

/* --- Modal --- */

#achievementsModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999999;
}

#achievementsModal.active {
  display: flex;
}

.achievements-modal {
  width: 85%;
  max-width: 800px;
  max-height: 85vh;
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  overflow-y: auto;
  animation: fadeIn .25s ease;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 18px;
  margin-top: 15px;
}

.achievement-card {
  padding: 16px;
  border-radius: 12px;
  background: #f2f2f2;
  text-align: center;
  transition: .2s;
  opacity: 0.65;
}

.achievement-card.unlocked {
  background: linear-gradient(135deg,#a7f3d0,#6ee7b7);
  opacity: 1;
  box-shadow: 0 0 10px rgba(0,255,150,0.5);
}

.achievement-card.locked {
  filter: grayscale(1);
}

.achievement-card h3 {
  margin: 8px 0 4px;
}

.achieve-icon {
  font-size: 2rem;
}

/* SECTION TITLE */
.ach-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 700;
}

/* PREVIEW KARTIČKY */
.ach-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ach-card {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.25s ease;
    border: 1px solid rgba(255,255,255,0.08);
}

.ach-card.unlocked {
    box-shadow: 0 0 14px rgba(0, 255, 140, 0.4);
    border-color: rgba(0,255,140,0.6);
}

.ach-card:hover {
    transform: translateY(-2px);
}

.ach-icon {
    font-size: 2rem;
}

/* BUTTON */
.btn-show-all {
    margin: 20px auto 0;
    display: block;
    padding: 10px 20px;
    background: linear-gradient(90deg, #22c55e, #3b82f6);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.25s;
}

.btn-show-all:hover {
    opacity: 0.85;
}

/* MODAL */
.ach-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.ach-modal-overlay.active {
    display: flex;
}

.ach-modal {
    width: 90%;
    max-width: 780px;
    background: #0f172a;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(0,255,160,0.4);
    max-height: 90vh;
    overflow-y: auto;
}

.ach-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ach-close {
    font-size: 2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* GRID */
.ach-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    border-radius: 15px;
}

.ach-grid-card {
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    transition: 0.25s ease;
}

.ach-grid-card.unlocked {
    background: rgba(0,255,140,0.15);
    border-color: rgba(0,255,140,0.5);
    box-shadow: 0 0 12px rgba(0,255,140,0.4);
}

.ach-grid-card.locked {
    opacity: 0.5;
}

.ach-grid-icon {
    font-size: 2.6rem;
}

.ach-date {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    opacity: 0.8;
}

.ach-preview {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    height: auto; /* >>> Tohle je důležité */
}

.achievements-section {
    padding: 20px 30px;
    height: auto; /* A i toto */
}

/* 🏆 EPICKÝ ACHIEVEMENT POPUP – PLAYSTATION STYLE */

.achievement-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.25s ease-out;
}

.achievement-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.achievement-popup {
    background: radial-gradient(circle at top left, #facc15 0, #0f172a 40%, #020617 100%);
    border-radius: 24px;
    padding: 18px 22px;
    min-width: 280px;
    max-width: 420px;
    color: #f9fafb;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
    transform: translateY(30px) scale(0.9);
    opacity: 0;
    transition: transform 0.25s ease-out, opacity 0.25s ease-out;
    position: relative;
    overflow: hidden;
}

/* různé rarity */
.achievement-popup.rarity-common {
    box-shadow: 0 0 40px rgba(148, 163, 184, 0.7);
}

.achievement-popup.rarity-rare {
    box-shadow: 0 0 45px rgba(59, 130, 246, 0.9);
}

.achievement-popup.rarity-epic {
    box-shadow: 0 0 55px rgba(129, 140, 248, 1);
}

.achievement-popup.rarity-legendary {
    box-shadow: 0 0 65px rgba(245, 158, 11, 1);
}

.achievement-popup.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* horní „ribbon“ */
.achievement-ribbon {
    position: absolute;
    top: 10px;
    left: 16px;
    padding: 3px 10px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(15, 23, 42, 0.85);
    border-radius: 999px;
    border: 1px solid rgba(248, 250, 252, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.achievement-ribbon::before {
    content: "🏆";
}

/* layout v těle */
.achievement-body {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
    margin-top: 18px;
}

/* ikona + glow */
.achievement-icon-wrap {
    position: relative;
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-glow {
    position: absolute;
    inset: -8px;
    border-radius: 999px;
    background: conic-gradient(
        from 0deg,
        rgba(255, 255, 255, 0.1),
        rgba(250, 204, 21, 0.45),
        rgba(56, 189, 248, 0.45),
        rgba(129, 140, 248, 0.6),
        rgba(250, 204, 21, 0.45),
        rgba(255, 255, 255, 0.1)
    );
    filter: blur(2px);
    animation: achievement-spin 5s linear infinite;
    opacity: 0.9;
}

#achievementIcon {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    object-fit: contain;
    background: radial-gradient(circle at 30% 0%, #fef3c7, #0f172a);
    border: 2px solid rgba(248, 250, 252, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* textová část */
.achievement-text h3 {
    font-size: 1.05rem;
    margin: 0 0 4px;
    font-weight: 700;
}

.achievement-text p {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: #e5e7eb;
}

.achievement-rarity {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 2px;
    opacity: 0.9;
}

/* barvy rarity */
.achievement-popup.rarity-common .achievement-rarity {
    color: #9ca3af;
}

.achievement-popup.rarity-rare .achievement-rarity {
    color: #60a5fa;
}

.achievement-popup.rarity-epic .achievement-rarity {
    color: #a855f7;
}

.achievement-popup.rarity-legendary .achievement-rarity {
    color: #fbbf24;
}

/* XP badge */
.achievement-xp {
    margin-top: 6px;
}

.achievement-xp .xp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #022c22;
    background: linear-gradient(135deg, #22c55e, #bbf7d0);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.5);
}

/* malé konfety */
.achievement-popup::before,
.achievement-popup::after {
    content: "✨";
    position: absolute;
    font-size: 1.4rem;
    opacity: 0;
    animation: achievement-sparkle 1.2s ease-out forwards;
}

.achievement-popup::before {
    top: 12px;
    right: 18px;
}

.achievement-popup::after {
    bottom: 10px;
    left: 26px;
}

@keyframes achievement-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes achievement-sparkle {
    0%   { opacity: 0; transform: scale(0.6) translateY(8px); }
    40%  { opacity: 1; transform: scale(1) translateY(0); }
    100% { opacity: 0; transform: scale(0.8) translateY(-8px); }
}

/* mobil */
@media (max-width: 480px) {
    .achievement-popup {
        width: 92%;
        padding: 14px 16px;
    }

    .achievement-body {
        grid-template-columns: 1fr;
    }

    .achievement-icon-wrap {
        margin: 0 auto;
    }

    .achievement-text {
        text-align: center;
    }
}

/* ======================================================= */
/* FRIENDS PROFILE MODAL (ISOLATED VERSION)                */
/* Prefix: .friends-                                       */
/* ======================================================= */

/* BACKDROP */
.friends-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity .25s ease;
    z-index: 3000;
}

.friends-modal-backdrop.show {
    display: flex;
    opacity: 1;
}

/* MODAL CARD */
.friends-modal {
    width: 480px;
    max-width: 92%;
    padding: 30px;
    border-radius: 22px;

    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(14px);

    border: 1px solid rgba(255,255,255,0.15);
    box-shadow:
        0 0 25px rgba(0,0,0,0.25),
        inset 0 0 20px rgba(255,255,255,0.05);

    animation: friendsModalPop .28s ease-out;
    position: relative;
    color: #e8fdf7;
}

@keyframes friendsModalPop {
    from { transform: scale(.85); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* CLOSE BUTTON */
.friends-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #eee;
    font-size: 20px;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: .2s;
}

.friends-close-btn:hover {
    background: rgba(255,255,255,0.22);
}

/* HEADER */
.friends-modal-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

/* AVATAR + XP RING */
.friends-avatar-zone {
    position: relative;
    width: 110px;
    height: 110px;
}

.friends-avatar-zone svg {
    width: 110px;
    height: 110px;
    transform: rotate(-90deg);
    position: absolute;
    top: 0;
    left: 0;
}

.friends-avatar-img {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: 12px;
    left: 12px;
}

/* XP Ring */
.friends-xp-ring circle {
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
}

.friends-xp-ring .bg {
    stroke: rgba(255,255,255,0.16);
}

.friends-xp-ring .progress {
    stroke: #2cf3a9;
    transition: stroke-dashoffset 0.35s ease;
}

/* ONLINE STATUS DOT */
.friends-status-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.5);
    position: absolute;
    right: 6px;
    bottom: 6px;
}

.friends-status-dot.online {
    background: #2cffb7;
}

.friends-status-dot.offline {
    background: #6d7785;
}

/* USER BASIC */
.friends-basic h2 {
    font-size: 26px;
    margin-bottom: 2px;
    letter-spacing: 0.4px;
}

.friends-basic-level {
    font-size: 15px;
    color: #2cf3a9;
    font-weight: 600;
    opacity: 0.95;
}

/* BODY */
.friends-modal-body {
    padding-top: 22px;
}

.friends-section {
    margin-bottom: 26px;
}

.friends-section h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #2cf3a9;
}

.friends-section p {
    margin: 4px 0;
    opacity: 0.88;
    font-size: 15px;
}

/* ACHIEVEMENTS GRID */
.friends-achievements {
    display: grid;
    grid-template-columns: repeat(auto-fill, 64px);
    gap: 14px;
}

.friends-achievement-item {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.08);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.18);
    display: flex;
    justify-content: center;
    align-items: center;

    box-shadow: inset 0 0 12px rgba(255,255,255,0.12);
    cursor: pointer;
    transition: .25s ease;
}

.friends-achievement-item:hover {
    transform: scale(1.12);
    background: rgba(255,255,255,0.16);
    box-shadow:
        inset 0 0 15px rgba(255,255,255,0.2),
        0 0 12px rgba(255,255,255,0.1);
}

.friends-achievement-item img {
    width: 40px;
    height: 40px;
}

.friends-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
    margin: 14px 0 22px 0;
}

.friends-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 180, 0.15);
    border-radius: 14px;
    padding: 14px 16px;
    backdrop-filter: blur(8px);
    box-shadow: 
        0 0 10px rgba(0,255,180,0.08),
        inset 0 0 15px rgba(255,255,255,0.03);
    transition: 0.25s ease;
}

.friends-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 0 18px rgba(0,255,180,0.18),
        inset 0 0 20px rgba(255,255,255,0.06);
}

.card-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.card-label {
    font-size: 14px;
    opacity: 0.75;
    margin-bottom: 3px;
}

.card-value {
    font-size: 16px;
    font-weight: 600;
    color: #2cf3a9;
}

.achievement-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px;
    text-align: center;
}

.achievement-icon {
    font-size: 26px;
}

.achievement-name {
    font-size: 12px;
    opacity: 0.85;
    line-height: 1.2;
}

.achievement-item {
    width: 100%;
    min-height: 120px;
    background: rgba(255,255,255,0.06);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: .25s;
    box-shadow: inset 0 0 12px rgba(0,255,170,0.25);
}

.achievement-item:hover {
    transform: scale(1.05);
    background: rgba(0,255,170,0.13);
}

.achievement-icon {
    font-size: 34px;
}

.achievement-name {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.9;
    line-height: 1.3;
    color: #e8fdf7;
}

@media (max-width: 480px) {

    .friends-modal-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .friends-avatar-zone {
        width: 90px;
        height: 90px;
    }

    .friends-avatar-zone svg {
        width: 90px;
        height: 90px;
    }

    .friends-avatar-img {
        width: 72px;
        height: 72px;
        top: 9px;
        left: 9px;
    }
}

@media (max-width: 480px) {
    .friends-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {

    .achievement-item {
        min-height: 100px;
        padding: 10px;
        gap: 8px;
    }
}

@media (max-width: 360px) {

    .friends-modal {
        padding: 20px;
    }

    .friends-modal-header {
        gap: 12px;
    }

    .profile-basic h2 {
        font-size: 20px;
    }

    .friends-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .achievement-item {
        min-height: 90px;
    }

    .achievement-icon {
        font-size: 28px;
    }

    .achievement-name {
        font-size: 11px;
    }
}

.friends-modal {
    max-height: 90vh;      /* Modal nebude větší než 90 % výšky okna */
    overflow: hidden;      /* Schovat přetečení */
    display: flex;
    flex-direction: column;
}

.friends-modal-body {
    overflow-y: auto;
    padding-right: 6px; /* prostor kvůli scroll baru */
}

.friends-modal-body {
    flex: 1; 
}

@media (max-width: 480px) {
    .friends-modal {
        max-height: 95vh;
        padding: 20px;
        border-radius: 18px;
    }

    .friends-modal-body {
        margin-top: 10px;
    }
}

.friends-modal-body::-webkit-scrollbar {
    width: 6px;
}

.friends-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
}

.friends-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.25);
}

/* ========================================= */
/* 🔥 STREAK FIRE EFFECT */
/* ========================================= */

.streak-fire {
    position: relative;
}

/* glowing aura */
.streak-fire::before {
    content: "";
    position: absolute;
    inset: -8px; /* lehce okolo avatara */
    background: radial-gradient(circle,
        rgba(255,140,0,0.55),
        rgba(255,60,0,0.45),
        rgba(255,0,0,0.25),
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(10px);
    animation: firePulse 1.8s ease-in-out infinite;
    z-index: -1;
}

/* little floating flame */
.streak-fire::after {
    content: "🔥";
    position: absolute;
    right: -6px;
    bottom: -4px;
    font-size: 22px;
    animation: flameFloat 1.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes firePulse {
    0%   { transform: scale(1); opacity: 0.8; }
    50%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes flameFloat {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

.live-mini-player {
  position: fixed;
  right: 20px;
  bottom: 20px;
  margin-bottom: 50px;
  background: rgba(30, 30, 30, 0.92);
  padding: 12px 18px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 99999;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.live-mini-player.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

.live-mini-player .mini-info {
  display: flex;
  flex-direction: column;
}

.live-mini-player #miniTitle {
  font-size: 0.9rem;
}

.live-mini-player #miniTimer {
  font-size: 1.2rem;
  font-weight: bold;
}

.restore-btn {
  background: #10b981;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: white;
  font-size: 14px;
}
.minimize-modal {
  background: transparent;
  border: none;
  font-size: 28px;
  cursor: pointer;
  margin-right: 10px;
  color: white;
}

.exercise-pr-info {
  font-size: 0.8rem;
  opacity: 0.75;
  margin: 4px 0 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exercise-pr-info .pr-main {
  font-weight: 600;
}

.exercise-pr-info.pr-empty {
  opacity: 0.5;
  font-style: italic;
}

/* PR box – menší, uhlazený vzhled */
.exercise-pr-info {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    border-radius: 10px;
    margin: 4px 0 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    gap: 15px;
}

/* Texty uvnitř PR */
.exercise-pr-info .pr-main {
    font-weight: 600;
    color: #ffd369;  /* zlatá pro PR */
    white-space: nowrap;
}

.exercise-pr-info .pr-last {
    opacity: 0.8;
    white-space: nowrap;
}

/* Když není PR */
.exercise-pr-info.pr-empty {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.06);
    opacity: 0.6;
}

/* ============================================
   DETAIL CVIKU – DESIGN MODALU
============================================ */

/* Překryv */
#exerciseDetailModal.modal-overlay {
    display: none;
}
#exerciseDetailModal.active {
    display: flex;
}

/* Obsah modalu */
#exerciseDetailModal .modal-content {
    width: 350px;
    padding: 25px;
    background: #121826;
    border-radius: 18px;
    animation: modalPop 0.25s ease;
    box-shadow: 0 10px 35px rgba(0,0,0,0.45);
}

/* Header */
#exerciseDetailModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    padding: 14px 18px;
    border-radius: 12px;
}

#exerciseDetailModal h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: white;
}

#exerciseDetailModal .close-modal {
    background: none;
    font-size: 26px;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.9;
    transition: 0.2s;
}
#exerciseDetailModal .close-modal:hover {
    opacity: 1;
}

/* Tělo modalu */
.exercise-detail-body {
    color: #d6d6d6;
    line-height: 1.5;
    font-size: 15px;
}

.exercise-detail-body strong {
    color: #ffffff;
    font-weight: 600;
}

.exercise-detail-body h3 {
    margin-top: 18px;
    margin-bottom: 6px;
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
}

/* Popis cviku */
#exDetailDesc {
    background: rgba(255,255,255,0.04);
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
}

/* Footer s tlačítkem */
#exerciseDetailModal .modal-footer {
    margin-top: 22px;
    display: flex;
    justify-content: flex-end;
}

#addExerciseToWorkout {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 15px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s ease;
}

#addExerciseToWorkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

/* Otevírací animace */
@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

/* ---------------- OVERLAY ---------------- */
#exerciseDetailModal.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55) !important;
    backdrop-filter: blur(4px);
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

#exerciseDetailModal.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ---------------- MODAL ---------------- */
#exerciseDetailModal .small-modal {
    width: 420px;
    max-width: 90%;
    background: rgba(25,25,35,0.9) !important;
    backdrop-filter: blur(12px);
    border-radius: 18px !important;
    padding: 20px 25px;
    border: 1px solid rgba(255,255,255,0.07);
    transform: translateY(20px);
    opacity: 0;
    transition: all .28s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,0.45);
}

#exerciseDetailModal.active .small-modal {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

/* ---------------- HEADER ---------------- */
#exerciseDetailModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

#exerciseDetailModal .modal-header h2 {
    font-size: 22px !important;
    font-weight: 700;
    color: #fff;
}

#exerciseDetailModal .close-modal {
    width: 36px;
    height: 36px;
    font-size: 22px;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,0.08) !important;
    color: #fff !important;
    cursor: pointer;
    transition: 0.2s;
}

#exerciseDetailModal .close-modal:hover {
    background: rgba(255,255,255,0.18) !important;
    transform: scale(1.05);
}

/* ---------------- BODY ---------------- */
#exerciseDetailModal .exercise-detail-body p {
    font-size: 15px !important;
    color: #ddd !important;
    line-height: 1.45;
}

#exerciseDetailModal strong {
    color: #fff !important;
}

#exerciseDetailModal .exercise-detail-body h3 {
    margin-top: 20px;
    font-size: 18px !important;
    color: #fff;
    font-weight: 600;
}

/* ---------------- FOOTER ---------------- */
#exerciseDetailModal .modal-footer {
    margin-top: 25px;
    display: flex;
    justify-content: flex-end;
}

#exerciseDetailModal #addExerciseToWorkout {
    background: linear-gradient(135deg, #4ade80, #22c55e) !important;
    border: none !important;
    color: #000 !important;
    padding: 10px 18px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: 0.2s;
}

#exerciseDetailModal #addExerciseToWorkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34,197,94,0.4);
}

.global-loader {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  transition: opacity 0.3s ease;
}

.global-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #16a34a; /* tvůj hlavní zelený akcent */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.bottom-nav {
  display: none;
}

@media (max-width: 800px) {
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #0f172a;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 50;
  }

  .bottom-nav a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .bottom-nav a i {
    font-size: 1.3rem;
  }

  .bottom-nav a.active {
    color: #22c55e;
  }

  /* obsah nad lištou */
  .dashboard {
    padding-bottom: 80px;
  }
}

.bottom-nav a.home i {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #0f172a;
  padding: 14px;
  border-radius: 50%;
  font-size: 1.5rem;
  transform: translateY(-16px);
  box-shadow: 0 8px 20px rgba(34,197,94,0.35);
}

.bottom-nav a.home.active i {
  box-shadow: 0 0 0 4px rgba(34,197,94,0.25);
}

.bottom-nav a {
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.bottom-nav a:active {
  transform: scale(0.9);
  opacity: 0.7;
}

.page-content {
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.exercise-modal {
  max-width: 520px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  animation: modalFadeIn 0.25s ease;
}

.exercise-modal .modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.exercise-modal h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.exercise-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.meta-item {
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 12px 14px;
}

.meta-label {
  display: block;
  font-size: 0.75rem;
  opacity: 0.6;
  margin-bottom: 4px;
}

.meta-value {
  font-size: 0.95rem;
  font-weight: 600;
}

.exercise-description h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  margin-top: 0;
}

.exercise-description p {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.9;
  white-space: pre-line; /* 🔥 aby fungovaly odrážky z DB */
}

.exercise-modal .modal-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

#addExerciseToWorkout {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  border-radius: 12px;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chart-container {
  width: 100%;           /* graf se roztáhne na šířku kontejneru */
  max-width: 100%;       /* nepřesáhne rodiče */
  height: 260px;         /* výchozí výška na desktopu */
}

@media (max-width: 768px) {
  .chart-container {
    height: 180px;       /* menší výška na mobilu, aby graf nebyl stlačený */
  }
}

@media (max-width: 480px) {
  .chart-container {
    height: 150px;       /* ještě menší výška pro malé mobily */
  }
}

.chart-container {
  width: 100%;
  max-width: 100%;
  height: 260px; /* desktop */
}

@media (max-width: 768px) {
  .chart-container {
    height: 200px; /* tablet */
  }
}

@media (max-width: 480px) {
  .chart-container {
    height: 160px; /* mobil */
  }
}

#exerciseChart {
  display: block;
  width: 100% !important;
  height: 100% !important; /* canvas se roztáhne podle wrapperu */
}

.quick-period-wrapper {
  margin: 0.8rem 0 1rem;
}

/* 🔹 Desktop */
.quick-period-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quick-period {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.quick-period:hover {
  background: #eef2ff;
  border-color: #6366f1;
}

/* 🔥 Aktivní stav */
.quick-period.active {
  background: #6366f1;
  color: white;
  border-color: #6366f1;
  box-shadow: 0 4px 10px rgba(99,102,241,0.25);
}

/* 📱 Mobil */
@media (max-width: 600px) {
  .quick-period-filters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
  }

  .quick-period {
    padding: 0.35rem 0.4rem;
    font-size: 0.75rem;
    text-align: center;
  }
}

.leaderboard-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  margin-top: 20px;
}

.lb-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  cursor: pointer;
  color: floralwhite;
}

.lb-btn.active {
  background: linear-gradient(90deg, #2ea44f, #3fb950);
  color: white;
}

.leaderboard-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.lb-item {
  display: grid;
  grid-template-columns: 40px 42px 1fr auto;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card);
}

.lb-item.me {
  box-shadow: 0 0 20px var(--accent-glow);
  border-color: var(--accent);
}

.lb-item img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.leaderboard-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-top: 50px;
  gap: 24px;
  margin-bottom: 32px;
  perspective: 800px; /* aby 3D transformace působily hlouběji */
}

.podium-card {
  background: linear-gradient(145deg, #1f2933, #0f172a);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 12px 24px rgba(0,0,0,0.5); /* pod boxem silný shadow */
  transform: rotateX(8deg); /* lehký 3D tilt */
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.podium-card:hover {
  transform: rotateX(0deg) scale(1.05);
  box-shadow: 0 20px 40px rgba(0,0,0,0.7);
}

.podium-card.place-1 {
  transform: translateY(-30px) scale(1.2) rotateX(8deg);
  box-shadow: 0 20px 50px rgba(255,215,0,0.7); /* golden glow */
  border: 2px solid gold;
}

.podium-card.place-2 {
  transform: translateY(-15px) scale(1.1) rotateX(6deg);
  box-shadow: 0 15px 35px rgba(192,192,192,0.5); /* silver glow */
  border: 2px solid silver;
}

.podium-card.place-3 {
  transform: translateY(-8px) scale(1.05) rotateX(4deg);
  box-shadow: 0 12px 30px rgba(205,127,50,0.5); /* bronze glow */
  border: 2px solid #cd7f32;
}

.podium-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  margin-bottom: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}

.podium-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.podium-info .podium-name {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}

.podium-medal {
  font-size: 28px;
  text-shadow: 0 0 10px gold, 0 0 20px gold; /* glow pro všechny medaile */
}

.crown {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 32px;
  animation: bounce 1.5s infinite, glow 2s infinite alternate;
}

/* animace bounce + glow */
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

@keyframes glow {
  0% { text-shadow: 0 0 10px gold, 0 0 20px gold; }
  50% { text-shadow: 0 0 15px gold, 0 0 30px gold; }
  100% { text-shadow: 0 0 10px gold, 0 0 20px gold; }
}

@media (max-width: 768px) {
  .leaderboard-podium {
    gap: 12px;
    margin: 30px auto 20px;
    align-items: flex-end;
    max-width: 600px;
    margin-top: 20px;
  }

  .podium-card {
    padding: 12px;
    max-width: 120px;
    border-radius: 12px;
    min-width: 100px;
  }

  .podium-avatar {
    width: 56px;
    height: 56px;
    border-width: 2px;
  }

  .podium-medal {
    font-size: 22px;
  }

  .crown {
    font-size: 24px;
    top: -16px;
  }

  .podium-card.place-1 {
    transform: translateY(-18px) scale(1.12) rotateX(6deg);
  }

  .podium-card.place-2 {
    transform: translateY(-10px) scale(1.06) rotateX(4deg);
  }

  .podium-card.place-3 {
    transform: translateY(-5px) scale(1.03) rotateX(3deg);
  }

  .podium-info {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .leaderboard-podium {
    gap: 8px;
    margin: 24px auto 16px;
    flex-wrap: wrap;           /* na velmi malých obrazovkách se karty mohou zalomit */
    justify-content: space-evenly;
    margin-top: 50px;
  }

  .podium-card {
    max-width: 120px;
    padding: 10px;
  }

  .podium-avatar {
    width: 48px;
    height: 48px;
  }

  .podium-medal {
    font-size: 20px;
  }

  .crown {
    font-size: 22px;
    top: -14px;
  }

}

.total-progress-score-wrapper {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.total-progress-score {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #f1f5f9;
  cursor: pointer; /* klikací */
  position: relative;
  transition: background 0.2s ease;
  margin-right: 20px;
}

.total-progress-score:hover {
  background: rgba(255, 255, 255, 0.15);
}

.tooltip-text {
  display: none; /* skryto defaultně */
  position: absolute;
  top: 125%;
  left: 20%;
  transform: translateX(-50%);
  background-color: #1f2937;
  color: #f1f5f9;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.3;
  width: max-content;
  max-width: 200px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 100;
}

/* === ACHIEVER TOUR – vylepšená verze popoveru === */

.achiever-tour-popover {
    background: rgba(15, 23, 42, 0.28) !important;           /* tmavší + mírně průhledný */
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
    border-radius: 20px !important;                           /* větší zaoblení */
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.65),
        0 0 0 1px rgba(34,197,94,0.15) inset !important;
    padding: 24px 28px !important;
    max-width: 400px !important;
    font-family: inherit !important;
}

/* Nadpis */
.achiever-tour-popover .driver-popover-title {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #22c55e !important;
    margin: 0 0 12px !important;
}

/* Text */
.achiever-tour-popover .driver-popover-description {
    font-size: 1.02rem !important;
    line-height: 1.6 !important;
    color: #cbd5e1 !important;
    margin: 0 0 24px !important;
}

/* Progress text (1/5) */
.achiever-tour-popover .driver-popover-progress-text {
    font-size: 0.9rem !important;
    color: #94a3b8 !important;
    margin-bottom: 16px !important;
}

/* Footer s tlačítky */
.achiever-tour-popover .driver-popover-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Všechna tlačítka */
.achiever-tour-popover .driver-popover-btn {
    padding: 12px 24px !important;              /* větší */
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-width: 100px !important;                /* aby nebyla příliš malá */
}

/* Další / Zpět – zelená gradient */
.achiever-tour-popover .driver-popover-btn-next,
.achiever-tour-popover .driver-popover-btn-prev {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(34,197,94,0.3) !important;
}

.achiever-tour-popover .driver-popover-btn-next:hover,
.achiever-tour-popover .driver-popover-btn-prev:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(34,197,94,0.45) !important;
}

/* Zavřít tlačítko – tmavé, subtilní */
.achiever-tour-popover .driver-popover-btn-close {
    background: rgba(255,255,255,0.08) !important;
    color: #94a3b8 !important;
    padding: 10px 14px !important;
    font-size: 1.1rem !important;
    min-width: auto !important;
}

.achiever-tour-popover .driver-popover-btn-close:hover {
    background: rgba(239,68,68,0.2) !important;
    color: #ef4444 !important;
}

/* Šipka – aby ladila s borderem */
.achiever-tour-popover .driver-popover-arrow {
    border-color: rgba(34,197,94,0.35) !important;
}

/* Highlight okolo aktuálního elementu */
.driver-overlay-highlighted-element {
    box-shadow: 0 0 0 4px rgba(34,197,94,0.4) !important;
    border-radius: 12px !important;
    transition: box-shadow 0.4s ease !important;
}

/* Mobil – ještě větší tlačítka a padding */
@media (max-width: 480px) {
    .achiever-tour-popover {
        padding: 20px 22px !important;
        border-radius: 18px !important;
        max-width: 94% !important;
    }
    .achiever-tour-popover .driver-popover-btn {
        padding: 14px 28px !important;
        font-size: 1.05rem !important;
    }
}

/* === ACHIEVER TOUR – zesílená verze pro tlačítka === */

.achiever-tour-popover .driver-popover-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 16px !important;               /* více místa mezi tlačítky */
}

/* VŠECHNA tlačítka – základní reset + větší velikost */
.achiever-tour-popover .driver-popover-btn {
    padding: 14px 28px !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    border: none !important;
    cursor: pointer !important;
    min-width: 120px !important;
    transition: all 0.22s ease !important;
    box-sizing: border-box !important;
}

/* Další a Zpět – zelený gradient */
.achiever-tour-popover .driver-popover-btn-next,
.achiever-tour-popover .driver-popover-btn-prev {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: white !important;
    box-shadow: 0 4px 14px rgba(34,197,94,0.35) !important;
}

.achiever-tour-popover .driver-popover-btn-next:hover,
.achiever-tour-popover .driver-popover-btn-prev:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(34,197,94,0.5) !important;
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
}

/* Zavřít (✕) – tmavé, menší */
.achiever-tour-popover .driver-popover-btn-close {
    background: rgba(51, 65, 85, 0.6) !important;   /* tmavě šedá */
    color: #cbd5e1 !important;
    padding: 10px 16px !important;
    font-size: 1.1rem !important;
    min-width: auto !important;
    border-radius: 10px !important;
}

.achiever-tour-popover .driver-popover-btn-close:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    color: #ef4444 !important;
}

/* Progress text – aby nebyl tak malý */
.achiever-tour-popover .driver-popover-progress-text {
    font-size: 0.95rem !important;
    color: #94a3b8 !important;
    margin-bottom: 18px !important;
}

/* Nejsilnější override – přímo na button v popoveru */
.achiever-tour-popover button.driver-popover-btn {
    padding: 14px 28px !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    border: none !important;
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: white !important;
    box-shadow: 0 4px 14px rgba(34,197,94,0.35) !important;
    cursor: pointer !important;
    text-shadow: none !important;                /* zruší bílý stín */
    line-height: 1.4 !important;
}

/* Hover pro hlavní tlačítka */
.achiever-tour-popover button.driver-popover-btn:not(.driver-popover-btn-close):hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(34,197,94,0.55) !important;
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
}

/* Close button – odděleně */
.achiever-tour-popover button.driver-popover-btn-close {
    background: rgba(51, 65, 85, 0.7) !important;
    color: #cbd5e1 !important;
    padding: 10px 18px !important;
    font-size: 1.1rem !important;
    min-width: auto !important;
    border-radius: 10px !important;
}

.achiever-tour-popover button.driver-popover-btn-close:hover {
    background: rgba(239, 68, 68, 0.35) !important;
    color: white !important;
}