:root {
  --red: #dc0412;
  --red-dark: #a8030e;
  --red-glow: rgba(232, 0, 28, 0.35);
  --bg-base: #0a0a0f;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-active: rgba(232, 0, 28, 0.5);
  --text-primary: #f0f0f5;
  --text-secondary: rgba(240, 240, 245, 0.55);
  --text-muted: rgba(240, 240, 245, 0.3);
  --blur: blur(24px);
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-base);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(232,0,28,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 90%, rgba(20,10,60,0.5) 0%, transparent 60%);
  font-family: "DM Sans", sans-serif;
  color: var(--text-primary);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

.page-wrapper { max-width: 1280px; margin: 0 auto; padding: 34px 24px; }
.site-header { text-align: center; margin-bottom: 48px; }
.site-header .logo { height: 80px; margin-bottom: 20px; filter: drop-shadow(0 0 20px rgba(232,0,28,0.4)); }
.site-header h1 { font-family: "Syne", sans-serif; font-size: clamp(28px, 5vw, 42px); font-weight: 800; margin: 0 0 8px; }
.subtitle { color: var(--red); font-size: 15px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.island-nav {
  width: 100%;
  margin: 0 auto 24px;
  padding: 10px 14px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.03) 100%),
    rgba(18,19,27,0.44);
  backdrop-filter: blur(26px) saturate(120%);
  -webkit-backdrop-filter: blur(26px) saturate(120%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 14px 38px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(255,255,255,0.06);
}
.island-nav::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02) 46%, rgba(255,255,255,0.09));
  pointer-events: none;
  opacity: 0.68;
}
.island-nav::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 240px;
  height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.26) 0%, rgba(255,255,255,0.07) 45%, rgba(255,255,255,0) 75%);
  pointer-events: none;
  opacity: 0.7;
}
.island-link {
  position: relative;
  z-index: 1;
  justify-self: center;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.island-side {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.island-left { justify-content: flex-start; }
.island-right { justify-content: flex-end; }
.island-link.active,
.island-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.2);
}
.island-logo-wrap {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0.08) 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.16), inset 0 1px 0 rgba(255,255,255,0.28);
}
.island-logo-wrap .logo {
  height: 54px !important;
  margin-bottom: 0;
  filter: drop-shadow(0 0 22px rgba(255,255,255,0.28)) drop-shadow(0 0 14px rgba(220,4,18,0.28));
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  animation: cardEnter 0.5s cubic-bezier(0.4,0,0.2,1) both;
}
.glass-card:hover { background: var(--glass-bg-hover); border-color: rgba(255,255,255,0.14); }

.section-card { padding: 24px; margin-bottom: 16px; }
.section-title { font-family: "Syne", sans-serif; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 14px; margin: 0 0 20px; }
.section-number { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--red); color: #fff; font-size: 13px; font-weight: 800; }
.field-label-top { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }

.field-wrapper { position: relative; margin-bottom: 14px; }
.field-wrapper input,
.field-wrapper textarea,
.field-wrapper select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 26px 16px 11px;
  color: var(--text-primary);
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
  outline: none;
  transition: var(--transition);
  appearance: none;
}
.field-wrapper input:-webkit-autofill,
.field-wrapper textarea:-webkit-autofill,
.field-wrapper select:-webkit-autofill {
  -webkit-text-fill-color: var(--text-primary) !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(255,255,255,0.05) inset !important;
  box-shadow: 0 0 0 1000px rgba(255,255,255,0.05) inset !important;
  caret-color: var(--text-primary);
  transition: background-color 99999s ease-out 0s;
}
.field-wrapper input:focus,
.field-wrapper textarea:focus,
.field-wrapper select:focus {
  border-color: var(--glass-border-active);
  background: rgba(232,0,28,0.04);
  box-shadow: 0 0 0 3px rgba(232,0,28,0.12);
}
.field-wrapper label {
  position: absolute;
  left: 16px;
  top: 8px;
  transform: none;
  font-size: 11px;
  color: var(--text-secondary);
  pointer-events: none;
  transition: var(--transition);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.field-wrapper .static-label {
  position: static;
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.date-field::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc0412' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}
.date-field input { padding-right: 44px; }
.field-wrapper input:focus ~ label,
.field-wrapper textarea:focus ~ label { color: var(--red); }
.field-wrapper select { padding: 14px 40px 14px 14px; min-height: 56px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23dc0412' stroke-width='2'%3E%3Cpath d='M5 7l5 6 5-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }
.field-wrapper select option { color: #151515; background: #ffffff; }
.field-wrapper select:focus option:checked { background: #e9ecf3; color: #111; }
.field-wrapper textarea { min-height: 88px; resize: vertical; }
.dob-grid { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; }

.checkbox-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; margin-bottom: 12px; }
.checkbox-item { position: relative; }
.checkbox-item input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox-item label {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); cursor: pointer; color: var(--text-secondary); transition: var(--transition);
  white-space: nowrap; font-size: 14px; line-height: 1.2;
}
.checkbox-item label::before {
  content: ""; width: 20px; height: 20px; min-width: 20px; border-radius: 6px;
  border: 1.5px solid rgba(255,255,255,0.28); background: rgba(255,255,255,0.05);
  transition: var(--transition);
}
.checkbox-item label:hover { border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.07); }
.checkbox-item input:checked ~ label { background: rgba(220,4,18,0.12); border-color: rgba(220,4,18,0.45); color: var(--text-primary); box-shadow: inset 0 0 0 1px rgba(220,4,18,0.2); }
.checkbox-item input:checked ~ label::before {
  background: var(--red);
  border-color: var(--red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3 4L11 1' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 65%;
  background-repeat: no-repeat;
  background-position: center;
}

#altul-field { display: none; margin-top: 10px; }
#altul-field.visible { display: block; animation: fadeIn 0.2s ease; }

.declaratie-text, .gdpr-text {
  background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); border-radius: var(--radius-md);
  padding: 16px 18px; font-size: 13.5px; color: var(--text-secondary); line-height: 1.55; margin-bottom: 12px;
}
.gdpr-text a { color: #f7a8af; }
.gdpr-more { margin-top: 10px; }
.gdpr-more summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}
.gdpr-more summary::-webkit-details-marker { display: none; }
.gdpr-more summary::after { content: "▾"; font-size: 12px; opacity: 0.8; }
.gdpr-more[open] summary::after { content: "▴"; }
.gdpr-more-content { margin-top: 12px; }
.gdpr-more-content p { margin: 0 0 8px; }
.gdpr-more-content ul { margin: 0 0 10px 18px; padding: 0; }
.gdpr-more-content li { margin-bottom: 4px; }
.taxe-card { text-align: left; }
.taxe-intro { margin: 0 0 14px; color: var(--text-secondary); }
.taxe-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 2px;
}
.taxe-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.taxe-price {
  font-family: "Syne", sans-serif;
  font-size: 28px;
  line-height: 1;
  color: #fff;
}
.taxe-divider {
  height: 1px;
  width: 100%;
  margin: 12px 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.22), rgba(255,255,255,0.08));
}
.taxe-block p { margin: 0 0 6px; }
.taxe-iban {
  margin: 0 0 6px;
  font-family: "Syne", sans-serif;
  font-size: 20px;
  letter-spacing: 0.03em;
  color: #fff;
  word-break: break-all;
}
.taxe-owner { color: var(--text-primary); font-weight: 600; }
.taxe-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245,158,11,0.42);
  background: rgba(245,158,11,0.12);
  color: #fde68a;
}
.top-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; align-items: stretch; }
.top-cards-grid > .section-card { height: 100%; display: flex; flex-direction: column; }
.preferinte-stack { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 6px; }
.agreement-stack { display: grid; grid-template-columns: 1fr; gap: 14px; }
.agreement-stack .section-card { margin-bottom: 0; }
.agreement-stack .section-title { margin-bottom: 14px; font-size: 18px; }
.agreement-stack .checkbox-item label { font-size: 13px; padding: 10px 12px; }
.signature-wrap {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 10px;
}
.signature-canvas {
  width: 100%;
  height: 180px;
  display: block;
  border-radius: 10px;
  background:
    linear-gradient(rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    repeating-linear-gradient(0deg, transparent 0, transparent 26px, rgba(255,255,255,0.06) 27px, transparent 28px);
  touch-action: none;
  cursor: crosshair;
}
.signature-actions { margin-top: 10px; display: flex; justify-content: flex-end; }
.signature-clear { width: auto; }

.submit-section { padding: 8px 0 40px; }
.data-completarii { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.btn-primary {
  display: inline-flex; justify-content: center; width: 100%; padding: 16px 32px;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff; font-family: "Syne", sans-serif; font-size: 16px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; border: none; border-radius: var(--radius-md);
  cursor: pointer; transition: var(--transition); box-shadow: 0 4px 24px var(--red-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px var(--red-glow); }

.btn-secondary {
  display: inline-flex; border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  padding: 10px 14px; color: var(--text-primary); background: var(--glass-bg);
}

.success-card, .regulament-card { padding: 36px; text-align: center; }
.site-footer { text-align: center; color: var(--text-muted); padding-bottom: 12px; }
.error-box { padding: 14px 18px; margin-bottom: 20px; border-color: rgba(232,0,28,0.4); }
.hp-field { display: none; }

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

.success-icon svg circle, .success-icon svg path {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawCheck 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

@media (max-width: 768px) {
  .page-wrapper { padding: 20px 16px; }
  .island-nav {
    grid-template-columns: 1fr;
    border-radius: 18px;
    padding: 10px;
    gap: 10px;
  }
  .island-side { width: 100%; justify-content: stretch; flex-direction: column; gap: 8px; }
  .island-logo-wrap { order: -1; padding: 4px 0 6px; }
  .island-link { width: 100%; }
  .section-card { padding: 22px 16px; }
  .top-cards-grid { grid-template-columns: 1fr; }
  .preferinte-stack { grid-template-columns: 1fr; }
  .agreement-stack { grid-template-columns: 1fr; }
  .checkbox-group { grid-template-columns: 1fr 1fr; }
  .checkbox-item label { white-space: normal; }
  .dob-grid { grid-template-columns: 1fr; }
  .signature-canvas { height: 150px; }
  .site-header .logo { height: 60px; }
  .site-header h1 { font-size: 26px; }
}
@media (max-width: 480px) {
  .checkbox-group { grid-template-columns: 1fr; }
}
