/* ─── THEME VARIABLES ───────────────────────────────── */
:root {
  --floating-bg: rgba(255, 255, 255, 0.9);
  --floating-text: #111;
  --floating-border: rgba(0, 0, 0, 0.1);
  --input-bg: #f3f4f6;
}

html.dark {
  --floating-bg: rgba(20, 20, 20, 0.7);
  --floating-text: #fff;
  --floating-border: rgba(255, 255, 255, 0.1);
  --input-bg: #1f2937;
}

html {
  scroll-behavior: smooth;
}

/* ─── ANIMATED PLASMA BACKGROUND ───────────────────── */
.plasma-bg {
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.3) 0%, transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(34, 211, 238, 0.25) 0%, transparent 40%),
    radial-gradient(circle at 40% 80%, rgba(139, 92, 246, 0.22) 0%, transparent 38%),
    radial-gradient(circle at 90% 20%, rgba(99, 102, 241, 0.18) 0%, transparent 42%);
  filter: blur(50px);
  animation: plasma-drift 15s ease-in-out infinite;
  will-change: transform;
}

@keyframes plasma-drift {
  0%, 100% { transform: translate(0%, 0%) rotate(0deg) scale(1); }
  33%       { transform: translate(10%, -10%) rotate(8deg) scale(1.08); }
  66%       { transform: translate(-8%, 7%) rotate(-6deg) scale(0.95); }
}

html.dark .plasma-bg {
  background:
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.45) 0%, transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(34, 211, 238, 0.38) 0%, transparent 40%),
    radial-gradient(circle at 40% 80%, rgba(139, 92, 246, 0.32) 0%, transparent 38%),
    radial-gradient(circle at 90% 20%, rgba(99, 102, 241, 0.28) 0%, transparent 42%);
}

.plasma-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 60% 40%, transparent 30%, rgba(255, 255, 255, 0.03) 100%);
  animation: plasma-pulse 12s ease-in-out infinite alternate;
}

@keyframes plasma-pulse {
  0%   { opacity: 0.4; }
  100% { opacity: 0.8; }
}

html.dark .plasma-overlay {
  background: radial-gradient(circle at 60% 40%, transparent 30%, rgba(0, 0, 0, 0.1) 100%);
}

/* ─── ANIMATION DISABLE ─────────────────────────────── */
html.no-animations .plasma-bg,
html.no-animations .plasma-overlay {
  animation: none !important;
}

html.no-animations .fade-up {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: none !important;
}

/* ─── SKIP LINK ─────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #6366f1;
  color: white;
  padding: 8px 16px;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ─── FADE-UP ANIMATION ─────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: transform, opacity;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── GLOW EFFECTS ──────────────────────────────────── */
.glow {
  box-shadow: 0 0 80px rgba(99, 102, 241, 0.25);
}

.glow-hover {
  transition: box-shadow 0.3s ease;
}

.glow-hover:hover {
  box-shadow: 0 0 100px rgba(99, 102, 241, 0.4);
}

/* ─── FLOATING FORM ─────────────────────────────────── */
.floating-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
}

.floating-collapsed {
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(
    120deg,
    #6366F1 0%,
    #8b5cf6 25%,
    #22D3EE 50%,
    #8b5cf6 75%,
    #6366F1 100%
  );
  background-size: 400% 200%;
  animation: gradient-shift 3s linear infinite;
  transition: transform 0.2s ease, opacity 0.3s ease;
}

.floating-expanded {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 300px;
  padding: 18px;
  border-radius: 16px;
  background: var(--floating-bg);
  color: var(--floating-text);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--floating-border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: all 0.25s ease;
}

.floating-expanded label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--floating-text);
  opacity: 0.7;
}

.floating-expanded input,
.floating-expanded select,
.floating-expanded textarea {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--floating-text);
  border: 1px solid var(--floating-border);
  font-size: 14px;
}

/* ─── CUSTOM SELECT ─────────────────────────────────── */
.cs-wrap {
  position: relative;
  margin-bottom: 12px;
}

.cs-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--floating-text);
  border: 1px solid var(--floating-border);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.cs-btn .cs-label {
  opacity: 0.45;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cs-btn.cs-selected .cs-label {
  opacity: 1;
}

.cs-btn:focus {
  outline: 2px solid #6366f1;
  outline-offset: 1px;
}

.cs-arrow {
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform 0.2s ease;
}

.cs-btn[aria-expanded="true"] .cs-arrow {
  transform: rotate(180deg);
}

.cs-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--floating-bg);
  border: 1px solid var(--floating-border);
  border-radius: 8px;
  z-index: 300;
  list-style: none;
  padding: 4px 0;
  margin: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cs-list.cs-open {
  display: block;
}

.cs-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--floating-text);
  transition: background 0.15s ease;
}

.cs-item:hover {
  background: rgba(99, 102, 241, 0.15);
}

.floating-expanded textarea {
  resize: none;
  line-height: 1.5;
}

.floating-expanded input:focus,
.floating-expanded select:focus,
.floating-expanded textarea:focus {
  outline: 2px solid #6366f1;
  outline-offset: 1px;
}

.floating-expanded .submit-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  background: #6366f1;
  color: white;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.floating-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--floating-text);
  opacity: 0.5;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}

.floating-close:hover {
  opacity: 1;
}

.floating-wrapper.open .floating-expanded {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

@media (max-width: 640px) {
  .floating-wrapper.open {
    left: 24px;
    transition: left 0s;
  }
  .floating-wrapper.open .floating-expanded {
    width: 100%;
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    bottom: 0;
    color-scheme: light;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.15) transparent;
  }
  .floating-wrapper.open .floating-expanded::-webkit-scrollbar {
    width: 4px;
  }
  .floating-wrapper.open .floating-expanded::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 16px;
  }
  .floating-wrapper.open .floating-expanded::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
  }
}

html.dark .floating-wrapper.open .floating-expanded {
  color-scheme: dark;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

html.dark .floating-wrapper.open .floating-expanded::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
}

.floating-wrapper.open .floating-collapsed {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

/* ─── TABLE ROW HOVER ───────────────────────────────── */
tbody tr {
  transition: background-color 0.2s ease;
}

tbody tr:hover {
  background-color: rgba(99, 102, 241, 0.05);
}

html.dark tbody tr:hover {
  background-color: rgba(99, 102, 241, 0.1);
}

/* ─── EQUITY SELECTOR ───────────────────────────────── */
.equity-seg {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border-radius: 14px;
  background: #e5e7eb;
}

html.dark .equity-seg {
  background: #1e293b;
}

.equity-thumb {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  border-radius: 10px;
  border: 2px solid #22D3EE;
  background: rgba(34, 211, 238, 0.12);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

.equity-btn {
  position: relative;
  z-index: 2;
  border: none;
  background: transparent;
  padding: 8px 28px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  outline: none;
  color: #6b7280;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

html.dark .equity-btn {
  color: #94a3b8;
}

.equity-btn.active {
  color: #0e7490;
}

html.dark .equity-btn.active {
  color: #22D3EE;
}

.equity-btn:focus-visible {
  outline: 2px solid #22D3EE;
  outline-offset: 2px;
}

/* ─── ANIMATED GRADIENT BUTTON ──────────────────────── */
.cta-gradient-btn {
  background: linear-gradient(
    120deg,
    #6366F1 0%,
    #8b5cf6 25%,
    #22D3EE 50%,
    #8b5cf6 75%,
    #6366F1 100%
  );
  background-size: 400% 200%;
  animation: gradient-shift 3s linear infinite;
  transition: transform 0.2s ease;
}

@keyframes gradient-shift {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 0%; }
  100% { background-position: 0% 0%; }
}

.cta-gradient-btn:hover,
.floating-collapsed:hover,
.floating-expanded .submit-btn:hover {
  transform: scale(1.04);
  outline: 2px solid #22D3EE;
  outline-offset: 2px;
}

/* ─── FAQ HOVER / OPEN STATES ───────────────────────── */
.faq-item {
  transition: background 0.3s ease;
}

.faq-item:hover,
.faq-item.faq-open {
  background: rgba(255, 255, 255, 0.95) !important;
}

html.dark .faq-item:hover,
html.dark .faq-item.faq-open {
  background: rgba(15, 23, 42, 0.95) !important;
}

/* ─── CONSENT BLOCK ─────────────────────────────────── */
.consent-block {
  margin-bottom: 12px;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--floating-text);
  opacity: 0.75;
  cursor: pointer;
  margin-bottom: 0;
}

.consent-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin: 0;
  margin-top: 2px;
  padding: 0;
  border-radius: 3px;
  cursor: pointer;
  accent-color: #22D3EE;
}

.consent-link {
  color: #22D3EE;
  text-decoration: underline;
}

.consent-note {
  margin-top: 8px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--floating-text);
  opacity: 0.45;
}

.floating-expanded .submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  animation: none !important;
  transform: none !important;
  outline: none !important;
}

/* ─── CARD HOVER ─────────────────────────────────────── */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.card-hover:hover {
  transform: scale(1.06) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

html.dark .card-hover:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* ─── SCROLL MARGIN (sticky header offset) ──────────── */
#compare,
#solution,
#howtouse,
#faq {
  scroll-margin-top: 80px;
}

/* ─── CONTACT MODAL ─────────────────────────────────── */
.contact-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-input.error {
  border-color: #ef4444 !important;
  outline: 2px solid #ef4444;
  outline-offset: 1px;
}

.contact-submit-btn:disabled {
  animation: none !important;
  transform: none !important;
  outline: none !important;
}

/* ─── RECAPTCHA V3 BADGE ELREJTÉSE ──────────────────── */
/* Megjegyzés: Google feltételei szerint a Privacy Policy-ban meg kell említeni a reCAPTCHA használatát */
.grecaptcha-badge {
  visibility: hidden !important;
}

/* ─── RECAPTCHA V2 CONTACT MODAL ────────────────────── */
#contactCaptcha > div {
  overflow: hidden !important;
  width: 302px !important;
  height: 76px !important;
  border-radius: 3px !important;
}

/* ─── MODAL SCROLLBAR TÉMA ──────────────────────────── */
#privacyModal .overflow-y-auto,
#contactModal .overflow-y-auto {
  color-scheme: light;
}

html.dark #privacyModal .overflow-y-auto,
html.dark #contactModal .overflow-y-auto {
  color-scheme: dark;
}

/* ─── COMPARISON TABLES ─────────────────────────────── */
.ds-table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
  table-layout: fixed;
}

/* Without DrawShield columns */
.ds-table .col-week   { width: 32px; }
.ds-table .col-perf   { width: auto; }
.ds-table .col-result { width: 80px; }

/* With DrawShield columns */
.ds-table-with .col-cc     { width: 64px; }
.ds-table-with .col-fc     { width: 52px; }
.ds-table-with .col-result { width: 72px; }

.ds-th {
  padding: 8px;
  font-weight: 600;
  color: rgb(55 65 81);
  white-space: nowrap;
}
html.dark .ds-th { color: rgb(209 213 219); }

.ds-td {
  padding: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* --- HERO CHART 3D TILT ----------------------------- */
#heroChartCard {
  transform: perspective(700px) rotateX(8deg) rotateY(-2deg);
  transform-origin: center 80%;
  transition: transform 0.4s ease;
}

#heroChartCard:hover {
  transform: perspective(700px) rotateX(4deg) rotateY(-1deg);
}

/* --- HERO CHART PULSE -------------------------------- */
@keyframes chart-glow-cyan {
  0%, 100% { filter: drop-shadow(0 0 2px #22D3EE) drop-shadow(0 0 5px #22D3EE) drop-shadow(0 5px 8px rgba(34,211,238,0.25)); }
  50%       { filter: drop-shadow(0 0 5px #22D3EE) drop-shadow(0 0 12px #22D3EE) drop-shadow(0 6px 10px rgba(34,211,238,0.4)); }
}

@keyframes chart-glow-red {
  0%, 100% { filter: drop-shadow(0 0 2px #ef4444) drop-shadow(0 0 5px #ef4444) drop-shadow(0 5px 8px rgba(239,68,68,0.25)); }
  50%       { filter: drop-shadow(0 0 5px #ef4444) drop-shadow(0 0 12px #ef4444) drop-shadow(0 6px 10px rgba(239,68,68,0.4)); }
}

@keyframes area-pulse-cyan {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1; }
}

@keyframes area-pulse-red {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1; }
}

.chart-pulse-cyan  { animation: chart-glow-cyan  2.5s ease-in-out infinite; }
.chart-pulse-red   { animation: chart-glow-red   2.5s ease-in-out infinite; }
.area-pulse-cyan   { animation: area-pulse-cyan  2.5s ease-in-out infinite; }
.area-pulse-red    { animation: area-pulse-red   2.5s ease-in-out infinite; }

@keyframes chart-glow-green {
  0%, 100% { filter: drop-shadow(0 0 2px #4ade80) drop-shadow(0 0 5px #4ade80) drop-shadow(0 5px 8px rgba(74,222,128,0.25)); }
  50%       { filter: drop-shadow(0 0 5px #4ade80) drop-shadow(0 0 12px #4ade80) drop-shadow(0 6px 10px rgba(74,222,128,0.4)); }
}

@keyframes area-pulse-green {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1; }
}

.chart-pulse-green { animation: chart-glow-green 2.5s ease-in-out infinite; }
.area-pulse-green  { animation: area-pulse-green  2.5s ease-in-out infinite; }

/* ─── BADGE GLOW HOVER ──────────────────────────────── */
@keyframes badge-glow-green {
  0%, 100% { box-shadow: 0 0 6px rgba(74,222,128,0.45), 0 0 14px rgba(74,222,128,0.2); }
  50%       { box-shadow: 0 0 12px rgba(74,222,128,0.75), 0 0 28px rgba(74,222,128,0.4); }
}

.badge-glow-hover {
  transition: box-shadow 0.3s ease;
}

.badge-glow-hover:hover {
  animation: badge-glow-green 1.5s ease-in-out infinite;
}
