/* ОБЩИЕ НАСТРОЙКИ И АВТО-ТЕМЫ */
:root {
  --bg-page: #f2f2f7;
  --bg-card: #ffffff;
  --bg-input: #f2f2f7;
  --text-main: #000000;
  --text-muted: #8e8e93;
  --shadow: rgba(0, 0, 0, 0.06);
  --nav-bg: rgba(255, 255, 255, 0.85);
  --btn-active: #e5e5ea;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: #000000;
    --bg-card: #1c1c1e;
    --bg-input: #2c2c2e;
    --text-main: #ffffff;
    --text-muted: #8e8e93;
    --shadow: rgba(0, 0, 0, 0.4);
    --nav-bg: rgba(28, 28, 30, 0.85);
    --btn-active: #3a3a3c;
  }
}

body {
  background-color: var(--bg-page);
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.phone-screen {
  width: 390px;
  height: 830px;
  background-color: var(--bg-page);
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding-bottom: 180px;
}

.sticky-nav {
  position: static;
  top: auto;
  left: auto;
  width: 100%;
  height: 64px;
  background-color: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(142, 142, 147, 0.2);
  flex-shrink: 0;
}

.nav-btn {
  background: transparent;
  border: none;
  color: #007aff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.nav-btn:active {
  background-color: var(--btn-active);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.nav-icon {
  width: 22px;
  height: 22px;
}

.scroll-container {
  flex: 1;
  overflow: hidden;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  justify-content: flex-start;
  gap: 16px;
}

.ios-scroll-card-wrapper {
  background-color: var(--bg-card);
  border-radius: 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px var(--shadow);
  display: flex;
  flex-direction: column;
  height: auto;
}

.section-title-card {
  padding: 20px 20px 12px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.horizontal-scroll-container {
  width: 100%;
  overflow: hidden;
  padding: 0 0 20px 0;
  height: auto;
}

.scroll-runner {
  display: flex;
  gap: 12px;
  padding: 0 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll-runner::-webkit-scrollbar {
  display: none;
}

.placeholder-box,
.ios-scroll-card-wrapper .card-item {
  scroll-snap-align: start;
  flex-shrink: 0;
}

.static-textarea {
  width: 100%;
  height: 160px;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: none;
  border-radius: 0 0 14px 14px;
  padding: 16px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 4px 12px var(--shadow);
  margin-bottom: 24px;
}

.static-textarea:focus {
  outline: none;
}
.about-card {
  background-color: var(--bg-card);
  border-radius: 16px;
  padding: 16px 16px 24px 16px;
  box-shadow: 0 4px 16px var(--shadow);
  width: 100%;
  box-sizing: border-box;
}

.about-text {
  font-size: 13px;
  line-height: 1.6;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

.drawer-menu {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60vh;
  background-color: var(--bg-card);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.drawer-menu.open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.drawer-header {
  padding: 16px;
  border-bottom: 1px solid rgba(142, 142, 147, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#drawer-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.drawer-close {
  background: var(--bg-input);
  border: none;
  color: var(--text-main);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
}

.theme-item {
  padding: 14px 12px;
  font-size: 16px;
  color: var(--text-main);
  border-bottom: 1px solid rgba(142, 142, 147, 0.1);
  cursor: pointer;
}

.theme-item:active {
  background-color: var(--bg-input);
}

.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.cookie-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cookie-banner {
  width: 100%;
  background-color: var(--bg-card);
  border-radius: 24px 24px 0 0;
  padding: 24px 16px 44px 16px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.cookie-overlay.active .cookie-banner {
  transform: translateY(0);
}

.cookie-content h3 {
  margin: 0 0 6px 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
}

.cookie-content p {
  margin: 0 0 20px 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
}

.cookie-btn {
  width: 100%;
  height: 48px;
  background-color: #007aff;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.1s;
}

.cookie-btn:active {
  background-color: #0062cc;
  transform: scale(0.98);
}
.feedback-container {
  display: flex;
  justify-content: center;
  padding: 10px 0;
  box-sizing: border-box;
  margin-top: auto;
}

.ios-feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background-color: var(--bg-card);
  color: #007aff;
  box-shadow: 0 1px 3px var(--shadow);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.15px;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.ios-feedback-btn:active {
  background-color: var(--btn-active);
  transform: scale(0.98);
}

/* === ПЛАШКА ОЗНАКОМЛЕНИЯ С ПОЛЬЗОВАТЕЛЬСКИМ СОГЛАШЕНИЕМ === */
/* Визуально аналогична .cookie-overlay, но отдельные классы --
   условие показа и логика принятия другие (завязаны на серверный флаг
   agreement_accepted, а не на localStorage) */

.agreement-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.agreement-overlay.active {
  opacity: 1;
  visibility: visible;
}

.agreement-banner {
  width: 100%;
  background-color: var(--bg-card);
  border-radius: 24px 24px 0 0;
  padding: 24px 16px 44px 16px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.agreement-overlay.active .agreement-banner {
  transform: translateY(0);
}

.agreement-content h3 {
  margin: 0 0 6px 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
}

.agreement-content p {
  margin: 0 0 20px 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
}

.agreement-content a {
  color: #007aff;
  text-decoration: none;
  font-weight: 600;
}

.agreement-btn {
  width: 100%;
  height: 48px;
  background-color: #007aff;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.1s;
}

.agreement-btn:active {
  background-color: #0062cc;
  transform: scale(0.98);
}

.agreement-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
