@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;
}

/* style.css (support.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;
  --input-border: #334155;
  --toggle-bg: #111827;
  --toggle-on: #0f172a;
  --toggle-knob: #f9fafb;
  --success-bg: #022c22;
  --success-border: #22c55e;
  --success-text: #bbf7d0;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --bg-primary-rgb: 15, 23, 42;
}

: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;
  --input-border: #d1d5db;
  --toggle-bg: #e5e7eb;
  --toggle-on: #f3f4f6;
  --toggle-knob: #f9fafb;
  --success-bg: #ecfdf5;
  --success-border: #22c55e;
  --success-text: #166534;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --bg-primary-rgb: 243, 244, 246;
}

/* APLIKUJ NA HLAVNÍ ELEMENTS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, Inter, Roboto, Inter;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  transition: all 0.2s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Hero header */
.hero {
  text-align: center;
  padding: 24px 0 24px 0;
  background: transparent;
}

.hero h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
  font-weight: 400;
  margin-bottom: 8px;
}

/* DONATION BUTTONS - MODERNÍ DESIGN */
.donation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.donation-btn, .donate-btn {
  margin: 0 auto;
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 90%;
}

.donation-btn::before,
.donate-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 70%, #764ba2) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  border-radius: 12px;
}

.donation-btn:hover::before,
.donate-btn:hover::before {
  display: none;
}

.donation-btn:hover,
.donate-btn:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(96, 165, 250, 0.25);
}

.donation-btn span,
.donate-btn span {
  position: relative;
  z-index: 1;
}

.donation-btn:active,
.donate-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(96, 165, 250, 0.15);
}

/* CUSTOM AMOUNT CARD */
.custom-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 2px solid var(--border);
  padding: 18px 16px 20px;
  margin-bottom: 20px;
}

.custom-card h3,
.custom-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

/* INPUT FIELD */
.custom-input-block input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.custom-input-block input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.custom-input-block input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

/* +/- BUTTONS */
.amount-stepper {
  min-height: 52px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.amount-stepper:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}

.amount-stepper:active {
  transform: scale(0.98);
}

/* SEND BUTTON - ACCENT */
.btn-primary.full {
  position: relative;
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 85%, #1d4ed8) 100%);
  border: 2px solid transparent;
  color: white;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 52px;
  box-shadow: 0 4px 14px rgba(96, 165, 250, 0.3);
}

.btn-primary.full:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(96, 165, 250, 0.4);
}

.btn-primary.full:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(96, 165, 250, 0.3);
}

/* CUSTOM ACTIONS ROW */
.custom-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 10px;
  margin-top: 15px;
}

/* Cards & Sections */
.custom-section,
.wallet-status,
.support-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.custom-input-group input,
#messageField {
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  color: var(--text-primary);
  font-size: 16px;
  border-radius: 10px;
  padding: 12px 14px;
}

.custom-input-group input::placeholder,
#messageField::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.custom-input-group input:focus,
#messageField:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.info-box {
  background: var(--success-bg);
  border-left: 3px solid var(--success-border);
  color: var(--success-text);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin: 12px 0;
}

/* BOTTOM NAV - THEME READY */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(var(--bg-primary-rgb), 0.95);
  border-top: 1px solid var(--border);
  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);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
  -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);
  font-weight: 700;
}

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

.page-content {
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

/* Status Messages */
#status {
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
  display: none;
  font-size: 14px;
  line-height: 1.4;
}

#status.show {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#status.success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

#status.error {
  background: color-mix(in srgb, var(--bg-primary) 80%, #f87171);
  color: #fecaca;
  border: 1px solid #f87171;
}

#status.processing {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

/* Wallet Info */
.wallet-status {
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 18px;
  display: none;
}

.wallet-status.show {
  display: block;
}

#walletInfo p {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

#address {
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
  word-break: break-all;
}

/* Support Layout */
.support-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 12px;
}

.support-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.support-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.support-info h3,
.support-info h4 {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.support-info ul {
  margin: 10px 0 0 20px;
  padding: 0;
}

.support-info li {
  margin: 6px 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.support-info.secondary {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.back-link:hover {
  text-decoration: underline;
}

/* Message Section */
.message-section h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-weight: 700;
}

#messageField {
  width: 100%;
  min-height: 100px;
  line-height: 1.6;
  resize: vertical;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
}

#sendMessageBtn {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  min-height: 52px;
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 85%, #1d4ed8) 100%);
  border: 2px solid transparent;
  color: white;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(96, 165, 250, 0.3);
}

#sendMessageBtn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(96, 165, 250, 0.4);
}

#sendMessageBtn:disabled {
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

/* LABEL STYLING */
label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: block;
}

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

  .support-layout {
    grid-template-columns: 1fr;
  }
}

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

  .hero {
    padding: 20px 0;
  }

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

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

  .donation-grid {
    gap: 10px;
  }

  .custom-actions-row {
    gap: 8px;
  }

  .amount-stepper {
    min-height: 50px;
    font-size: 20px;
  }

  .btn-primary.full {
    font-size: 15px;
    min-height: 50px;
  }
}

@media (max-width: 360px) {
  .donation-btn, .donate-btn {
    font-size: 15px;
    min-height: 44px;
  }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 12px 0;
  }

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

  .bottom-nav {
    height: 56px;
  }
}

/* Remove native number input arrows */
#customAmount {
  -moz-appearance: textfield;
}

#customAmount::-webkit-outer-spin-button,
#customAmount::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Better touch targets for iOS */
@supports (-webkit-touch-callout: none) {
  .donation-btn,
  .btn-primary,
  .amount-stepper,
  button {
    min-height: 44px;
  }
}

/* VRAŤ DONATION GRID DO BLOKU, NE FLEX */
.donation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 24px 0;
}

.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;
}

/* CUSTOM AMOUNT TITLE & CAPTION */
.custom-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.custom-caption {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
