/* ============================================
   Period Calculator Pro - Stylesheet
   ============================================ */

#period-calculator-wrap {
  max-width: 720px;
  margin: 30px auto;
  font-family: 'Segoe UI', Arial, sans-serif;
  position: relative;
}

/* ---- Header ---- */
.pc-header {
  background: linear-gradient(135deg, #e91e8c 0%, #9c27b0 100%);
  border-radius: 20px;
  padding: 35px 30px;
  text-align: center;
  color: #fff;
  margin-bottom: 25px;
  box-shadow: 0 8px 32px rgba(233,30,140,0.25);
}
.pc-header-icon {
  font-size: 48px;
  margin-bottom: 10px;
  animation: pc-float 3s ease-in-out infinite;
}
@keyframes pc-float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.pc-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.pc-subtitle {
  margin: 0;
  font-size: 14px;
  opacity: 0.88;
}

/* ---- Tabs ---- */
.pc-tabs {
  display: flex;
  gap: 8px;
  background: #fdf2f8;
  border-radius: 50px;
  padding: 6px;
  margin-bottom: 25px;
}
.pc-tab {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #c2185b;
  transition: all 0.3s ease;
}
.pc-tab.active {
  background: #e91e8c;
  color: #fff;
  box-shadow: 0 4px 15px rgba(233,30,140,0.35);
}
.pc-tab:hover:not(.active) {
  background: #fce4ec;
}

/* ---- Tab Content ---- */
.pc-tab-content { display: none; }
.pc-tab-content.active { display: block; }

/* ---- Form ---- */
.pc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 540px) {
  .pc-form-grid { grid-template-columns: 1fr; }
}
.pc-field { display: flex; flex-direction: column; gap: 8px; }
.pc-field-full { margin-bottom: 20px; }

.pc-label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pc-label-icon { font-size: 16px; }
.pc-required { color: #e91e8c; }
.pc-optional { color: #aaa; font-weight: 400; font-size: 11px; }

.pc-input {
  border: 2px solid #f8bbd0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: #333;
  background: #fff;
  transition: border-color 0.3s ease;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.pc-input:focus { border-color: #e91e8c; box-shadow: 0 0 0 3px rgba(233,30,140,0.12); }

/* Range Sliders */
.pc-range-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pc-range {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 10px;
  background: #f8bbd0;
  outline: none;
  cursor: pointer;
}
.pc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e91e8c;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(233,30,140,0.4);
  transition: transform 0.2s;
}
.pc-range::-webkit-slider-thumb:hover { transform: scale(1.2); }
.pc-range-pink::-webkit-slider-thumb { background: #9c27b0; }
.pc-range-value {
  font-size: 14px;
  font-weight: 700;
  color: #e91e8c;
  min-width: 60px;
  text-align: right;
}
.pc-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #bbb;
  padding: 0 2px;
  margin-top: -4px;
}

/* Symptom Buttons */
.pc-symptoms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pc-symptom-btn {
  border: 2px solid #f8bbd0;
  background: #fff;
  border-radius: 50px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  color: #888;
  transition: all 0.25s ease;
  font-family: inherit;
}
.pc-symptom-btn:hover { border-color: #e91e8c; color: #e91e8c; }
.pc-symptom-btn.selected {
  background: #e91e8c;
  border-color: #e91e8c;
  color: #fff;
  box-shadow: 0 3px 12px rgba(233,30,140,0.3);
}

/* Action Buttons */
.pc-actions {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}
.pc-btn {
  border: none;
  border-radius: 50px;
  padding: 13px 30px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pc-btn-primary {
  background: linear-gradient(135deg, #e91e8c, #9c27b0);
  color: #fff;
  flex: 1;
  justify-content: center;
  box-shadow: 0 5px 20px rgba(233,30,140,0.35);
}
.pc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(233,30,140,0.45);
}
.pc-btn-ghost {
  background: #fdf2f8;
  color: #c2185b;
  border: 2px solid #f8bbd0;
}
.pc-btn-ghost:hover { background: #fce4ec; }
.pc-btn-download {
  background: linear-gradient(135deg, #9c27b0, #673ab7);
  color: #fff;
  width: 100%;
  justify-content: center;
  font-size: 16px;
  padding: 15px 30px;
  box-shadow: 0 5px 20px rgba(103,58,183,0.35);
}
.pc-btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(103,58,183,0.45);
}
.pc-btn-icon { font-size: 20px; }

/* ---- Preview Tab ---- */
.pc-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #bbb;
}
.pc-empty-icon { font-size: 60px; margin-bottom: 15px; }
.pc-empty-state p { font-size: 15px; }
.pc-empty-state strong { color: #e91e8c; }

/* Summary Cards */
.pc-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}
@media (max-width: 480px) {
  .pc-cards-grid { grid-template-columns: 1fr; }
}
.pc-card {
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pc-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.12;
  background: #fff;
}
.pc-card-pink    { background: linear-gradient(135deg, #fce4ec, #f8bbd0); border: 1px solid #f48fb1; }
.pc-card-purple  { background: linear-gradient(135deg, #f3e5f5, #e1bee7); border: 1px solid #ce93d8; }
.pc-card-rose    { background: linear-gradient(135deg, #fce4ec, #f8bbd0); border: 1px solid #ef9a9a; }
.pc-card-lavender{ background: linear-gradient(135deg, #ede7f6, #d1c4e9); border: 1px solid #b39ddb; }
.pc-card-icon { font-size: 28px; margin-bottom: 8px; }
.pc-card-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-bottom: 6px; }
.pc-card-value { font-size: 16px; font-weight: 700; color: #c2185b; }

/* Countdown */
.pc-countdown {
  background: linear-gradient(135deg, #e91e8c, #9c27b0);
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  color: #fff;
  margin-bottom: 25px;
}
.pc-countdown-number {
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
}
.pc-countdown-label {
  font-size: 15px;
  opacity: 0.9;
}

/* Phase Bar */
.pc-phase-section, .pc-upcoming-section, .pc-symptoms-summary {
  margin-bottom: 25px;
}
.pc-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #c2185b;
  margin: 0 0 12px;
}
.pc-phase-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}
.pc-phase {
  flex: 1;
  background: #fce4ec;
  border-radius: 10px;
  padding: 12px 5px;
  text-align: center;
  font-size: 18px;
  transition: all 0.3s;
  border: 2px solid transparent;
}
.pc-phase small { font-size: 10px; color: #888; display: block; margin-top: 4px; }
.pc-phase.active-phase {
  background: #e91e8c;
  color: #fff;
  border-color: #ad1457;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(233,30,140,0.4);
}
.pc-phase.active-phase small { color: rgba(255,255,255,0.85); }
.pc-phase-desc {
  font-size: 13px;
  color: #888;
  background: #fdf2f8;
  padding: 10px 15px;
  border-radius: 8px;
  border-left: 3px solid #e91e8c;
  margin: 0;
}

/* Table */
.pc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pc-table th {
  background: linear-gradient(135deg, #e91e8c, #9c27b0);
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
}
.pc-table th:first-child { border-radius: 10px 0 0 0; }
.pc-table th:last-child  { border-radius: 0 10px 0 0; }
.pc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #fce4ec;
  color: #555;
}
.pc-table tr:nth-child(even) td { background: #fdf2f8; }
.pc-table tr:hover td { background: #fce4ec; }

/* Symptoms summary */
.pc-symptoms-summary .pc-symptoms { gap: 6px; }
.pc-symptom-tag {
  background: #fce4ec;
  color: #c2185b;
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 13px;
  display: inline-block;
  border: 1px solid #f48fb1;
}

/* Download section */
.pc-download-section { text-align: center; margin-top: 25px; }
.pc-download-hint { font-size: 12px; color: #bbb; margin: 8px 0 0; }

/* Loading */
#pc-loading {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  z-index: 100;
}
.pc-loader { text-align: center; }
.pc-loader-spinner {
  width: 50px; height: 50px;
  border: 4px solid #fce4ec;
  border-top-color: #e91e8c;
  border-radius: 50%;
  animation: pc-spin 0.8s linear infinite;
  margin: 0 auto 15px;
}
@keyframes pc-spin { to { transform: rotate(360deg); } }
.pc-loader p { color: #e91e8c; font-weight: 600; }
