:root {
  --bg: #0b1220;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.65);
  --danger: #ff4d6d;
  --ok: #33d69f;
  --accent: #7c5cff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --radius-sm: 12px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(124, 92, 255, 0.25), transparent 55%),
    radial-gradient(900px 600px at 80% 20%, rgba(51, 214, 159, 0.15), transparent 60%),
    radial-gradient(900px 600px at 50% 90%, rgba(255, 77, 109, 0.10), transparent 65%),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.35;
  background-attachment: fixed;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.9), rgba(51, 214, 159, 0.85));
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #07101c;
}

.brand-text {
  min-width: 0;
}

.brand-title {
  font-weight: 700;
  font-size: 16px;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70vw;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
}

.badge.online {
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(51, 214, 159, 0.35);
  background: rgba(51, 214, 159, 0.12);
}

.badge.offline {
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 77, 109, 0.35);
  background: rgba(255, 77, 109, 0.12);
}

.grid {
  display: grid;
  grid-template-columns: 1.25fr 1.75fr ;
  gap: 14px;
  align-items: start;
}

.card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.card-header h1,
.card-header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.2px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.form {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-size: 12px;
  color: var(--muted);
}

.input,
.textarea {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.20);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  font-size: 13px;
}

.textarea {
  resize: vertical;
  min-height: 110px;
  font-family: var(--mono);
}

.textarea-readonly {
  background: rgba(0, 0, 0, 0.24);
}

.input:focus,
.textarea:focus {
  border-color: rgba(124, 92, 255, 0.60);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.15);
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

.error {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 77, 109, 0.35);
  background: rgba(255, 77, 109, 0.12);
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
}

.field-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.msg {
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
}

.btn {
  border: 1px solid rgba(124, 92, 255, 0.40);
  background: rgba(124, 92, 255, 0.18);
  color: rgba(255, 255, 255, 0.95);
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  user-select: none;
  transition: transform 80ms ease, background 150ms ease, border-color 150ms ease;
}

.btn:hover {
  background: rgba(124, 92, 255, 0.25);
  border-color: rgba(124, 92, 255, 0.55);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  border-color: rgba(51, 214, 159, 0.40);
  background: rgba(51, 214, 159, 0.16);
}

.btn-secondary:hover {
  background: rgba(51, 214, 159, 0.24);
  border-color: rgba(51, 214, 159, 0.55);
}

.btn-ghost {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.06);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.10);
}

.btn-danger {
  border-color: rgba(255, 77, 109, 0.45);
  color: rgba(255, 255, 255, 0.95);
}

.btn-small {
  padding: 7px 10px;
  font-size: 12px;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toggle-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-ui {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  transition: background 150ms ease, border-color 150ms ease;
}

.toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.90);
  transition: transform 150ms ease, background 150ms ease;
}

.toggle input:checked + .toggle-ui {
  background: rgba(51, 214, 159, 0.20);
  border-color: rgba(51, 214, 159, 0.45);
}

.toggle input:checked + .toggle-ui::after {
  transform: translateX(18px);
  background: rgba(255, 255, 255, 0.95);
}

.toggle-text {
  font-size: 12px;
  color: var(--muted);
}

.history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.history {
  padding: 8px;
  max-height: 493px;
  overflow: auto;
}

.history-item {
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.16);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0;
}

.history-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.history-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.history-title strong {
  font-size: 13px;
  font-weight: 750;
}

.history-title .meta {
  color: var(--muted);
  font-size: 12px;
}

.history-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.kv {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 6px 10px;
  align-items: start;
}

.k {
  color: var(--muted);
  font-size: 12px;
}

.v {
  font-family: var(--mono);
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.empty {
  padding: 22px 14px;
  color: var(--muted);
  font-size: 13px;
}

.ads {
  display: block;
}

.ad-slot {
  padding: 14px;
}

.ad-placeholder {
  border: 1px dashed rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  padding: 14px;
  min-height: 96px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.footer {
  padding: 10px 6px;
  color: #ccc;
  padding: 20px;
  font-family: Arial, sans-serif;
  text-align: center;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* da bude responsivno */
}

.footer-left {
  text-align: left;
  flex: 1;
}

.footer-center {
  text-align: center;
  flex: 1;
}

.footer-right {
  text-align: right;
  flex: 1;
  position: relative;
}

.footer-right a {
  margin-left: 10px;
  color: #ccc;
  position: relative;
  display: inline-block;
  transition: transform 0.2s, color 0.2s;
}

.footer-right a:hover {
  transform: scale(1.2);
}

.footer-right a svg {
  fill: currentColor;
  vertical-align: middle;
}

/* Tooltip */
.footer-right .tooltip {
  visibility: hidden;
  width: max-content;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 2px 6px;
  position: absolute;
  bottom: 125%; /* iznad ikone */
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.footer-right a:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  z-index: 50;
}

.modal {
  position: fixed;
  inset: auto 50% 50% auto;
  transform: translate(50%, 50%);
  width: min(520px, calc(100vw - 24px));
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.05));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 60;
  overflow: hidden;
}

.modal-header {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.modal-title {
  font-weight: 800;
  font-size: 14px;
}

.modal-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.modal-body {
  padding: 14px;
}

.modal-actions {
  padding: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 981px) {
  .ads {
    position: sticky;
    top: 14px;
    align-self: start;
    height: fit-content;
  }
}

.seo-section{
  margin-top:40px;
}

.seo-content{
  padding:20px;
}

.faq-section{
  padding:20px;
}

.faq-item{
  border-top:1px solid #ddd;
}

.faq-question{
  width:100%;
  text-align:left;
  padding:14px;
  background:none;
  border:none;
  font-size:16px;
  cursor:pointer;
  color:#c7c7c7;
}

.faq-answer{
  display:none;
  padding:0 14px 14px 14px;
  color:#7a7a7a;
}

.faq-item.open .faq-answer{
  display:block;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #0b1220;
  color: #fff;
  padding: 15px;
  display: none; /* default hidden */
  justify-content: center;
  align-items: center;
  z-index: 1000;
  font-size: 14px;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.3);
}

.cookie-banner a {
  color: #00bfff;
  text-decoration: underline;
}

.cookie-content {
  max-width: 960px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.cookie-actions {
  margin-left: 15px;
}

.cookie-actions .btn {
  margin-left: 5px;
}




.examples-section {
  padding: 20px;
  font-family: Arial, sans-serif;
}

.examples-section h3 {
  margin-bottom: 16px;
  color: #c7c7c7;
}

.examples-table {
  width: 100%;
  border-collapse: collapse;
}

.examples-table th,
.examples-table td {
  border: 1px solid #c7c7c7;
  padding: 12px;
  text-align: left;
}

.examples-table th {
  background-color: #f4f4f400;
  color: #c7c7c7;
}

.examples-table tr:nth-child(even) {
  background-color: #fafafa00;
}

.examples-table code {
  background-color: #f0f0f000;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}