/* =======================================
   Stylový QR generátor – OnlineVýuka.fun
   Moderní dark/light režim + přechod
   ======================================= */

/* ===== RESET ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  transition: background-color 0.6s ease, color 0.6s ease;
}

/* ===== TMA (výchozí režim) ===== */
body {
  background-color: #151b28;
  color: #e5e7eb;
}

/* ===== KONTEJNERY ===== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== HLAVIČKA ===== */
.site-header {
  position: relative;
  background: url("../img/header.png") center center / cover no-repeat;
  color: #fff;
  padding: 80px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: background-color 0.6s ease, color 0.6s ease;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: brightness(0.9);
  z-index: 1;
}

.header-inner {
  position: relative;
  z-index: 2;
}

/* === Logo (větší) === */
.site-header img.site-logo {
  width: 220px;
  height: auto;
  margin-bottom: 14px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  transition: transform 0.3s ease, filter 0.6s ease;
}

.site-header img.site-logo:hover {
  transform: scale(1.05);
}

.site-header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  transition: color 0.6s ease;
}

.site-header .subtitle {
  font-size: 1rem;
  color: #e0e7ff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  transition: color 0.6s ease;
}

/* ===== HLAVNÍ MŘÍŽKA ===== */
.main-grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr;
  gap: 24px;
  padding: 50px 0;
}

.card,
.form-card,
.preview-card,
.info-card {
  background-color: #0b0f16;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  transition: background-color 0.6s ease, box-shadow 0.6s ease;
}

h2, h3 {
  color: #ffffff;
  margin-bottom: 15px;
  transition: color 0.6s ease;
}

/* ===== FORMULÁŘ ===== */
label span {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #cbd5e1;
  transition: color 0.6s ease;
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #1e2535;
  border-radius: 8px;
  background: #111826;
  color: #f1f5f9;
  transition: all 0.3s ease;
}

input:focus, select:focus {
  border-color: #3b82f6;
  outline: none;
}

.actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn.primary {
  background: #3b82f6;
  color: #fff;
}

.btn.primary:hover {
  background: #2563eb;
}

.btn.ghost {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #475569;
}

.btn.ghost:hover {
  background: #1e2535;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== NÁHLED ===== */
.preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100%;
  min-height: 350px;
}

#qrcode, #qrCanvas {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none;
}

.hint {
  color: #64748b;
  font-size: 0.9rem;
  transition: color 0.6s ease;
}

/* ===== INFO PANEL ===== */
.info-card ul {
  list-style: disc;
  padding-left: 20px;
  color: #cbd5e1;
  transition: color 0.6s ease;
}

.info-card li {
  margin-bottom: 8px;
}

.info-card b {
  color: #ffffff;
}

/* ===== REKLAMY A SPODNÍ SEKCE ===== */
.ad-bottom {
  padding: 40px 0;
  text-align: center;
}

.ad-placeholder {
  background: #0b0f16;
  color: #64748b;
  padding: 40px;
  border-radius: 16px;
  border: 1px dashed #2e3547;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #0f1725;
  color: #94a3b8;
  padding: 30px 20px;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  transition: background-color 0.6s ease, color 0.6s ease;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-inner p {
  margin: 8px 0;
}

.footer-inner .small {
  font-size: 0.85rem;
  opacity: 0.9;
}

.site-footer a {
  color: #60a5fa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: #3b82f6;
  text-decoration: underline;
}

/* ===== DROBNOSTI ===== */
.sep {
  margin: 25px 0;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
  .form-card, .preview-card, .info-card {
    margin-bottom: 20px;
  }
  .actions {
    justify-content: center;
  }
}

/* =======================================
   SVĚTLÝ REŽIM
   ======================================= */
body.light-mode {
  background-color: #e9eef6;
  color: #1f2937;
  transition: background-color 0.6s ease, color 0.6s ease;
}

body.light-mode .site-header {
  background: url("../img/header.png") center center / cover no-repeat;
}

body.light-mode .site-header::before {
  background: rgba(255,255,255,0.45);
}

body.light-mode .site-header h1,
body.light-mode .site-header .subtitle {
  color: #1a1a1a;
  text-shadow: none;
}

body.light-mode .form-card,
body.light-mode .preview-card,
body.light-mode .info-card {
  background-color: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 4px 25px rgba(0,0,0,0.15);
}

body.light-mode input,
body.light-mode select {
  background: #f3f4f6;
  color: #111;
  border: 1px solid #cbd5e1;
}

body.light-mode .btn.primary {
  background: #2563eb;
  color: white;
}

body.light-mode .btn.ghost {
  color: #374151;
  border-color: #94a3b8;
}

body.light-mode .info-card ul {
  color: #374151;
}

body.light-mode .site-footer {
  background: #f3f4f6;
  color: #4b5563;
}

body.light-mode .site-footer a {
  color: #2563eb;
}

body.light-mode .site-footer a:hover {
  color: #1e40af;
}

/* === Moderněji vypadající hlavní tlačítka (bez změny roložení) === */
.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn.primary {
  background: linear-gradient(145deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}
.btn.primary:hover {
  background: linear-gradient(145deg, #2563eb, #1e40af);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59,130,246,0.5);
}

.btn.ghost {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #475569;
  box-shadow: none;
}
.btn.ghost:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
/* === Styl pro přepínač typu QR === */
.tab-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.tab-button {
  flex: 1;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: #1e293b;
  transition: all 0.3s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

/* Hover efekt – jemný rozsvit */
.tab-button:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

/* Aktivní stavy – různé barvy */
.tab-button.active[data-type="url"] {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 0 12px rgba(59,130,246,0.5);
}

.tab-button.active[data-type="vcard"] {
  background: linear-gradient(135deg, #10b981, #34d399);
  box-shadow: 0 0 12px rgba(16,185,129,0.45);
}

/* Světlý režim */
body.light-mode .tab-button {
  background: #e2e8f0;
  color: #1e293b;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}
body.light-mode .tab-button:hover {
  filter: brightness(0.95);
}
body.light-mode .tab-button.active[data-type="url"] {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #fff;
  box-shadow: 0 0 12px rgba(59,130,246,0.4);
}
body.light-mode .tab-button.active[data-type="vcard"] {
  background: linear-gradient(135deg, #10b981, #6ee7b7);
  color: #fff;
  box-shadow: 0 0 12px rgba(16,185,129,0.35);
}
/* === Styl původního přepínače (Text/URL vs vCard) === */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.tabs .tab {
  flex: 1;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: #1e293b;
  transition: all 0.25s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.tabs .tab:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Aktivní barvy podle cílového panelu */
.tabs .tab.active[data-tab="tab-text"] {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 0 12px rgba(59,130,246,0.45);
}

.tabs .tab.active[data-tab="tab-vcard"] {
  background: linear-gradient(135deg, #10b981, #34d399);
  box-shadow: 0 0 12px rgba(16,185,129,0.4);
}

/* Světlý režim */
body.light-mode .tabs .tab {
  background: #e2e8f0;
  color: #1e293b;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

body.light-mode .tabs .tab.active[data-tab="tab-text"] {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #fff;
  box-shadow: 0 0 12px rgba(59,130,246,0.35);
}

body.light-mode .tabs .tab.active[data-tab="tab-vcard"] {
  background: linear-gradient(135deg, #10b981, #6ee7b7);
  color: #fff;
  box-shadow: 0 0 12px rgba(16,185,129,0.3);
}
/* Tab panely – jistota viditelnosti/skrývání */
.tab-panel { display: none; }
.tab-panel.active { display: block; }
/* Styl pro vCard formulář */
.vcard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-top: 15px;
}

.vcard-grid label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary, #ccc);
  margin-bottom: 4px;
}

.vcard-grid input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background-color: rgba(255,255,255,0.05);
  color: #fff;
  transition: border-color 0.2s ease;
}

.vcard-grid input:focus {
  border-color: var(--accent, #4dd0e1);
  outline: none;
}

/* Responsivní chování */
@media (max-width: 768px) {
  .vcard-grid {
    grid-template-columns: 1fr;
  }
}
/* === ANIMACE PŘEPNUTÍ REŽIMU === */
body {
  transition: background-color 0.4s ease, color 0.4s ease, filter 0.4s ease;
}

/* Změkčení přechodu mezi světlým a tmavým */
body.light-mode {
  filter: brightness(1);
  transition: background-color 0.4s ease, color 0.4s ease, filter 0.4s ease;
}

/* Krátký efekt ztmavení při přepnutí */
body.transitioning {
  transition: none;
  animation: fadeTransition 0.4s ease;
}

@keyframes fadeTransition {
  0%   { opacity: 0; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}