:root {
  --bg-color: #0b0b12; /* Глубокий темный фон */
  --primary: #ff4d6d; /* Ярко-розовый акцент */
  --primary-glow: rgba(255, 77, 109, 0.5);
  --text: #ffffff;
  --text-muted: #a0a0b0;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --dock-bg: rgba(20, 20, 30, 0.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Helvetica Neue', Arial, sans-serif; }
body { background: var(--bg-color); color: var(--text); overflow-x: hidden; -webkit-tap-highlight-color: transparent; }

.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }

#loader-wrapper { position: fixed; width: 100vw; height: 100vh; background: var(--bg-color); z-index: 9999; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s; }
.loader { --color-one: #ffbf48; --color-two: #be4a1d; --color-three: #ffbf4780; --color-four: #bf4a1d80; --color-five: #ffbf4740; --time-animation: 2s; --size: 1; position: relative; border-radius: 50%; transform: scale(var(--size)); box-shadow: 0 0 25px 0 var(--color-three), 0 20px 50px 0 var(--color-four); animation: colorize calc(var(--time-animation) * 3) ease-in-out infinite; }
.loader::before { content: ""; position: absolute; top: 0; left: 0; width: 100px; height: 100px; border-radius: 50%; border-top: solid 1px var(--color-one); border-bottom: solid 1px var(--color-two); background: linear-gradient(180deg, var(--color-five), var(--color-four)); box-shadow: inset 0 10px 10px 0 var(--color-three), inset 0 -10px 10px 0 var(--color-four); }
.loader .box { width: 100px; height: 100px; background: linear-gradient(180deg, var(--color-one) 30%, var(--color-two) 70%); mask: url(#clipping); -webkit-mask: url(#clipping); }
.loader svg { position: absolute; }
.loader svg #clipping { filter: contrast(15); animation: roundness calc(var(--time-animation) / 2) linear infinite; }
.loader svg #clipping polygon { filter: blur(7px); }
.loader svg #clipping polygon:nth-child(1) { transform-origin: 75% 25%; transform: rotate(90deg); }
.loader svg #clipping polygon:nth-child(2) { transform-origin: 50% 50%; animation: rotation var(--time-animation) linear infinite reverse; }
.loader svg #clipping polygon:nth-child(3) { transform-origin: 50% 60%; animation: rotation var(--time-animation) linear infinite; animation-delay: calc(var(--time-animation) / -3); }
.loader svg #clipping polygon:nth-child(4) { transform-origin: 40% 40%; animation: rotation var(--time-animation) linear infinite reverse; }
.loader svg #clipping polygon:nth-child(5) { transform-origin: 40% 40%; animation: rotation var(--time-animation) linear infinite reverse; animation-delay: calc(var(--time-animation) / -2); }
.loader svg #clipping polygon:nth-child(6) { transform-origin: 60% 40%; animation: rotation var(--time-animation) linear infinite; }
.loader svg #clipping polygon:nth-child(7) { transform-origin: 60% 40%; animation: rotation var(--time-animation) linear infinite; animation-delay: calc(var(--time-animation) / -1.5); }
@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes roundness { 0%, 60%, 100% { filter: contrast(15); } 20%, 40% { filter: contrast(3); } }
@keyframes colorize { 0%, 100% { filter: hue-rotate(0deg); } 20% { filter: hue-rotate(-30deg); } 40% { filter: hue-rotate(-60deg); } 60% { filter: hue-rotate(-90deg); } 80% { filter: hue-rotate(-45deg); } }

.bottom-dock {
  position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%);
  width: 92%; max-width: 400px; height: 75px;
  background: var(--dock-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 40px;
  display: flex; justify-content: space-around; align-items: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8); z-index: 100;
}
.dock-item {
  background: transparent; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 55px; height: 55px; border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.dock-item .icon { font-size: 24px; filter: grayscale(100%) opacity(0.5); transition: all 0.4s; }
.dock-item .dot { width: 5px; height: 5px; background: var(--primary); border-radius: 50%; margin-top: 4px; opacity: 0; transform: scale(0); transition: all 0.3s; box-shadow: 0 0 8px var(--primary); }
.dock-item.active { background: rgba(255,255,255,0.1); transform: translateY(-10px); border: 1px solid rgba(255,255,255,0.1); }
.dock-item.active .icon { filter: grayscale(0%) opacity(1); transform: scale(1.1); }
.dock-item.active .dot { opacity: 1; transform: scale(1); }

#app-container { padding-bottom: 120px; height: 100vh; overflow-y: auto; scroll-behavior: smooth; }
.page { display: none; padding: 20px; animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.page.active { display: block; }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.dark-glass-card {
  background: var(--glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border); border-radius: 25px; padding: 25px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.header-title { text-align: center; font-size: 26px; font-weight: 800; margin-bottom: 25px; color: var(--text); text-shadow: 0 0 15px rgba(255,255,255,0.2); }
.romantic-text h1 { color: var(--primary); font-size: 28px; margin-bottom: 10px; text-shadow: 0 0 20px var(--primary-glow); }
.romantic-text p { font-size: 16px; line-height: 1.6; color: var(--text-muted); }
.subtitle { font-size: 16px; color: var(--text-muted); font-weight: normal; }
.question-text { font-size: 20px; font-weight: bold; margin-bottom: 15px; color: white; }
.neon-text { font-size: 22px; font-weight: bold; color: var(--primary); margin-top: 5px; text-shadow: 0 0 15px var(--primary-glow); }
.status-text { text-align: center; margin-top: 20px; font-weight: bold; font-size: 18px; }

#heart-canvas-container { width: 100%; height: 350px; margin: 0 auto; position: relative; overflow: hidden; display: flex; justify-content: center; align-items: center; border-radius: 25px; margin-bottom: 20px; }

#static-heart { fill: var(--primary); filter: drop-shadow(0 0 20px var(--primary-glow)); animation: pulse 2s infinite; }

@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.dark-input {
  width: 100%; padding: 18px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3); font-size: 16px; color: white; margin-bottom: 15px; outline: none; transition: all 0.3s;
}
.dark-input:focus { border-color: var(--primary); box-shadow: 0 0 15px var(--primary-glow); }
textarea.dark-input { height: 120px; resize: none; }

.btn {
  width: 100%; padding: 16px; border-radius: 20px; border: none; font-size: 16px; font-weight: bold; cursor: pointer; transition: all 0.3s;
  display: flex; justify-content: center; align-items: center; gap: 10px;
}
.glow-btn {
  background: var(--primary); color: white; box-shadow: 0 5px 20px var(--primary-glow);
}
.glow-btn:active { transform: scale(0.96); box-shadow: 0 2px 10px var(--primary-glow); }

.outline-btn {
  background: transparent; color: white; border: 1px solid var(--text-muted);
}
.outline-btn:active { background: rgba(255,255,255,0.1); }
.upload-label input { display: none; }
.send-media-btn { display: none; background: #28a745; box-shadow: 0 5px 20px rgba(40, 167, 69, 0.4); }

.icon-circle { font-size: 35px; margin-bottom: 10px; filter: drop-shadow(0 0 10px rgba(255,255,255,0.2)); }

.map-wrapper { padding: 5px; }
#map { height: 280px; border-radius: 20px; filter: contrast(1.1); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-top: 15px; }
.gallery-grid img { width: 100%; height: 160px; object-fit: cover; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
#daily-photo { width: 100%; border-radius: 20px; margin-top: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); }

.danger-btn {
  background: #ff3b30; color: white; border: none; box-shadow: 0 5px 20px rgba(255, 59, 48, 0.4);
}
.success-btn {
  background: #28cd41; color: white; border: none; box-shadow: 0 5px 20px rgba(40, 205, 65, 0.4);
}
.recording {
  animation: pulse-record 1.5s infinite;
}

@keyframes pulse-record {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(255, 59, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

audio {
  filter: invert(90%) hue-rotate(180deg); 
  opacity: 0.9;
}

.modal {
  display: none; position: fixed; z-index: 10000; left: 0; top: 0;
  width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  flex-direction: column; justify-content: center; align-items: center;
  animation: fadeIn 0.3s ease-out;
}
.modal-content {
  max-width: 90%; max-height: 65vh; border-radius: 15px;
  box-shadow: 0 10px 40px var(--primary-glow); object-fit: contain;
}
.close-modal {
  position: absolute; top: 20px; right: 30px; color: white;
  font-size: 45px; font-weight: bold; cursor: pointer; transition: 0.2s;
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
}
.close-modal:active { color: var(--primary); transform: scale(0.9); }
.download-btn {
  width: auto; padding: 15px 30px; margin-top: 25px; text-decoration: none;
  font-size: 18px;
}

.nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.5); color: white; border: none;
  font-size: 30px; cursor: pointer; padding: 15px; border-radius: 50%;
  transition: 0.3s; z-index: 10001;
}
.nav-btn:hover { background: rgba(255,255,255,0.2); }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }

.zoom-controls {
  position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px;
}
.zoom-btn {
  background: rgba(0,0,0,0.5); color: white; border: none;
  padding: 10px 15px; border-radius: 10px; cursor: pointer;
  font-size: 16px; transition: 0.3s;
}
.zoom-btn:hover { background: rgba(255,255,255,0.2); }

@keyframes fadeIn {
  from { opacity: 0; } 
  to { opacity: 1; } 
}

.modal { display: none !important; }