/* ----- Life Counter specific styles (no Chinese characters) ----- */
body {
  overflow-x: hidden;
}

/* Countdown container with dramatic styling */
.countdown-display-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 30, 0.9);
  background-image: radial-gradient(circle at 10% 20%, rgba(255, 100, 100, 0.15) 0%, transparent 30%),
                    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 2px, transparent 2px, transparent 6px);
  border-radius: var(--border-radius-md, 12px);
  padding: var(--spacing-md, 1rem);
  min-height: 300px;
  border: 2px solid #aa2e2e;
  box-shadow: 0 0 30px rgba(200, 0, 0, 0.3), inset 0 0 20px rgba(0,0,0,0.5);
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.countdown-display-area::before {
  content: "⏳⌛";
  font-size: 5rem;
  opacity: 0.05;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-10deg);
  pointer-events: none;
  white-space: nowrap;
  font-family: monospace;
}

.countdown-numbers {
  font-size: 4rem;
  font-weight: 800;
  font-family: 'Space Grotesk', sans-serif;
  background: linear-gradient(45deg, #ff4e4e, #ff9a3c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px #ff0000, 0 0 40px #ff6600;
  margin: 0.2rem 0;
  animation: heartbeat 1.2s ease-in-out infinite;
  transform-origin: center;
  line-height: 1.2;
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  20% { transform: scale(1.1); text-shadow: 0 0 30px #ff0000, 0 0 60px #ff9900; }
  40% { transform: scale(1); }
  60% { transform: scale(1.05); }
  80% { transform: scale(1); }
  100% { transform: scale(1); }
}

.countdown-label {
  font-size: 1.2rem;
  color: #ffd0a9;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 8px #ff0000;
}

#detailed {
  font-size: 1.5rem;
  color: #ffb6b6;
  font-weight: 500;
  margin: 0.5rem 0;
  background: rgba(0,0,0,0.3);
  padding: 0.3rem 1rem;
  border-radius: 40px;
  display: inline-block;
}

.progress-bar-container {
  width: 80%;
  height: 12px;
  background: rgba(0,0,0,0.6);
  border-radius: 20px;
  margin: 1rem 0 0.5rem;
  border: 1px solid #b33;
  box-shadow: inset 0 2px 5px #000;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #d00, #f90);
  border-radius: 20px;
  width: 0%;
  transition: width 0.2s ease;
  box-shadow: 0 0 15px #f50;
}

.used-percent {
  font-size: 1rem;
  color: #ffbaba;
  margin: 0.3rem 0 0;
}

.warning-message {
  font-size: 1.1rem;
  font-style: italic;
  color: #fdaaaa;
  border-top: 1px dashed #a44;
  padding-top: 0.8rem;
  margin-top: 0.8rem;
  width: 100%;
  animation: fadePulse 2s infinite;
}

@keyframes fadePulse {
  0% { opacity: 0.7; }
  50% { opacity: 1; text-shadow: 0 0 5px #f55; }
  100% { opacity: 0.7; }
}

/* Success message styling */
.success-message {
  background: linear-gradient(135deg, #0b3b2c, #1e5a45);
  border-left: 6px solid #2ecc71;
  color: #e6f7e6;
  padding: 1.2rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  font-size: 1rem;
}
.success-message i {
  color: #2ecc71;
  margin-right: 6px;
}
.link-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0.8rem 0;
  background: rgba(0,0,0,0.3);
  padding: 10px;
  border-radius: 8px;
  word-break: break-word;
}
.link-row a {
  color: #ffd966;
  text-decoration: underline;
  flex: 1;
  min-width: 150px;
  word-break: break-all;
}
.copy-btn {
  background: #3b3b4f;
  border: none;
  color: white;
  padding: 6px 14px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  border: 1px solid #5a5a7a;
}
.copy-btn:hover {
  background: #5a5a7a;
  border-color: #aaa;
}
.copy-btn.copied {
  background: #27ae60;
  border-color: #2ecc71;
}

/* Form elements */
.option-row {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--spacing-md, 1rem);
}
.option-row label {
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text-primary, #1f2937);
}
.option-row input {
  padding: 8px 12px;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 8px;
  background: white;
  font-size: 0.95rem;
  width: 100%;
}
.download-btn {
  margin-top: var(--spacing-md, 1rem);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-purple, #7c3aed);
  color: white;
  padding: 10px 20px;
  border-radius: 40px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.download-btn:hover {
  background: var(--primary-purple-dark, #6d28d9);
}
.download-btn i {
  font-size: 1.2rem;
}
.option-tip {
  font-size: 0.85rem;
  color: var(--text-muted, #6b7280);
  margin-top: 4px;
}
.converter-row {
  display: flex;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}
.converter-row > div {
  flex: 1;
  min-width: 0;
}
.info-box code {
  word-break: break-word;
}

/* FAQ styling with details/summary */
.faq-list {
  margin-top: 1rem;
}
.faq-item {
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  padding-bottom: 0.5rem;
}
.faq-item summary {
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  cursor: pointer;
  list-style: none; /* Remove default triangle */
  position: relative;
  padding-left: 1.8rem;
}
.faq-item summary::-webkit-details-marker {
  display: none; /* Remove default triangle in WebKit */
}
.faq-item summary::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: var(--primary-purple, #7c3aed);
  transition: transform 0.2s;
}
.faq-item[open] summary::before {
  transform: rotate(90deg);
}
.faq-answer {
  padding: 0.8rem 0 0.5rem 1.8rem;
  color: var(--text-muted, #4b5563);
}
.faq-answer p {
  margin: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .converter-row {
    flex-direction: column;
  }
  .countdown-display-area {
    min-height: auto;
  }
  .calculator-main {
    padding: var(--spacing-md);
  }
  .countdown-numbers {
    font-size: 3rem;
  }
}