/* Import písma z Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700&display=swap');

body {
  position: relative;
  font: 16px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: #1f2330;
  background-color: #f6f7fb;
  background-image: url('https://www.onlinevyuka.fun/zvirata/img/otisky.png');
  background-repeat: repeat;
  background-size: 600px 600px;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(246,247,251,0.6);
  pointer-events: none;
  z-index: -1;
}

.container { 
  max-width: 1100px; 
  margin: 24px auto; 
  padding: 0 16px; 
}

header { 
  display: flex; 
  align-items: center; 
  gap: 16px; 
}

header img { 
  height: 140px; 
  width: auto; 
  border-radius: 12px; 
  object-fit: contain; 
  background: #fff; 
  padding: 4px; 
}

h1 {
  font-family: "Baloo 2", "Comic Neue", system-ui, sans-serif;
  font-weight: 700;
  font-size: 2.4rem;
  color: #8b5a2b;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 6px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.15);
}

.promo { 
  background: #e0f2fe; 
  border-left: 6px solid #0ea5e9; 
  padding: 16px; 
  border-radius: 12px; 
  margin-top: 16px; 
  margin-bottom: 16px; 
  line-height: 1.6; 
}

.card { 
  background: #f8f1e4; 
  border-radius: 14px; 
  padding: 16px; 
  box-shadow: 0 8px 26px rgba(20,20,40,.06); 
  margin-top: 14px; 
}

.controls { 
  display: grid; 
  grid-template-columns: 1fr 1fr 1fr 1fr; 
  gap: 12px; 
  align-items: end;
}

.controls > div {
  display: flex;
  flex-direction: column;
}

.controls label {
  margin-bottom: 4px;
  font-weight: 500;
  font-size: 0.9rem;
}

.btn-wrapper {
  display: flex;
  align-items: flex-end;
}

select, input { 
  width: 100%; 
  padding: 10px 12px; 
  border: 2px solid #d4c4a8;
  border-radius: 10px;
  box-sizing: border-box;
  background: #ffffff;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

select:focus, input:focus {
  outline: none;
  border-color: #c7a16a;
  box-shadow: 0 0 0 3px rgba(199, 161, 106, 0.1);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b5a2b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.btn { 
  cursor: pointer; 
  border: 0; 
  border-radius: 12px; 
  padding: 10px 14px; 
  background: #0ea5e9; 
  color: #fff; 
  font-weight: 600;
  white-space: nowrap;
  width: 100%;
  transition: background 0.3s ease;
}

.btn:hover { 
  background: #0284c7; 
}

.grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); 
  gap: 10px; 
  margin-top: 8px; 
}

.name { 
  color: #fff; 
  padding: 12px; 
  border-radius: 12px; 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 8px; 
  transition: background .3s; 
}

.name.cat { background: #c7a16a; }
.name.cat:hover { background: #a88547; }

.name.dog { background: #6b4423; }
.name.dog:hover { background: #5a3a1e; }

.name.parrot { background: #16a34a; }
.name.parrot:hover { background: #15803d; }

.name.guinea { background: #d4a574; }
.name.guinea:hover { background: #b8925f; }

.name.mouse { background: #6b7280; }
.name.mouse:hover { background: #4b5563; }

button.fav { 
  background: transparent; 
  border: 0; 
  color: #fff; 
  font-size: 1.1rem; 
  cursor: pointer;
  transition: transform 0.2s ease;
}

button.fav:hover {
  transform: scale(1.2);
}

button.fav.saved { 
  color: #ff4757; 
}

.card .top { 
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-download {
  background: #0ea5e9;
  min-width: auto;
  padding: 10px 16px;
}

.btn-download:hover {
  background: #0284c7;
}

.btn-facebook {
  background: #1877f2;
  min-width: auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-facebook:hover {
  background: #166fe5;
}

.btn-facebook svg {
  flex-shrink: 0;
}

.table { 
  width: 100%; 
  border-collapse: collapse; 
  margin-top: 12px;
}

.table th, .table td { 
  padding: 8px; 
  border-bottom: 1px solid #e5e7eb; 
  text-align: left;
}

.table th {
  font-weight: 600;
  background: #f0e8d8;
}

.intro {
  background: #fff8ee;
  border-left: 6px solid #c7a16a;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.intro h2 {
  margin-top: 0;
  color: #8b5a2b;
}

/* Hlášení o nenalezených jménech */
.no-results {
  background: #fef3c7;
  border-left: 6px solid #f59e0b;
  padding: 16px 20px;
  border-radius: 12px;
  margin-top: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.no-results p {
  margin: 0;
  color: #92400e;
  font-weight: 500;
  line-height: 1.6;
}

/* Hlášení o prázdných oblíbených */
.no-favorites {
  background: #f3f4f6;
  border: 2px dashed #d1d5db;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  margin-top: 12px;
}

.no-favorites p {
  margin: 0;
  color: #6b7280;
  font-size: 0.95rem;
}

/* Nové info sekce */
.info-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.info-box {
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(20,20,40,.06);
  border-left: 6px solid;
}

.info-box h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.info-box p {
  line-height: 1.6;
  margin: 0;
}

.info-box-1 {
  background: #fef3c7;
  border-left-color: #f59e0b;
}

.info-box-1 h3 {
  color: #92400e;
}

.info-box-2 {
  background: #dbeafe;
  border-left-color: #3b82f6;
}

.info-box-2 h3 {
  color: #1e40af;
}

.info-box-3 {
  background: #dcfce7;
  border-left-color: #22c55e;
}

.info-box-3 h3 {
  color: #166534;
}

/* Reklamní banner */
.banner-ad {
  margin: 24px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.banner-placeholder {
  background: #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  width: 100%;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 0.95rem;
  border: 2px dashed #d1d5db;
}

.banner img {
  display: block;
  height: auto;
  max-width: 100%;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* Footer */
footer {
  text-align: center;
  margin: 24px 0;
  padding: 20px 16px;
  color: #6b563a;
  font-size: 0.9rem;
  background: #f8f1e4;
  border-radius: 12px;
}

footer p {
  margin: 6px 0;
  line-height: 1.5;
}

footer a {
  color: #8b5a2b;
  text-decoration: none;
  font-weight: 600;
}

footer a:hover {
  text-decoration: underline;
}

.copyright-warning {
  font-size: 0.85rem;
  color: #9b7350;
}

.license-link {
  font-size: 0.85rem;
  margin-top: 8px;
  color: #8b5a2b;
}

.license-link a {
  font-weight: 500;
  color: #8b5a2b;
  text-decoration: none;
}

.license-link a:hover {
  text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
  .controls {
    grid-template-columns: 1fr 1fr;
  }
  
  .btn-wrapper {
    grid-column: 1 / -1;
  }
  
  h1 { 
    font-size: 1.6rem; 
  }
  
  header { 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
  }
  
  header img {
    height: 100px;
  }
  
  .promo h2 { 
    font-size: 1.3rem; 
  }
  
  .card .top { 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 12px; 
  }
  
  .action-buttons {
    width: 100%;
    flex-direction: column;
  }
  
  .card .top .btn,
  .action-buttons .btn {
    width: 100%;
  }
  
  .info-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .controls {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 1.4rem;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  
  .name {
    font-size: 0.9rem;
    padding: 10px;
  }
  
  .table {
    font-size: 0.85rem;
  }
  
  .table th, .table td {
    padding: 6px 4px;
  }
}