@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* NO FLASH - PŘED :root */
html[data-theme="light"] body,
body.light {
  background: #f3f4f6 !important;
  color: #111827 !important;
}

html[data-theme="dark"] body,
body.dark {
  background: #0f172a !important;
  color: #e5e7eb !important;
}

/* security.css - PROFESIONÁLNÍ DARK/LIGHT READY + CENTERED */

/* CSS VARIABLES - DARK THEME */
:root[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #020617;
  --bg-card: #0b1120;
  --bg-hover: #111827;
  --text-primary: #e5e7eb;
  --text-secondary: #9ca3af;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --input-bg: #020617;
  --warning-bg: rgba(127, 29, 29, 0.7);
  --success-bg: #022c22;
  --success-border: #14532d;
  --success-text: #bbf7d0;
  --bg-primary-rgb: 15, 23, 42;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
}

/* CSS VARIABLES - LIGHT THEME */
:root[data-theme="light"] {
  --bg-primary: #f3f4f6;
  --bg-secondary: #ffffff;
  --bg-card: #f9fafb;
  --bg-hover: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --input-bg: #ffffff;
  --warning-bg: #fee2e2;
  --success-bg: #d5f1cc;
  --success-border: #b8e3b0;
  --success-text: #166534;
  --bg-primary-rgb: 243, 244, 246;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* APLIKUJ NA HLAVNÍ ELEMENTS */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', Roboto, Inter;
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* CENTERED CONTAINER */
.container {
  background: var(--bg-secondary) !important;
  width: 100%;
  max-width: 768px;
  min-height: 100vh;
  padding: 16px;
  padding-bottom: 88px;
  margin: 0 auto;
}

.lab-card,
.order-form,
.exchange-card,
.security-item {
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
  transition: all 0.2s ease;
}

.lab-card:hover,
.security-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.order-input-wrap {
  background: var(--input-bg) !important;
  border-color: rgba(148, 163, 184, 0.6) !important;
}

.order-input {
  color: var(--text-primary) !important;
}

.order-input-suffix {
  background: var(--bg-hover) !important;
}

.exchange-warning-box {
  background: var(--warning-bg) !important;
}

.order-tab {
  color: var(--text-primary) !important;
  border-color: rgba(148, 163, 184, 0.4) !important;
}

.exchange-logo {
  background: var(--bg-card) !important;
}

/* BOTTOM NAV - THEME READY */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(var(--bg-primary-rgb), 0.98) !important;
  border-top: 1px solid var(--border) !important;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.bottom-nav a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--text-secondary) !important;
  font-size: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  transition: all 0.2s ease;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-icon {
  font-size: 22px;
  transition: transform 0.2s ease;
}

.bottom-nav a:active .bottom-nav-icon {
  transform: scale(0.9);
}

.bottom-nav a span {
  line-height: 1;
}

.bottom-nav a.active {
  color: var(--accent) !important;
  font-weight: 700;
}

.bottom-nav a.active .bottom-nav-icon {
  transform: scale(1.08);
}

/* SCAM WARNING BUTTON */
.scam-warning-btn {
  background: #FF4757;
  color: white;
  border: 2px solid #FF4757;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 200px;
  display: block;
  margin: 20px auto;
  transition: all 0.3s ease;
}

.scam-warning-btn:hover {
  background: #FF6B6B;
  border-color: #FF6B6B;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
}

.scam-warning-btn:active {
  transform: translateY(0);
}

/* CONGRATS OVERLAY */
.congrats-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.congrats-content {
  background: linear-gradient(135deg, #00FF88, #00D46A);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 500px;
  color: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.congrats-content h3 {
  font-size: 28px;
  margin-bottom: 20px;
  font-weight: bold;
}

.congrats-content p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.close-congrats {
  background: rgba(0, 0, 0, 0.3);
  color: #000;
  border: none;
  padding: 12px 30px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
  display: block;
  margin: 0 auto;
}

.close-congrats:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* SCAM DEMO - FULLY CENTERED */
.scam-active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  padding: 40px 20px !important;
  border-radius: 20px !important;
  color: white !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.scam-header {
  text-align: center;
}

.scam-header h2 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #FFD700;
}

.scam-header p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 30px;
}

.connect-btn {
  background: #00FF88;
  color: #000;
  padding: 18px 50px;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
  margin: 0 auto 20px;
}

.connect-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 255, 136, 0.4);
}

.seed-input-section {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  margin-top: 20px;
  width: 100%;
  max-width: 500px;
  text-align: center;
}

.seed-textarea {
  width: 100%;
  height: 120px;
  padding: 15px;
  border: 3px solid #FF6B6B;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  font-family: monospace;
  font-size: 16px;
  margin-bottom: 20px;
  resize: vertical;
  display: block;
}

.scam-claim-btn {
  background: linear-gradient(45deg, #FF4757, #FF6B6B);
  color: white;
  padding: 18px 40px;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  max-width: 300px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  display: block;
  margin: 0 auto;
}

.scam-claim-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(255, 71, 87, 0.5);
}

.scam-claim-btn:disabled {
  background: #666 !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}

/* MODAL WINDOWS */
.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: white;
  border-radius: 20px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease-out;
  text-align: center;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-success-header,
.modal-danger-header,
.modal-warning-header {
  padding: 20px 25px;
  border-radius: 20px 20px 0 0;
  text-align: center;
}

.modal-success-header {
  background: linear-gradient(135deg, #00FF88, #00D46A);
  color: #000;
}

.modal-danger-header {
  background: linear-gradient(135deg, #FF6B6B, #FF4757);
  color: white;
}

.modal-warning-header {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
}

.modal-success-header h3,
.modal-danger-header h3,
.modal-warning-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
}

.modal-body {
  padding: 25px;
  line-height: 1.6;
  text-align: center;
}

.modal-body p {
  margin: 0;
  font-size: 16px;
}

.modal-footer {
  padding: 20px 25px 25px;
  text-align: center;
  border-top: 1px solid #eee;
}

.modal-close-btn {
  background: #0052FF;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.modal-close-btn:hover {
  background: #0041CC;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 82, 255, 0.4);
}

/* DEX COMPARISON CARD */
.dex-comparison-card {
  background: #0041c4;
  border-radius: 20px;
  padding: 22px 18px 20px;
  color: #ffffff;
}

.exchange-block {
  background: #020617;
  border-radius: 18px;
  padding: 16px 14px 18px;
  margin-top: 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.exchange-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.exchange-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.exchange-logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.exchange-logo-blue {
  background: #2563eb;
}

.exchange-name {
  font-weight: 700;
  font-size: 14px;
}

.exchange-subtitle {
  font-size: 11px;
  opacity: 0.8;
}

.exchange-status {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.exchange-status-ok {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
}

.exchange-status-warning {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.pair-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.pair-symbol {
  font-size: 13px;
  opacity: 0.85;
}

.pair-price {
  font-size: 20px;
  font-weight: 700;
}

.fake-price {
  color: #facc15;
}

.pair-change {
  font-size: 12px;
}

.negative-change {
  color: #f97373;
}

.neutral-change {
  color: #4ade80;
}

.order-type-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.order-tab {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: #e5e7eb;
  font-size: 11px;
  cursor: default;
}

.order-tab-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.order-form {
  background: #020617;
  border-radius: 12px;
  padding: 10px 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  margin-bottom: 10px;
}

.order-form-row {
  margin-bottom: 8px;
}

.order-form-row label {
  display: block;
  font-size: 11px;
  margin-bottom: 3px;
  opacity: 0.85;
}

.order-input-wrap {
  display: flex;
  align-items: center;
  background: #020617;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  overflow: hidden;
  width: 100%;
}

.order-input {
  flex: 1;
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
  min-width: 0;
}

.order-input-suffix {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  background: #0b1120;
  border-left: 1px solid rgba(148, 163, 184, 0.5);
  white-space: nowrap;
  flex-shrink: 0;
}

.order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  opacity: 0.85;
  margin-top: 4px;
  margin-bottom: 6px;
}

.meta-sep {
  opacity: 0.5;
}

.token-details {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  margin-top: 10px;
  padding-top: 8px;
  font-size: 11px;
}

.token-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.token-label {
  opacity: 0.7;
}

.token-value-danger {
  color: #f97373;
}

.exchange-warning-box {
  margin-top: 8px;
  background: rgba(127, 29, 29, 0.7);
  border-radius: 10px;
  padding: 8px 9px;
  font-size: 11px;
}

.exchange-warning-box .warning-title {
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}

.warning-list {
  margin: 0;
  padding-left: 16px;
}

.token-row-hint {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(148, 163, 184, 0.4);
}

.token-row-hint .token-label {
  font-style: italic;
}

.token-row-hint .token-value {
  opacity: 0.9;
}

/* COMPACT SWAP BUTTON */
.compact-swap-btn {
  max-width: 220px;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 8px;
  margin: 0 auto;
}

.swap-section .input-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.swap-input {
  max-width: 120px;
  padding: 8px 10px;
  font-size: 14px;
}

/* COMPLETED STATES - THEME READY */
#item-lab1.completed,
#item-lab2.completed,
#item-lab3.completed,
#item-lab4.completed,
#item-lab5.completed,
.security-item.completed {
  background: var(--success-bg) !important;
  border-color: var(--success-border) !important;
  color: var(--success-text) !important;
}

#item-lab1.completed h3,
#item-lab1.completed p,
#item-lab2.completed h3,
#item-lab2.completed p,
#item-lab3.completed h3,
#item-lab3.completed p,
#item-lab4.completed h3,
#item-lab4.completed p,
#item-lab5.completed h3,
#item-lab5.completed p {
  color: var(--success-text) !important;
}

#item-lab1.completed:hover,
#item-lab2.completed:hover,
#item-lab3.completed:hover,
#item-lab4.completed:hover,
#item-lab5.completed:hover {
  background: color-mix(in srgb, var(--success-bg) 90%, var(--success-border)) !important;
  border-color: color-mix(in srgb, var(--success-border) 80%, var(--success-text)) !important;
  transform: translateY(-1px);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .container {
    padding: 14px;
  }

  .scam-warning-btn {
    padding: 16px 25px;
    font-size: 16px;
    min-width: 180px;
  }

  .congrats-content {
    padding: 30px 20px;
    margin: 20px;
  }

  .scam-active {
    padding: 30px 15px !important;
  }

  .seed-input-section {
    padding: 25px 20px;
  }

  .modal-content {
    width: 95%;
    margin: 20px;
  }

  .modal-body {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 12px;
  }
}

/* LANDSCAPE MODE */
@media (max-height: 500px) and (orientation: landscape) {
  .bottom-nav {
    height: 56px;
  }
}


/* LAB PAGE SPECIFIC STYLES - PŘIDEJ NA KONEC security.css */

/* HERO CENTERING FOR LAB PAGES */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
  margin-bottom: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero .subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.5;
}

/* TRY SECTION - WRAPPER PRO BUTTONS */
.try-section {
  background: transparent;
  border: none;
  padding: 0;
  margin: 20px 0;
  border-radius: 0;
}

/* CTA BUTTON - RUN THE LAB */
.cta-button {
  display: inline-block;
  padding: 16px 48px;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
  text-transform: none;
  letter-spacing: 0;
  min-width: 180px;
  text-align: center;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.cta-button:active {
  transform: translateY(0);
}

/* SCAM WARNING BUTTON - BETTER POSITIONING */
.scam-warning-btn {
  background: #FF4757;
  color: white;
  border: 2px solid #FF4757;
  padding: 16px 48px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 180px;
  display: block;
  margin: 30px auto;
  transition: all 0.3s ease;
}

.scam-warning-btn:hover {
  background: #FF6B6B;
  border-color: #FF6B6B;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
}

.scam-warning-btn:active {
  transform: translateY(0);
}

/* CONTAINER ADJUSTMENTS FOR LAB PAGES */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 20px;
}

/* RESPONSIVE LAB PAGES */
@media (max-width: 640px) {
  .hero {
    padding: 40px 16px 30px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero .subtitle {
    font-size: 15px;
  }

  .cta-button,
  .scam-warning-btn {
    padding: 14px 32px;
    font-size: 15px;
    min-width: 160px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 30px 12px 20px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .cta-button,
  .scam-warning-btn {
    width: 100%;
    max-width: 280px;
  }
}
.bottom-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
