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

html {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #2d3748;
  background: linear-gradient(135deg, #fef5f7 0%, #fef9fa 100%);
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.header h1 {
  font-size: 32px;
  font-weight: 700;
  color: #d97398;
  margin-bottom: 8px;
}

.subtitle {
  color: #718096;
  font-size: 16px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border: 1px solid #fce4ec;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 115, 152, 0.1);
}

.stat-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #d97398;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.action-section {
  text-align: center;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.cycle-info-section {
  text-align: center;
  margin-bottom: 32px;
}

.btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-icon-only {
  padding: 16px;
  font-size: 20px;
  min-width: 56px;
}

.btn-icon {
  font-size: 20px;
}

.btn-primary {
  background: linear-gradient(135deg, #d97398, #e88aab);
  color: white;
  box-shadow: 0 2px 8px rgba(217, 115, 152, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 115, 152, 0.4);
}

.btn-secondary {
  background: #fff;
  border: 1px solid #fce4ec;
  color: #2d3748;
}

.btn-secondary:hover {
  background: #fef5f7;
}

.card {
  background: white;
  border: 1px solid #fce4ec;
  border-radius: 12px;
  padding: 24px;
}

.card h2 {
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 16px;
}

.recent-logs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.log-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #fef5f7;
  border-radius: 8px;
  transition: all 0.2s;
}

.log-item:hover {
  background: #fce4ec;
}

.log-date {
  font-weight: 500;
  color: #d97398;
}

.log-remove {
  background: none;
  border: none;
  color: #718096;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.log-remove:hover {
  background: #fff;
  color: #e53e3e;
}

.empty-state {
  text-align: center;
  padding: 32px;
  color: #718096;
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}

.modal.show {
  display: flex;
}

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

.modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow: auto;
  animation: slideUp 0.3s;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #fce4ec;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #2d3748;
}

.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: #718096;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.close-btn:hover {
  background: #fef5f7;
  color: #2d3748;
}

.modal-body {
  padding: 24px;
}

.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.nav-btn {
  background: #fef5f7;
  border: 1px solid #fce4ec;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover {
  background: #fce4ec;
}

.month-year {
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.calendar-day.header {
  font-weight: 600;
  color: #718096;
  font-size: 12px;
  cursor: default;
}

.calendar-day.empty {
  cursor: default;
}

.calendar-day.selectable {
  background: #fef5f7;
  color: #2d3748;
}

.calendar-day.selectable:hover {
  background: #fce4ec;
}

.calendar-day.today {
  border-color: #d97398;
  font-weight: 600;
}

.calendar-day.selected {
  background: linear-gradient(135deg, #d97398, #e88aab);
  color: white;
  font-weight: 600;
}

.calendar-day.logged {
  background: #d97398;
  color: white;
  position: relative;
}

.calendar-day.logged::after {
  content: '✓';
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 10px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Cycle Info Styles */
.cycle-wheel-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 32px;
}

#cycle-wheel {
  display: block;
}

.cycle-wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.cycle-day-text {
  font-size: 28px;
  font-weight: 700;
  color: #d97398;
  margin-bottom: 8px;
}

.cycle-phase-text {
  font-size: 14px;
  color: #2d3748;
  font-weight: 500;
}

.day-indicator-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 300px;
  height: 300px;
  pointer-events: none;
}

.cycle-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.cycle-stat-item {
  text-align: center;
  padding: 20px;
  background: #fef5f7;
  border-radius: 12px;
  border: 1px solid #fce4ec;
}

.cycle-stat-label {
  font-size: 13px;
  color: #718096;
  margin-bottom: 8px;
  font-weight: 500;
}

.cycle-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #d97398;
  line-height: 1.2;
}

.hormone-info {
  padding: 24px;
  background: #fef5f7;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid #fce4ec;
}

.hormone-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: #d97398;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hormone-info p {
  font-size: 14px;
  line-height: 1.7;
  color: #2d3748;
}

.hormone-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hormone-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hormone-label {
  font-size: 13px;
  color: #2d3748;
  min-width: 100px;
  font-weight: 500;
}

.hormone-bar {
  flex: 1;
  height: 20px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #fce4ec;
}

.hormone-fill {
  height: 100%;
  background: linear-gradient(135deg, #d97398, #e88aab);
  transition: width 0.5s ease;
  border-radius: 10px;
}

@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .calendar-day {
    font-size: 12px;
  }
  
  .cycle-stats {
    grid-template-columns: 1fr;
  }
  
  .hormone-item {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hormone-label {
    min-width: auto;
  }
}