@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Poppins:wght@300;400;500;600&display=swap');

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

:root {
  --bg: #0d1033;
  --bg-light: #151845;
  --card: #1a1f52;
  --card-border: rgba(255, 255, 255, 0.08);
  --primary: #f36dc8;
  --primary-hover: #e554b5;
  --primary-light: rgba(243, 109, 200, 0.12);
  --yellow: #ffe163;
  --navy: #021774;
  --danger: #ff6b6b;
  --text: #ffffff;
  --text-secondary: #b8bbd6;
  --text-muted: #7a7d9c;
  --radius: 10px;
  --input-bg: rgba(255, 255, 255, 0.06);
  --input-border: rgba(255, 255, 255, 0.12);
}

body {
  font-family: "Poppins", "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding: 2rem 1rem;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -2;
  opacity: 0.6;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(13, 16, 51, 0.4) 0%, rgba(13, 16, 51, 0.7) 100%);
  z-index: -1;
}

.container {
  max-width: 620px;
  margin: 0 auto;
}

.brand-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.brand-logo {
  height: 32px;
  opacity: 0.9;
}

h1 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
  letter-spacing: -0.02em;
  text-align: center;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
  font-weight: 400;
  text-align: center;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.login-section {
  text-align: center;
  padding: 3rem 1.5rem;
}

.login-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.user-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-secondary);
}

.user-info strong {
  color: var(--text);
}

label {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="date"],
input[type="email"],
input[type="text"],
select,
.form-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  font-family: "Poppins", sans-serif;
  font-size: 0.88rem;
  background: var(--input-bg);
  box-sizing: border-box;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus,
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(243, 109, 200, 0.15);
}

/* Fix date input and select colors for dark theme */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

select option {
  background: var(--card);
  color: var(--text);
}

.row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.row > * {
  flex: 1;
}

.field {
  margin-bottom: 0.85rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.tag button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--primary);
  padding: 0;
  line-height: 1;
  opacity: 0.6;
}

.tag button:hover {
  opacity: 1;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.3rem;
  border: none;
  border-radius: var(--radius);
  font-family: "Montserrat", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(243, 109, 200, 0.35);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--input-border);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
}

.btn-block {
  width: 100%;
}

.output-area {
  position: relative;
}

textarea.output {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 0.84rem;
  line-height: 1.7;
  resize: vertical;
  background: var(--input-bg);
  color: var(--yellow);
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #ffffff40;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.4rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: -1px;
  position: relative;
  z-index: 1;
}

.tab {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--card-border);
  border-bottom: none;
  background: var(--bg-light);
  color: var(--text-muted);
  font-family: "Montserrat", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 14px 14px 0 0;
}

.tab:hover {
  color: var(--primary);
  background: rgba(243, 109, 200, 0.05);
}

.tab.active {
  background: var(--card);
  color: var(--primary);
  border-bottom-color: var(--card);
}

.tab-content {
  border-radius: 0 0 14px 14px;
}

.tab-content.hidden {
  display: none;
}

textarea.form-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  font-family: "Poppins", sans-serif;
  font-size: 0.88rem;
  background: var(--input-bg);
  color: var(--text);
  resize: vertical;
  line-height: 1.6;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(243, 109, 200, 0.15);
}

/* Suggestions dropdown */
.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-light);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 10;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 2px;
}

.suggestion-item {
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.suggestion-item:hover {
  background: rgba(243, 109, 200, 0.1);
}

.suggestion-item .name {
  font-weight: 600;
  color: var(--text);
}

.suggestion-item .email {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.date-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.date-opt {
  flex: 1;
  padding: 0.55rem 0.5rem;
  background: var(--input-bg);
  color: var(--text-muted);
  border: none;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-right: 1px solid var(--input-border);
}

.date-opt:last-child {
  border-right: none;
}

.date-opt:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.date-opt.active {
  background: var(--primary);
  color: white;
}

.match-section {
  margin-bottom: 0.5rem;
}

.section-label {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--yellow);
  margin-bottom: 0.75rem;
}

.divider {
  display: flex;
  align-items: center;
  margin: 1.25rem 0;
  gap: 0.75rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

.divider span {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.watermark {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  color: var(--primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.5;
  letter-spacing: 0.03em;
}

.hidden {
  display: none;
}
