/* ==========================================================================
   DATER / RANDKOMAT - CANDY CLOUD DESIGN SYSTEM (1a & 2a)
   ========================================================================== */

:root {
  --bg-primary: linear-gradient(180deg, #FFFDFE 0%, #FFE9F2 100%);
  --color-title: #7C2B4E;
  --color-subtitle: #C4859F;
  --color-highlight: #F4649E;
  --gradient-btn: linear-gradient(180deg, #FF8FBC, #F4649E);
  --shadow-btn: 0 12px 24px -10px rgba(244,100,158,0.65);
  --shadow-btn-hover: 0 16px 28px -8px rgba(244,100,158,0.8);
  --shadow-card: 0 24px 50px -20px rgba(230,110,160,0.4);
  --font-main: 'Quicksand', sans-serif;
  --border-color: #F6DFE9;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: #F6EDF0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* App wrapper to center layout */
.app-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  z-index: 10;
}

/* Card layout */
.card {
  width: 340px;
  min-height: 620px;
  border-radius: 30px;
  background: var(--bg-primary);
  box-shadow: var(--shadow-card);
  padding: 30px 26px;
  display: none; /* Handled via active class */
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1), transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.card.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* Loading screen */
.loading-card {
  justify-content: center;
}

.loading-heart {
  font-size: 48px;
  animation: loading-pulse 1s ease-in-out infinite;
}

.loading-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-subtitle);
  margin: 0;
  text-align: center;
}

.loading-card--error .loading-heart {
  animation: none;
}

.loading-home-link {
  margin-top: 12px;
  text-decoration: none;
  text-align: center;
}

@keyframes loading-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Tag label */
.tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-highlight);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Title & Subtitle */
.title {
  font-size: 23px;
  font-weight: 700;
  color: var(--color-title);
  text-align: center;
  margin: 6px 0 0;
  line-height: 1.25;
}

.subtitle {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-subtitle);
  text-align: center;
  line-height: 1.6;
}

/* Photo circle upload area */
.photo-upload-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0;
}

.photo-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #FFFFFF;
  box-shadow: 0 12px 26px -10px rgba(230,110,160,0.55);
  overflow: hidden;
  background: #FFFFFF;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.photo-circle:hover {
  transform: scale(1.05);
  box-shadow: 0 16px 30px -8px rgba(230,110,160,0.7);
}

.photo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-subtitle);
  text-align: center;
  pointer-events: none;
  padding: 10px;
}

.photo-hint {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-subtitle);
  margin-top: 8px;
}

/* Input group */
.input-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.input-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-title);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 6px;
}

.input-group input {
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: #FFFFFF;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-title);
  box-shadow: 0 6px 14px -10px rgba(230,110,160,0.4);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus {
  border-color: var(--color-highlight);
  box-shadow: 0 6px 18px -8px rgba(244,100,158,0.5);
}

.input-subtext {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-subtitle);
  text-align: center;
  padding: 0 4px;
}

/* Gender toggle */
.gender-toggle {
  display: flex;
  gap: 8px;
  width: 100%;
}

.gender-btn {
  flex: 1;
  padding: 12px 8px;
  border-radius: 999px;
  border: 2px solid var(--border-color);
  background: #FFFFFF;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-subtitle);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.gender-btn:hover {
  border-color: var(--color-highlight);
  color: var(--color-title);
}

.gender-btn.selected {
  border-color: var(--color-highlight);
  background: var(--gradient-btn);
  color: #FFFFFF;
  box-shadow: var(--shadow-btn);
}

/* Buttons */
.btn {
  width: 100%;
  padding: 14px 0;
  border-radius: 999px;
  border: none;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
  background: var(--gradient-btn);
  color: #FFFFFF;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  box-shadow: var(--shadow-btn-hover);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--color-subtitle);
  box-shadow: 0 6px 14px -8px rgba(230,110,160,0.35);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  color: var(--color-highlight);
  border-color: var(--color-highlight);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-link {
  background: transparent;
  color: var(--color-subtitle);
  text-decoration: underline;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  margin-top: 4px;
}

.btn-link:hover {
  color: var(--color-highlight);
}

.btn-pulse {
  animation: ssPulse 1.5s ease-in-out infinite;
}

/* Invite flow avatars */
.invite-avatar-container {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.avatar-circle {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 4px solid #FFFFFF;
  box-shadow: 0 12px 26px -10px rgba(230,110,160,0.55);
  overflow: hidden;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-circle.small {
  width: 82px;
  height: 82px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  font-size: 44px;
}

/* Consent screen assets */
.emoji-header {
  font-size: 52px;
  margin-top: 10px;
  animation: floatEmoji 2.5s ease-in-out infinite;
}

.love-badges {
  display: flex;
  gap: 12px;
  font-size: 24px;
  margin: 10px 0;
}

/* Calendar box styling */
.calendar-box {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 20px -12px rgba(230,110,160,0.4);
  box-sizing: border-box;
}

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

.calendar-nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--color-subtitle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.calendar-nav-btn:hover {
  background: #FFE9F2;
  color: var(--color-highlight);
}

.calendar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-title);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--color-subtitle);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day-cell {
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-subtitle);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.calendar-day-cell:hover {
  background: #FFE9F2;
  color: var(--color-highlight);
  transform: scale(1.1);
}

.calendar-day-cell.selected {
  background: var(--color-highlight);
  color: #FFFFFF !important;
  font-weight: 700;
  box-shadow: 0 4px 10px -2px rgba(244,100,158,0.5);
}

.calendar-day-cell.empty {
  pointer-events: none;
}

.calendar-day-cell.past {
  pointer-events: none;
  opacity: 0.3;
}

/* Time Picker Box */
.time-picker-box {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  box-shadow: 0 6px 14px -10px rgba(230,110,160,0.4);
}

.time-picker-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-title);
}

.time-picker-box input {
  border: none;
  outline: none;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-highlight);
  background: transparent;
  cursor: pointer;
  text-align: right;
  width: 90px;
}

/* Options selectors grids */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.option-card {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 10px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-title);
  box-shadow: 0 6px 14px -10px rgba(230,110,160,0.4);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
  box-sizing: border-box;
  text-align: center;
}

.option-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -8px rgba(230,110,160,0.5);
}

.option-card.selected {
  background: #FFE1EE;
  border-color: var(--color-highlight);
  box-shadow: inset 0 0 0 1px var(--color-highlight), 0 8px 18px -8px rgba(230,110,160,0.5);
  font-weight: 700;
}

/* Summary Box */
.summary-table {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 20px;
  box-shadow: 0 8px 20px -12px rgba(230,110,160,0.5);
  box-sizing: border-box;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px dashed #FFE1EE;
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-subtitle);
}

.summary-value {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-title);
}

.summary-footer-text {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-subtitle);
  text-align: center;
  line-height: 1.6;
}

/* Share link section */
.share-box {
  width: 100%;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px dashed var(--color-highlight);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}

.share-box input {
  width: 100%;
  border: none;
  background: #F6EDF0;
  padding: 12px 14px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 11px;
  color: var(--color-title);
  outline: none;
  box-sizing: border-box;
}

/* CTA Container */
.cta-container {
  width: 100%;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.cta-subtext {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-subtitle);
  text-align: center;
}

/* "NIE" Button running away support */
.btn-no {
  position: relative;
  z-index: 100;
}

/* Floating Hearts Background */
.floating-hearts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.heart-particle {
  position: absolute;
  bottom: -20px;
  font-size: 14px;
  opacity: 0;
  animation: floatUp 6s linear forwards;
}

/* Animations */
@keyframes floatUp {
  0% {
    transform: translateY(0) translateX(0) scale(0.8);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-105vh) translateX(var(--drift)) scale(1.2);
    opacity: 0;
  }
}

@keyframes floatEmoji {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes ssPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Responsive adjustment for small phones */
@media (max-width: 360px) {
  .card {
    width: 100%;
    min-height: auto;
    border-radius: 20px;
    padding: 24px 18px;
  }
}
