/* ========================================
   ALEXLIVRAISON - COMMON STYLES
   Общие стили для всех страниц сайта
   ======================================== */

:root {
  --violet: #6b23ff;
  --violet-dark: #32006b;
  --green: #4caf50;
  --red: #ff4757;
  --orange: #ff9100;
  --glass: rgba(255, 255, 255, 0.95);
  --glass-15: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.2);
  --ring: rgba(255, 255, 255, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: #222;
  background: linear-gradient(135deg, #32006b 0%, #7a2cf5 50%, #43dfb8 100%);
  background-size: 200% 200%;
  background-attachment: fixed;
  animation: anim-bg 20s ease-in-out infinite;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.dark-mode {
  color: #fff;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

@keyframes anim-bg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ========== FLOATING BACKGROUND ANIMATION ========== */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.floating-logo {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.15;
  animation: floatUp 15s infinite linear;
  will-change: transform;
}

@keyframes floatUp {
  0% { transform: translate3d(0, 110vh, 0) rotate(0deg); }
  100% { transform: translate3d(0, -10vh, 0) rotate(360deg); }
}

/* ========== TOPBAR ========== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  backdrop-filter: blur(15px);
  background: rgba(20, 0, 45, 0.85);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 16px;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
}

.brand img,
.logo-img {
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ========== HAMBURGER MENU BUTTON ========== */
.hamb,
.hamburger {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: var(--glass-15);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  position: relative;
  z-index: 150;
  transition: all 0.3s ease;
}

.hamb:hover,
.hamburger:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.hamb:active,
.hamburger:active {
  transform: scale(0.95);
}

.hamb span,
.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* ========== DRAWER MENU ========== */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
  pointer-events: none;
}

.drawer .shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: 0.3s;
  pointer-events: none;
  backdrop-filter: blur(3px);
}

.drawer .panel {
  position: absolute;
  left: -280px;
  top: 0;
  bottom: 0;
  width: 280px;
  background: #14002b;
  color: #fff;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  padding: 20px;
  padding-top: 70px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: 0.3s ease-in-out;
  overflow-y: auto;
}

.drawer.open {
  pointer-events: auto;
}

.drawer.open .shade {
  opacity: 1;
  pointer-events: auto;
}

.drawer.open .panel {
  left: 0;
}

.drawer a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  background: var(--glass-15);
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: 0.3s;
}

.drawer a:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateX(5px);
}

/* ========== EMOJI ANIMATIONS ========== */
.menu-anim {
  display: inline-block;
  animation: bounce 2s infinite ease-in-out;
}

.flag-anim {
  display: inline-block;
  animation: wave 2s infinite ease-in-out;
}

.rocket-anim {
  display: inline-block;
  animation: rocket 2s infinite ease-in-out;
}

.party-anim {
  display: inline-block;
  animation: wiggle 1s infinite ease-in-out;
}

.sticker-anim {
  display: inline-block;
  animation: stickerJump 2s infinite ease-in-out;
}

.step-anim {
  display: inline-block;
  animation: pulse 2s infinite ease-in-out;
}

.box-anim {
  display: inline-block;
  animation: shake 2s infinite ease-in-out;
}

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

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}

@keyframes rocket {
  0%, 100% { transform: translateY(0) rotate(-45deg); }
  50% { transform: translateY(-10px) rotate(-45deg); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-10deg); }
  50% { transform: rotate(10deg); }
}

@keyframes stickerJump {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.1); }
}

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

@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

/* ========== BUTTONS ========== */
.btn, button {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--violet), #9c27b0);
  color: #fff;
  box-shadow: 0 4px 15px rgba(107, 35, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(107, 35, 255, 0.5);
}

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

/* ========== CARDS ========== */
.card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--glass-border);
  transition: 0.3s;
}

body.dark-mode .card {
  background: rgba(30, 30, 30, 0.85);
  color: #fff;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

/* ========== UTILITIES ========== */
.wrap {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 16px;
  position: relative;
  z-index: 2;
}

.text-center {
  text-align: center;
}

.shiny-text {
  background: linear-gradient(90deg, #fff, #b388ff, #fff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 3s linear infinite;
}

@keyframes shine {
  to { background-position: 200% center; }
}

/* ========== FAVORITE HEART BUTTON ========== */
.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: 0.3s;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.fav-btn:hover {
  transform: scale(1.15);
}

.fav-btn:active {
  transform: scale(0.95);
}

.fav-btn.active {
  animation: heartBeat 0.5s;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(1.1); }
  75% { transform: scale(1.2); }
}

/* ========== MOBILE OPTIMIZATIONS ========== */
@media (max-width: 768px) {
  .hamb,
  .hamburger {
    width: 52px;
    height: 52px;
  }
  
  .brand img,
  .logo-img {
    width: 50px;
    height: 50px;
  }
  
  .topbar {
    padding: 10px 12px;
  }
}

/* ========== LOADING SKELETON ========== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========== SCROLL TO TOP BUTTON ========== */
.scroll-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(107, 35, 255, 0.4);
  z-index: 90;
  transition: 0.3s;
}

.scroll-top.visible {
  display: flex;
}

.scroll-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(107, 35, 255, 0.6);
}

/* ========== FOOTER ========== */
.footer {
  width: 100%;
  text-align: center;
  padding: 30px 20px;
  margin-top: auto;
  border-top: 1px solid var(--glass-border);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  z-index: 2;
}

/* ========== ACCESSIBILITY ========== */
:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== PRINT STYLES ========== */
@media print {
  .topbar,
  .drawer,
  .hamb,
  .hamburger,
  .scroll-top,
  .fav-btn {
    display: none !important;
  }
}
