/* ══════════════════════════════════
   МОТОКРУГ — Единый дизайн 2026
   ══════════════════════════════════ */

:root {
  --accent: #E8420A;
  --accent-dark: #1a0800;
  --bg: #080808;
  --bg-card: #0f0f0f;
  --bg-card2: #111;
  --bg-input: #1a1a1a;
  --border: #1e1e1e;
  --border-light: #2a2a2a;
  --text: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #777777;
  --text-dim: #444444;
  --text-ghost: #252525;
  --online: #22c55e;
}

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

body {
  font-family: -apple-system,'SF Pro Display','Segoe UI',sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ══ ФОНОВЫЕ ЭЛЕМЕНТЫ ══ */
body::before {
  content: '';
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  border: 1px solid rgba(232,66,10,0.04);
  top: -200px; right: -150px;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  width: 400px; height: 400px;
  border-radius: 50%;
  border: 1px solid rgba(232,66,10,0.03);
  bottom: -150px; left: -100px;
  pointer-events: none;
  z-index: 0;
}
.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(232,66,10,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 0% 0%, rgba(232,66,10,0.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* ══ АНИМАЦИИ ══ */
@keyframes fadeInUp {
  from{opacity:0;transform:translateY(16px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes fadeIn {
  from{opacity:0} to{opacity:1}
}
@keyframes slideInRight {
  from{opacity:0;transform:translateX(16px)}
  to{opacity:1;transform:translateX(0)}
}
@keyframes postLoad {
  from{opacity:0;transform:translateY(14px) scale(0.99)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes skeletonWave {
  0%{background-position:-400px 0}
  100%{background-position:400px 0}
}
@keyframes onlinePulse {
  0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,0.4)}
  50%{box-shadow:0 0 0 5px rgba(34,197,94,0)}
}
@keyframes likeExplode {
  0%{transform:scale(1)}
  30%{transform:scale(1.5)}
  60%{transform:scale(0.9)}
  100%{transform:scale(1)}
}
@keyframes ripple {
  0%{transform:scale(0);opacity:0.4}
  100%{transform:scale(3);opacity:0}
}
@keyframes popIn {
  0%{transform:scale(0.85);opacity:0}
  70%{transform:scale(1.05)}
  100%{transform:scale(1);opacity:1}
}
@keyframes bellRing {
  0%,100%{transform:rotate(0)}
  20%{transform:rotate(-12deg)}
  40%{transform:rotate(9deg)}
  60%{transform:rotate(-6deg)}
  80%{transform:rotate(4deg)}
}
@keyframes toastSlide {
  from{opacity:0;transform:translateY(20px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes pulse {
  0%,100%{box-shadow:0 0 0 0 rgba(232,66,10,0.5)}
  50%{box-shadow:0 0 0 14px rgba(232,66,10,0)}
}
@keyframes lineGrow {
  from{width:0} to{width:100%}
}
@keyframes float {
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-4px)}
}
@keyframes scaleIn {
  from{opacity:0;transform:scale(0.97)}
  to{opacity:1;transform:scale(1)}
}

/* ══ ЛОГОТИП ══ */
.logo-moto { color: #ffffff !important; font-weight: 900; }
.logo-krug { color: var(--accent) !important; font-weight: 900; }

/* ══ КНОПКИ ══ */
.btn-primary, .btn-accent, .submit-btn,
button[type="submit"], .cta-btn,
.btn-orange {
  background-color: var(--accent) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: none !important;
  position: relative;
  overflow: hidden;
}
.btn-primary:hover, .btn-accent:hover,
button[type="submit"]:hover, .cta-btn:hover,
.btn-primary:focus, .btn-primary:active,
.btn-accent:active, .submit-btn:hover,
.submit-btn:active, .submit-btn:focus {
  background-color: var(--accent) !important;
  color: #ffffff !important;
  outline: none !important;
}
.btn-primary::before, .btn-accent::before {
  content: '';
  position: absolute;
  top: 0; left: 5%;
  width: 40px; height: 100%;
  background: rgba(255,255,255,0.1);
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: 1;
}
.btn-primary span, .btn-accent span {
  position: relative;
  z-index: 2;
  color: #ffffff !important;
}

.btn-secondary {
  background: transparent !important;
  border: 0.5px solid var(--border-light) !important;
  color: var(--text-muted) !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: border-color 0.2s, color 0.2s !important;
}
.btn-secondary:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

/* ══ ИНПУТЫ ══ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
textarea, select {
  background: var(--bg-input) !important;
  background-color: var(--bg-input) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 10px !important;
  color: var(--text) !important;
  font-size: 16px !important;
  font-family: inherit !important;
  -webkit-text-fill-color: var(--text) !important;
  transition: border-color 0.2s !important;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(232,66,10,0.1) !important;
}input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 30px var(--bg-input) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  background-color: var(--bg-input) !important;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}
input[type="checkbox"] { accent-color: var(--accent); }

/* ══ КАРТОЧКИ ══ */
.card, .post-card, .community-card,
.event-card, .message-card, .notification-card {
  background: var(--bg-card) !important;
  border: 0.5px solid var(--border) !important;
  border-radius: 16px !important;
  overflow: hidden;
  transition: border-color 0.2s !important;
}
.card:hover {
  border-color: var(--border-light) !important;
}

/* ══ АВАТАРКИ ══ */
.avatar, .user-avatar {
  border-radius: 11px !important;
}
.avatar-circle { border-radius: 50% !important; }

/* Онлайн */
.online-dot, .online-indicator, .status-online {
  background: var(--online) !important;
  border-radius: 50% !important;
  animation: onlinePulse 2s ease infinite !important;
}

/* ══ НИЖНЕЕ МЕНЮ ══ */
.bottom-nav, .nav-bar, .tab-bar, .bottom-tabs,
nav.bottom, .app-nav, [class*="bottom-nav"],
[class*="tab-bar"], [class*="nav-bottom"] {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1000 !important;
  background: #080808 !important;
  border-top: 0.5px solid #161616 !important;
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
}
.nav-item, .tab-item {
  color: var(--text-ghost) !important;
  transition: color 0.2s !important;
  position: relative;
}
.nav-item.active, .tab-item.active {
  color: var(--accent) !important;
}
.nav-item.active::after, .tab-item.active::after {
  content: '';
  display: block;
  width: 16px; height: 2px;
  background: var(--accent);
  border-radius: 1px;
  margin: 2px auto 0;
}
.nav-item:active { transform: scale(0.88); }

/* ══ ВЕРХНЯЯ ПАНЕЛЬ ══ */
.topbar, .header, .app-header, .top-bar {
  background: var(--bg) !important;
  border-bottom: 0.5px solid #111 !important;
  position: relative;
  z-index: 10;
}

/* ══ СКЕЛЕТОН ══ */
.skeleton {
  background: linear-gradient(90deg,#1a1a1a 25%,#222 50%,#1a1a1a 75%);
  background-size: 400px 100%;
  animation: skeletonWave 1.4s ease infinite;
  border-radius: 8px;
}

/* ══ ТОСТЫ ══ */
.toast, .notification-toast, .snackbar {
  background: var(--bg-card) !important;
  border: 1px solid var(--accent) !important;
  border-radius: 14px !important;
  color: var(--text) !important;
  animation: toastSlide 0.35s cubic-bezier(0.2,0,0,1) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
}

/* ══ МОДАЛКИ ══ */
.modal-overlay, .overlay {
  background: rgba(0,0,0,0.85) !important;
  backdrop-filter: blur(4px) !important;
}
.modal-content, .modal-box, .modal-inner, .sheet {
  background: var(--bg-card) !important;
  border: 0.5px solid var(--border-light) !important;
  border-radius: 20px !important;
  color: var(--text) !important;
  animation: popIn 0.3s cubic-bezier(0.2,0,0,1) !important;
}

/* ══ БЕЙДЖИ ══ */
.badge, .count-badge, .unread-badge {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  padding: 1px 5px !important;
  border: 1.5px solid var(--bg) !important;
}

/* ══ ССЫЛКИ ══ */
a { transition: color 0.2s; }
a.accent, .link-accent,
a.text-orange { color: var(--accent) !important; }

/* ══ РАЗДЕЛИТЕЛИ ══ */
.divider, hr {
  border: none !important;
  height: 0.5px !important;
  background: var(--border) !important;
}

/* ══ АНИМАЦИЯ ПОСТОВ ══ */
.post-enter, .post-animate {
  animation: postLoad 0.4s cubic-bezier(0.2,0,0,1) both;
}

/* ══ ФОТО ══ */

/* Контейнеры фото — обрезка при зуме */
.photo-grid, .post-photos, .photos-container,
.fp-1, .fp-carousel, .fp-3 {
  overflow: hidden !important;
  border-radius: 10px;
  isolation: isolate;
}

/* Ячейки сетки */
.photo-grid > div, .photo-cell, .photo-item,
.fp-3 .fp-main, .fp-3 .fp-side > div {
  overflow: hidden !important;
  position: relative !important;
}

/* Само фото */
.photo-container img, .post-photo img,
.photo-grid img, .photo-cell img, .photo-item img {
  transition: transform 0.4s cubic-bezier(0.2,0,0,1);
  display: block; width: 100%; height: 100%;
  object-fit: cover !important;
}

/* Зум только внутри ячейки */
.photo-container:hover img { transform: scale(1.03); }
.photo-grid > div:hover img,
.photo-cell:hover img,
.photo-item:hover img { transform: scale(1.04) !important; }

/* ══ ОПИСАНИЕ ПОСТА — ПУЗЫРЁК ══ */
.post-caption, .post-description {
  background: #161616;
  border-radius: 0 8px 8px 8px;
  padding: 8px 11px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.55;
  position: relative;
}
.post-caption::before {
  content: '';
  position: absolute;
  top: -6px; left: 0;
  border-right: 6px solid #161616;
  border-top: 6px solid transparent;
}

/* ══ СТРАНИЦА ══ */
.page-wrapper, .main-content, .content-wrapper {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-wrapper, .main-content,
.content-wrapper, .feed-container,
.app-content {
  padding-bottom: 70px !important;
}

/* ══ КНОПКА ЛАЙКА ══ */
.like-btn, .fire-btn {
  position: relative;
  overflow: hidden;
  transition: none !important;
}
.like-btn.liked, .fire-btn.active {
  background: var(--accent-dark) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

/* ══ СООБЩЕНИЯ — ПУЗЫРИ ══ */
.message-bubble-out, .msg-out {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 16px 16px 4px 16px !important;
}
.message-bubble-in, .msg-in {
  background: #1e1e1e !important;
  color: var(--text-secondary) !important;
  border-radius: 16px 16px 16px 4px !important;
}

/* ══ МОБИЛЕ ══ */
@media(max-width:768px) {
  input, textarea, select {
    font-size: 16px !important;
  }
  .page-wrapper, .main-content {
    max-width: 100%;
  }
}

/* ══ СКРОЛЛБАР ══ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}


/* ══ ЛОГОТИП БАЗОВЫЙ ══ */
.logo {
  font-size: 17px !important;
  font-weight: 900 !important;
  letter-spacing: -0.3px !important;
  color: #fff !important;
  text-decoration: none !important;
  text-shadow: none !important;
}

/* Исчезает при клике (focus), не только при наборе */

/* Пустое поле — серый курсив */
input::placeholder,
textarea::placeholder {
  color: #3a3a3a !important;
  font-style: italic !important;
  font-weight: 400 !important;
}

/* Заполненное поле — белый жирный */
input:not(:placeholder-shown),
textarea:not(:placeholder-shown) {
  color: #ffffff !important;
  font-weight: 600 !important;
  font-style: normal !important;
}

/* Активное поле — оранжевая рамка */
input:focus,
textarea:focus,
select:focus {
  border-color: #E8420A !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(232,66,10,0.08) !important;
}

/* Лейблы полей */
.field-label,
label,
.form-label,
.input-label {
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #666 !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  margin-bottom: 6px !important;
  display: block !important;
}

/* Поле с ошибкой */
input.error, textarea.error,
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: #ff4444 !important;
}

/* select — особый случай */
select option {
  background: #1a1a1a !important;
  color: #fff !important;
}

/* Textarea */
textarea {
  resize: vertical !important;
  min-height: 80px !important;
  line-height: 1.6 !important;
}

/* Поля даты и времени */
input[type="date"],
input[type="time"] {
  color-scheme: dark !important;
  color: #fff !important;
}
input[type="date"]::-webkit-datetime-edit-text,
input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field,
input[type="time"]::-webkit-datetime-edit-text,
input[type="time"]::-webkit-datetime-edit-hours-field,
input[type="time"]::-webkit-datetime-edit-minutes-field {
  color: #ffffff !important;
}

/* Убери iOS зум на мобиле */
@media(max-width: 768px) {
  input, textarea, select {
    font-size: 16px !important;
  }
}

/* ══ ПЛЕЙСХОЛДЕРЫ ══ */
input::placeholder,
textarea::placeholder,
select::placeholder {
  color: #3a3a3a !important;
  -webkit-text-fill-color: #3a3a3a !important;
  font-style: italic !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}
input:focus::placeholder,
textarea:focus::placeholder {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  opacity: 0 !important;
  transition: opacity 0.15s ease, color 0.15s ease !important;
}

/* ══ ЕДИНЫЙ СТИЛЬ ТЕКСТА ПОСТА ══ */
.post-content,
.post-desc,
.pv-intro,
.pv-final {
  font-family: -apple-system,'SF Pro Display','Segoe UI',sans-serif;
  font-size: 14px;
  line-height: 1.8;
  color: #ccc;
  white-space: pre-line;
}

.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 14px 0 8px !important;
  line-height: 1.4 !important;
  letter-spacing: -0.2px !important;
}
.post-content p {
  font-size: 14px;
  color: #ccc;
  line-height: 1.8;
  margin-bottom: 10px;
}
.post-content strong, .post-content b {
  color: #fff !important;
  font-weight: 700 !important;
}
.post-content em, .post-content i {
  color: #aaa !important;
  font-style: italic !important;
}
.post-content ul, .post-content ol {
  padding-left: 0 !important;
  list-style: none !important;
  margin: 8px 0 !important;
}
.post-content li {
  font-size: 14px;
  color: #ccc;
  line-height: 1.7;
  padding: 4px 0 4px 16px;
  position: relative;
}
.post-content li::before {
  content: '▸';
  color: #E8420A;
  position: absolute;
  left: 0;
  font-size: 10px;
  top: 6px;
}
.post-content hr {
  border: none !important;
  height: 0.5px !important;
  background: #1e1e1e !important;
  margin: 14px 0 !important;
}
.post-content blockquote {
  background: #161616 !important;
  border-left: 2px solid #E8420A !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 10px 14px !important;
  margin: 10px 0 !important;
  color: #888 !important;
  font-size: 13px !important;
}
.post-content a {
  color: #E8420A !important;
  text-decoration: none !important;
}

/* edit modal */
#editModal,.edit-modal{position:fixed!important;inset:0!important;background:rgba(0,0,0,.85)!important;backdrop-filter:blur(4px)!important;z-index:2000!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:16px!important}
#editModalContent,.edit-modal-content{background:#0f0f0f!important;border:.5px solid #1e1e1e!important;border-radius:18px!important;width:min(500px,95vw)!important;max-height:85vh!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;animation:popIn .3s cubic-bezier(.2,0,0,1)!important}
#editModal .modal-header,.edit-modal-header{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:16px 20px!important;border-bottom:.5px solid #1a1a1a!important;flex-shrink:0!important}
#editModal .modal-title,.edit-modal-title{font-size:15px!important;font-weight:700!important;color:#fff!important}
#editModal .modal-body,.edit-modal-body{flex:1!important;overflow-y:auto!important;padding:16px 20px!important;display:flex!important;flex-direction:column!important;gap:12px!important}
#editModal .field-label{font-size:9px!important;color:#555!important;letter-spacing:1px!important;text-transform:uppercase!important;font-weight:600!important;margin-bottom:5px!important;display:block!important}
.edit-photos-divider{height:.5px;background:#1e1e1e;margin:4px -20px}
.edit-photos-label{font-size:9px;color:#555;letter-spacing:1px;text-transform:uppercase;font-weight:600}
#editModal .modal-footer,.edit-modal-footer{padding:12px 20px!important;border-top:.5px solid #1a1a1a!important;display:flex!important;gap:8px!important;justify-content:flex-end!important;flex-shrink:0!important}
.edit-btn-cancel{background:#1a1a1a!important;border:.5px solid #2a2a2a!important;border-radius:8px!important;padding:9px 18px!important;font-size:12px!important;color:#888!important;cursor:pointer!important;transition:border-color .2s!important}
.edit-btn-save{background:#E8420A!important;border:none!important;border-radius:8px!important;padding:9px 24px!important;font-size:12px!important;font-weight:700!important;color:#fff!important;cursor:pointer!important}
#editModal .modal-body::-webkit-scrollbar{width:3px}
#editModal .modal-body::-webkit-scrollbar-thumb{background:#2a2a2a;border-radius:2px}
