﻿:root {
  --primary: #fd297b;
  --secondary: #ff655b;
  --bg-color: #f0f2f5;
  --card-bg: #ffffff;
  --text-main: #333;
  --mobile-header-height: 64px;
}

body {
  font-family: "Segoe UI", sans-serif;
  margin: 0;
  background: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
}
.app-container {
  display: flex;
  height: 100vh;
}
.hidden {
  display: none !important;
}

/* --- Sidebar --- */
.sidebar {
  width: 320px;
  background: white;
  border-right: 1px solid #ddd;
  padding: 20px;
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 100;
}
.desktop-header h2 {
  margin-top: 0;
  color: #000;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.brand-title {
  margin: 0;
  color: #000;
}
.trainer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}
.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 28px auto 0;
  padding: 12px 16px;
  border-radius: 999px;
  background: #d4001a;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.4px;
  box-shadow: 0 8px 18px rgba(212, 0, 26, 0.25);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.back-btn:hover {
  background: #b10015;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 22px rgba(212, 0, 26, 0.35);
}
.back-btn:active {
  transform: translateY(0) scale(0.98);
}
.mini-card {
  border-radius: 10px;
  overflow: hidden;
  height: 140px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}
.mini-card:hover {
  transform: scale(1.02);
}
.mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.mini-card p {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(transparent, black);
  color: white;
  margin: 0;
  padding: 5px;
  font-size: 0.9rem;
  font-weight: bold;
}

/* --- Main View --- */
.main-view {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 20px;
}
.card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

/* --- Image Slider & Animation --- */
.image-slider {
  position: relative;
  aspect-ratio: 2 / 3;
  height: auto;
  background: var(--card-bg);
  overflow: hidden;
}
.image-slider img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 1;
  transition: opacity 0.1s ease-in-out;
}

.hearts-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.heart {
  position: absolute;
  left: var(--left);
  bottom: 12%;
  font-size: var(--size);
  color: #ff2d75;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  opacity: 0;
  animation: heartFloat var(--duration) ease-out var(--delay) forwards;
  transform: translateX(var(--drift));
}
.heart-big {
  left: 50%;
  bottom: 20%;
  font-size: 96px;
  color: #ff2d75;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  animation: heartPop 0.9s ease-out forwards;
  transform: translateX(-50%) scale(0.6);
}
@keyframes heartPop {
  0% {
    transform: translateX(-50%) scale(0.6);
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  60% {
    transform: translateX(-50%) scale(1.15);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) scale(0.9);
    opacity: 0;
  }
}
@keyframes heartFloat {
  0% {
    transform: translateX(var(--drift)) translateY(0) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translateX(var(--drift)) translateY(-160px) scale(1.2);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .heart {
    animation: none;
  }
}
.story-progress {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
  z-index: 5;
  pointer-events: none;
}
.story-seg {
  height: 4px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
  overflow: hidden;
}
.story-seg span {
  display: block;
  height: 100%;
  width: 0%;
  background: #f70226;
  transition: width 180ms ease;
}
.story-seg.active span {
  width: 100%;
}
/* --- Controls (Arrows) --- */
.slider-controls {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.nav-arrow {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  margin: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.nav-arrow:hover {
  background: rgba(255, 255, 255, 0.5);
}
.nav-arrow svg {
  width: 24px;
  height: 24px;
  fill: #f70226;
  transition: fill 0.2s ease;
}
.nav-arrow:hover svg {
  fill: #000;
}

/* --- Info Section --- */
.info {
  padding: 25px;
  text-align: center;
}
.info-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.status-dot {
  width: 10px;
  height: 10px;
  background: #4caf50;
  border-radius: 50%;
  display: inline-block;
}
.btn-match {
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 15px 50px;
  border-radius: 30px;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  margin-top: 15px;
  box-shadow: 0 5px 15px rgba(253, 41, 123, 0.3);
  transition: transform 0.2s;
}
.btn-match:active {
  transform: scale(0.95);
}

.details-box {
  margin-top: 20px;
  text-align: left;
  background: #f9f9f9;
  padding: 15px;
  border-radius: 12px;
  animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.contact-row {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 10px;
}
.contact-row a {
  font-weight: 700;
  color: #d4001a;
  text-decoration: none;
}
.contact-row a:hover {
  text-decoration: underline;
}
.contact-row:last-child {
  border-bottom: none;
}

/* --- RESPONSIVITA (Mobil) --- */
.mobile-header {
  display: none;
  height: var(--mobile-header-height);
  padding: 0 16px;
  box-sizing: border-box;
  background: white;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.icon-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .app-container {
    padding-top: var(--mobile-header-height); /* místo pro hlavičku */
    display: block;
    min-height: calc(100dvh - var(--mobile-header-height));
  }
  .mobile-header {
    display: flex;
  }
  .desktop-header {
    display: none;
  }

  /* Sidebar se chová jako "Drawer" menu */
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }

  .main-view {
    padding: 10px;
    min-height: calc(100dvh - var(--mobile-header-height));
  }
  .card {
    height: auto;
    border-radius: 10px;
    max-width: 88vw;
  }
  .image-slider {
    flex-grow: 0;
    height: auto;
    aspect-ratio: 2 / 3;
  }

  .info {
    padding: 18px;
  }
  .btn-match {
    padding: 12px 36px;
    font-size: 1rem;
  }

  /* Ztmavení pozadí když je menu otevřené */
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
  }
}

@media (min-width: 769px) {
  .image-slider img {
    object-fit: cover;
  }
}
