:root {
  --tea-leaf: #2e4d32;
  --tea-green-light: #d8e2dc;
  --tea-accent: #80ed99;
  --glass-bg: rgba(22, 38, 25, 0.45);
  --glass-border: rgba(255, 255, 255, 0.35);
  --input-bg: rgba(255, 255, 255, 0.18);
  --input-focus: rgba(255, 255, 255, 0.30);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Flask serves static images via url_for or relative static path */
  background: url('denis.jpg') no-repeat center center/cover;
  padding: 20px 0;
}

/* Glassmorphism Container */
.glass-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  border-radius: 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.5);
  color: #eaf2ed;
}

.glass-card h2 {
  text-align: center;
  margin-bottom: 24px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--tea-green-light);
}

/* Glass Inputs */
.input-group input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--input-bg);
  color: #ffffff;
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
}

.input-group input::placeholder {
  color: rgba(216, 226, 220, 0.7);
}

.input-group input:focus {
  background: var(--input-focus);
  border-color: var(--tea-accent);
  box-shadow: 0 0 12px rgba(128, 237, 153, 0.4);
}

/* Checkbox & Links Row */
.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 22px;
  color: var(--tea-green-light);
}

.options label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.options input[type="checkbox"] {
  accent-color: var(--tea-accent);
}

.options a {
  color: var(--tea-green-light);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
}

.options a:hover {
  opacity: 1;
  color: var(--tea-accent);
  text-decoration: underline;
}

/* Dynamic Add Card Header Actions */
.label-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.add-card-btn {
  background: rgba(128, 237, 153, 0.2);
  border: 1px solid var(--tea-accent);
  color: var(--tea-accent);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s ease;
  line-height: 1;
}

.add-card-btn:hover {
  background: var(--tea-accent);
  color: #1a2e1d;
  box-shadow: 0 0 8px rgba(128, 237, 153, 0.5);
}

.card-entry {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.card-entry:last-child {
  margin-bottom: 0;
}

.remove-card-btn {
  background: rgba(255, 100, 100, 0.2);
  border: 1px solid rgba(255, 120, 120, 0.5);
  color: #ff8888;
  border-radius: 10px;
  width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.remove-card-btn:hover {
  background: rgba(255, 80, 80, 0.4);
  color: #ffffff;
}

/* Tea-Green Glass Button */
.btn-submit {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(87, 142, 97, 0.7), rgba(46, 77, 50, 0.8));
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-submit:hover {
  background: linear-gradient(135deg, rgba(105, 168, 116, 0.85), rgba(58, 94, 63, 0.9));
  border-color: var(--tea-accent);
  box-shadow: 0 0 15px rgba(128, 237, 153, 0.3);
}

.btn-submit:active {
  transform: scale(0.98);
}

.footer-text {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--tea-green-light);
  opacity: 0.9;
}

.footer-text a {
  color: var(--tea-accent);
  font-weight: 600;
  text-decoration: none;
}

.footer-text a:hover {
  text-decoration: underline;
}
/* Toast Container */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.toast {
  background: rgba(220, 53, 69, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease-out, fadeOut 0.5s ease-in 4.5s forwards;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}