/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --pink: #f2a7b3;
  --pink-light: #fce4ec;
  --pink-dark: #e91e63;
  --peach: #ffd6c9;
  --lavender: #e8d5f5;
  --mint: #d4f0e7;
  --cream: #fff9f5;
  --gold: #d4a853;
  --text: #3d2c2c;
  --text-light: #7a6565;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(210, 140, 160, 0.15);
  --shadow-hover: 0 8px 40px rgba(210, 140, 160, 0.25);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== Floating Decorations ===== */
.floating-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bubble {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.3;
  animation: floatUp 12s infinite ease-in-out;
  animation-delay: calc(var(--i) * 1.5s);
}
.bubble:nth-child(1) { left: 5%; }
.bubble:nth-child(2) { left: 15%; }
.bubble:nth-child(3) { left: 30%; }
.bubble:nth-child(4) { left: 45%; }
.bubble:nth-child(5) { left: 60%; }
.bubble:nth-child(6) { left: 72%; }
.bubble:nth-child(7) { left: 83%; }
.bubble:nth-child(8) { left: 92%; }

@keyframes floatUp {
  0% { transform: translateY(100vh) rotate(0deg) scale(0.8); opacity: 0; }
  10% { opacity: 0.3; }
  90% { opacity: 0.3; }
  100% { transform: translateY(-10vh) rotate(360deg) scale(1.2); opacity: 0; }
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 249, 245, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(242, 167, 179, 0.15);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--pink-dark);
  cursor: pointer;
  letter-spacing: 0.02em;
}

.nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }

.nav-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
}
.nav-btn:hover {
  background: var(--pink-light);
  color: var(--pink-dark);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: var(--white);
  box-shadow: 0 4px 16px rgba(233, 30, 99, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(233, 30, 99, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--pink-dark);
  border: 2px solid var(--pink);
}
.btn-outline:hover {
  background: var(--pink-light);
  transform: translateY(-2px);
}

.btn-small {
  padding: 0.5rem 1.2rem;
  font-size: 0.8rem;
}

.btn-full { width: 100%; }

.btn-danger {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  box-shadow: 0 4px 16px rgba(238, 90, 36, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #a8e6cf, #55a88b);
  color: white;
}

/* ===== Sections ===== */
.section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 8rem 2rem 4rem;
}

.section-eyebrow {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--pink-dark);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  text-align: center;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-light);
  text-align: center;
  max-width: 500px;
  margin: 0 auto 3rem;
  font-weight: 300;
}

/* ===== Hero ===== */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.hero-content { max-width: 520px; }

.hero-eyebrow {
  font-size: 0.9rem;
  color: var(--pink-dark);
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.accent-number {
  display: inline-block;
  font-size: 1.4em;
  background: linear-gradient(135deg, var(--pink-dark), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  font-weight: 300;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 3rem;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 320px;
  border: 1px solid rgba(242, 167, 179, 0.2);
}

.hero-card-emoji { font-size: 4rem; margin-bottom: 1.5rem; }
.hero-card-text { color: var(--text-light); font-weight: 300; font-size: 1rem; }

/* ===== Auth ===== */
.auth-section {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container { width: 100%; max-width: 440px; }

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(242, 167, 179, 0.15);
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  background: var(--pink-light);
  border-radius: 50px;
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 0.7rem;
  border: none;
  background: transparent;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 50px;
  transition: var(--transition);
}
.auth-tab.active {
  background: var(--white);
  color: var(--pink-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}
.form-group input, .form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid rgba(242, 167, 179, 0.3);
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--cream);
  transition: var(--transition);
  outline: none;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(242, 167, 179, 0.15);
}

.form-error {
  color: #e74c3c;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  min-height: 1.2rem;
}

/* ===== Wishlist ===== */
.wishlist-section {
  max-width: 1200px;
  margin: 0 auto;
}

.wishlist-header { margin-bottom: 2rem; }

.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gift-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(242, 167, 179, 0.12);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.gift-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.gift-card.reserved {
  opacity: 0.7;
}
.gift-card.reserved::after {
  content: '✓ Забронировано';
  position: absolute;
  top: 1rem;
  right: -2rem;
  background: var(--mint);
  color: #2d7a5f;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 2.5rem;
  transform: rotate(35deg);
}

.gift-card.priority-high {
  border-color: rgba(212, 168, 83, 0.4);
  background: linear-gradient(135deg, var(--white), #fffbf0);
}

.gift-emoji {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.gift-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.gift-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  font-weight: 300;
  line-height: 1.5;
}

.gift-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pink-dark);
  margin-bottom: 1rem;
}

.gift-priority-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), #e6be6a);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.gift-reserved-by {
  font-size: 0.78rem;
  color: #55a88b;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.gift-link {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--pink-dark);
  text-decoration: none;
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.gift-link:hover { text-decoration: underline; }

.gift-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Gift photo */
.gift-photo {
  margin: -2rem -2rem 1rem -2rem;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  max-height: 220px;
}
.gift-photo img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* Strikethrough for reserved */
.gift-name.strikethrough {
  text-decoration: line-through;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2px;
  opacity: 0.7;
}

/* Multiple links */
.gift-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  margin-bottom: 0.75rem;
}

/* Photo upload in admin */
.photo-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 2px dashed rgba(242, 167, 179, 0.4);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-light);
  transition: var(--transition);
  background: var(--cream);
}
.photo-upload-label:hover {
  border-color: var(--pink);
  color: var(--pink-dark);
}

.photo-preview {
  margin-top: 0.5rem;
}
.photo-preview img {
  max-width: 200px;
  max-height: 120px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

/* Link rows in admin form */
.form-group-full {
  grid-column: 1 / -1;
}

.link-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.link-row input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(242, 167, 179, 0.3);
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  background: var(--cream);
  outline: none;
  transition: var(--transition);
}
.link-row input:focus {
  border-color: var(--pink);
}

/* ===== Profile ===== */
.profile-section {
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-container { width: 100%; max-width: 600px; }

.profile-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 3rem;
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid rgba(242, 167, 179, 0.15);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-light), var(--lavender));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
}

.profile-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.profile-phone {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.profile-gifts-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.profile-gifts { text-align: left; }

.profile-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-light);
}
.profile-empty-emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
}
.profile-empty p {
  margin-bottom: 1rem;
  font-weight: 300;
}

.profile-gift-card {
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid rgba(242, 167, 179, 0.12);
  transition: var(--transition);
}
.profile-gift-card:hover {
  box-shadow: 0 4px 16px rgba(210, 140, 160, 0.12);
}

.profile-gift-photo {
  width: 100%;
  max-height: 160px;
  overflow: hidden;
}
.profile-gift-photo img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.profile-gift-body {
  padding: 1.25rem;
}

.profile-gift-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.profile-gift-emoji {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.profile-gift-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.profile-gift-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pink-dark);
  margin-top: 0.15rem;
}

.profile-gift-desc {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.profile-gift-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  margin-bottom: 0.75rem;
}
.profile-gift-links a {
  font-size: 0.8rem;
  color: var(--pink-dark);
  text-decoration: none;
  font-weight: 500;
}
.profile-gift-links a:hover {
  text-decoration: underline;
}

/* ===== Admin ===== */
.admin-section {
  max-width: 900px;
  margin: 0 auto;
}

.admin-add-card, .admin-guests-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  border: 1px solid rgba(242, 167, 179, 0.12);
}

.admin-add-card h3, .admin-guests-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.admin-form input, .admin-form select {
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(242, 167, 179, 0.3);
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  background: var(--cream);
  outline: none;
  transition: var(--transition);
}
.admin-form input:focus, .admin-form select:focus {
  border-color: var(--pink);
}
.admin-form .btn { grid-column: 1 / -1; }

.admin-gift-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid rgba(242, 167, 179, 0.1);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-gift-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.admin-gift-info span:first-child { font-size: 1.5rem; }
.admin-gift-name { font-weight: 500; font-size: 0.9rem; }
.admin-gift-status {
  font-size: 0.78rem;
  color: var(--text-light);
}

.guest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--cream);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.guest-name { font-weight: 500; font-size: 0.9rem; }
.guest-gifts { font-size: 0.8rem; color: var(--text-light); }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  font-size: 0.8rem;
  font-weight: 300;
  position: relative;
  z-index: 1;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-section { flex-direction: column; text-align: center; gap: 2rem; padding-top: 6rem; }
  .hero-actions { justify-content: center; }
  .hero-image { display: flex; justify-content: center; }
  .admin-form { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; gap: 0.75rem; }
  .nav { justify-content: center; }
  .section { padding: 6rem 1rem 3rem; }
}
