/* Lazy Loading Styles */
[data-bg] {
  background-color: #f0f0f0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 0.3s ease-in-out;
}

[data-bg]:not(.loaded) {
  opacity: 0.7;
}

[data-bg].loaded {
  opacity: 1;
}

[data-bg].error {
  background-color: #e0e0e0;
  opacity: 0.5;
}

img[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

img[data-src].loaded {
  opacity: 1;
}

/* Dark mode support for lazy loading */
.dark [data-bg]:not(.loaded) {
  background-color: #2a2a2a;
}

.dark [data-bg].error {
  background-color: #3a3a3a;
}

/* Video Upload Component Styles */
.video-upload-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #f9fafb;
}

.upload-area:hover {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

.upload-area.drag-over {
  border-color: #3b82f6;
  background-color: #eff6ff;
  transform: scale(1.02);
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.upload-icon {
  color: #6b7280;
  transition: color 0.3s ease;
}

.upload-area:hover .upload-icon {
  color: #3b82f6;
}

.upload-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

.upload-description {
  color: #6b7280;
  margin: 0;
  font-size: 0.875rem;
}

.upload-formats,
.upload-limit {
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 0;
}

.video-preview {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  background-color: white;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.preview-header h4 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #374151;
}

.remove-video {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.remove-video:hover {
  color: #ef4444;
  background-color: #fef2f2;
}

.preview-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-label {
  font-weight: 500;
  color: #6b7280;
  font-size: 0.875rem;
}

.info-value {
  color: #374151;
  font-size: 0.875rem;
}

.preview-actions {
  margin-top: 1rem;
}

.upload-progress {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  background-color: white;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.progress-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
}

.progress-percentage {
  font-size: 0.875rem;
  font-weight: 600;
  color: #3b82f6;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background-color: #3b82f6;
  transition: width 0.3s ease;
}

.progress-info {
  font-size: 0.875rem;
  color: #6b7280;
}

.upload-result {
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.upload-result.success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.upload-result.error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
}

.result-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.result-icon {
  width: 24px;
  height: 24px;
}

.upload-result.success .result-icon {
  color: #16a34a;
}

.upload-result.error .result-icon {
  color: #dc2626;
}

.result-message {
  font-weight: 500;
}

.upload-result.success .result-message {
  color: #16a34a;
}

.upload-result.error .result-message {
  color: #dc2626;
}

/* Video Player Component Styles */
.video-player-container {
  width: 100%;
  position: relative;
  background-color: #000;
  border-radius: 12px;
  overflow: hidden;
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.video-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
}

.play-button:hover {
  background-color: rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 1rem;
  color: white;
}

.overlay-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-info h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.video-info p {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.9;
}

.video-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.control-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.progress-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  cursor: pointer;
}

.progress-fill {
  height: 100%;
  background-color: #3b82f6;
  border-radius: 2px;
  transition: width 0.1s ease;
}

.progress-handle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-color: #3b82f6;
  border-radius: 50%;
  cursor: pointer;
  transition: left 0.1s ease;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Dark mode support for video components */
.dark .upload-area {
  background-color: #1f2937;
  border-color: #374151;
}

.dark .upload-area:hover {
  background-color: #1e3a8a;
  border-color: #3b82f6;
}

.dark .upload-title {
  color: #f9fafb;
}

.dark .upload-description {
  color: #d1d5db;
}

.dark .video-preview {
  background-color: #1f2937;
  border-color: #374151;
}

.dark .preview-header h4 {
  color: #f9fafb;
}

.dark .info-label {
  color: #d1d5db;
}

.dark .info-value {
  color: #f9fafb;
}

.dark .upload-progress {
  background-color: #1f2937;
  border-color: #374151;
}

.dark .progress-header h4 {
  color: #f9fafb;
}

.dark .progress-info {
  color: #d1d5db;
}

:root {
  /* Primary Colors - Ocean Blue Theme */
  --color-primary-50: #E3F2FD;
  --color-primary-100: #BBDEFB;
  --color-primary-200: #90CAF9;
  --color-primary-300: #64B5F6;
  --color-primary-400: #42A5F5;
  --color-primary-500: #1E88E5; /* Main Primary */
  --color-primary-600: #1976D2;
  --color-primary-700: #1565C0;
  --color-primary-800: #0D47A1;
  --color-primary-900: #0A3D91;

  /* Secondary Colors - Nature Green */
  --color-secondary-50: #E8F5E8;
  --color-secondary-100: #C8E6C9;
  --color-secondary-200: #A5D6A7;
  --color-secondary-300: #81C784;
  --color-secondary-400: #66BB6A;
  --color-secondary-500: #43A047; /* Main Secondary */
  --color-secondary-600: #388E3C;
  --color-secondary-700: #2E7D32;
  --color-secondary-800: #1B5E20;
  --color-secondary-900: #0D4F14;

  /* Accent Colors - Fishing Orange */
  --color-accent-50: #FFF3E0;
  --color-accent-100: #FFE0B2;
  --color-accent-200: #FFCC80;
  --color-accent-300: #FFB74D;
  --color-accent-400: #FFA726;
  --color-accent-500: #FF9800; /* Main Accent */
  --color-accent-600: #FB8C00;
  --color-accent-700: #F57C00;
  --color-accent-800: #EF6C00;
  --color-accent-900: #E65100;

  /* Status Colors */
  --color-success: #43A047;
  --color-warning: #FB8C00;
  --color-error: #E53935;
  --color-info: #1E88E5;

  /* Neutral Colors */
  --color-gray-50: #FAFAFA;
  --color-gray-100: #F5F5F5;
  --color-gray-200: #EEEEEE;
  --color-gray-300: #E0E0E0;
  --color-gray-400: #BDBDBD;
  --color-gray-500: #9E9E9E;
  --color-gray-600: #757575;
  --color-gray-700: #616161;
  --color-gray-800: #424242;
  --color-gray-900: #212121;

  /* Text Colors */
  --color-text-primary: #212121;
  --color-text-secondary: #757575;
  --color-text-disabled: #BDBDBD;
  --color-text-inverse: #FFFFFF;

  /* Background Colors */
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #F5F5F5;
  --color-bg-tertiary: #EEEEEE;
  --color-bg-overlay: rgba(0, 0, 0, 0.5);

  /* Font Families */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-family-secondary: 'Inter', sans-serif;
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

  /* Font Sizes - Mobile First */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */

  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

  /* Spacing Scale */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */
  --space-32: 8rem;      /* 128px */

  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

  /* Animation Durations */
  --animation-fast: 150ms;
  --animation-normal: 300ms;
  --animation-slow: 500ms;

  /* Z-Index Layers */
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;

  /* Component Heights */
  --header-height: 60px;
  --bottom-menu-height: 80px;
  --button-height-sm: 32px;
  --button-height-md: 40px;
  --button-height-lg: 48px;
  --input-height: 44px;

  /* Icon Sizes */
  --icon-size-sm: 16px;
  --icon-size-md: 20px;
  --icon-size-lg: 24px;
  --icon-size-xl: 32px;

  /* Breakpoints */
  --breakpoint-mobile: 320px;
  --breakpoint-mobile-large: 414px;
  --breakpoint-tablet: 768px;
  --breakpoint-desktop: 1024px;
  --breakpoint-desktop-large: 1440px;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Mobile-first approach */
@media (max-width: 414px) {
  body {
    font-size: var(--font-size-sm);
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  margin-bottom: var(--space-4);
  line-height: var(--line-height-relaxed);
}

a {
  color: var(--color-primary-500);
  text-decoration: none;
  transition: color var(--animation-fast);
}

a:hover {
  color: var(--color-primary-600);
}

/* Header Component */
.header-component {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--color-bg-primary);
  z-index: var(--z-index-sticky);
  display: flex;
  align-items: center;
  padding: 0 var(--space-4);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 414px;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header-center {
  flex: 1;
  max-width: 200px;
  margin: 0 var(--space-4);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.logo-image {
  width: 107px !important;
  height: auto !important;
  object-fit: contain;
}

/* Logo styles for catches page */
body:has([data-page="catches"]) .logo-image,
body.catches-page .logo-image,
[data-page="catches"] .logo-image {
  width: 137px !important;
  height: 39px !important;
  padding-left: 10px !important;
  object-fit: contain;
}

/* Catches page container styles */
body.catches-page #catchesContainer,
body:has([data-page="catches"]) #catchesContainer,
[data-page="catches"] #catchesContainer {
  padding-top: 0;
  padding-bottom: 80px; /* Space for bottom menu */
  padding-left: 0;
  padding-right: 0;
  min-height: calc(100vh - var(--header-height, 60px)); /* Account for header height */
  max-width: 100%;
  width: 100%;
}

/* Limit container width on desktop for better readability */
@media (min-width: 768px) {
  body.catches-page #catchesContainer,
  body:has([data-page="catches"]) #catchesContainer,
  [data-page="catches"] #catchesContainer {
    max-width: 28rem; /* Same as bottom menu max-width */
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Mobile: добавить небольшие отступы по бокам */
@media (max-width: 767px) {
  body.catches-page #catchesContainer,
  body:has([data-page="catches"]) #catchesContainer,
  [data-page="catches"] #catchesContainer {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Улучшение визуального оформления карточек */
body.catches-page [data-item-id],
body:has([data-page="catches"]) [data-item-id],
[data-page="catches"] [data-item-id] {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.catches-page [data-item-id]:hover,
body:has([data-page="catches"]) [data-item-id]:hover,
[data-page="catches"] [data-item-id]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark body.catches-page [data-item-id]:hover,
.dark body:has([data-page="catches"]) [data-item-id]:hover,
.dark [data-page="catches"] [data-item-id]:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Header styles for catches page */
body.catches-page #header-component,
body:has([data-page="catches"]) #header-component,
[data-page="catches"] #header-component {
  min-height: var(--header-height, 60px);
  height: auto;
}

/* Bottom menu styles - matching map.html - High specificity - MUST BE APPLIED */
body .bottom-menu-component,
#bottom-menu-component.bottom-menu-component,
nav.bottom-menu-component,
body nav#bottom-menu-component,
body nav.bottom-menu-component {
  max-width: 28rem !important; /* 448px - max-w-md */
  z-index: 50 !important;
  pointer-events: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: auto !important;
}

/* Ensure max-width works on desktop - OVERRIDE ALL OTHER RULES */
@media (min-width: 768px) {
  body .bottom-menu-component,
  #bottom-menu-component.bottom-menu-component,
  nav.bottom-menu-component,
  body nav#bottom-menu-component,
  body nav.bottom-menu-component,
  html body nav#bottom-menu-component.bottom-menu-component {
    max-width: 28rem !important; /* 448px */
    width: 28rem !important; /* Force width */
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (max-width: 767px) {
  /* On mobile, bottom menu should be full width */
  body .bottom-menu-component,
  #bottom-menu-component.bottom-menu-component,
  nav.bottom-menu-component {
    max-width: 100% !important;
  }
  
  /* Add padding to body on mobile to prevent content overlap */
  body.catches-page,
  body:has([data-page="catches"]),
  [data-page="catches"] {
    padding-bottom: 80px;
  }
}

.login-logo-image {
  width: 107px !important;
  height: auto !important;
  object-fit: contain;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.logo img {
  height: 32px;
  width: auto;
}

.logo-text {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-500);
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box input {
  width: 100%;
  height: 36px;
  padding: 0 var(--space-3) 0 var(--space-10);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  background: var(--color-gray-50);
  transition: all var(--animation-normal);
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-primary-500);
  background: var(--color-bg-primary);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.search-box button {
  position: absolute;
  left: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: var(--space-1);
  color: var(--color-gray-500);
  cursor: pointer;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--animation-fast);
}

.user-menu:hover {
  background: var(--color-gray-100);
}

/* User overlay in catch cards - avatar and name in top-left corner */
[class*="absolute"][class*="top-1"][class*="left-1"] img[class*="rounded-full"],
[class*="absolute"][class*="top-1"][class*="left-1"] img[class*="size-8"],
[class*="absolute"][class*="top-1"][class*="left-1"] img[class*="size-10"] {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
}

/* Отступ 10px для имени пользователя */
[class*="absolute"][class*="top-1"][class*="left-1"] .flex.flex-col {
  margin-left: 10px !important;
}

[class*="absolute"][class*="top-1"][class*="right-1"] p[class*="text-white"] {
  font-size: 12px !important;
  line-height: 1.2 !important;
}

[class*="absolute"][class*="top-1"][class*="left-1"] {
  top: 40px !important;
  left: 16px !important;
  gap: 2px !important;
}

[class*="absolute"][class*="top-1"][class*="right-1"] {
  top: 4px !important;
  right: 4px !important;
  gap: 2px !important;
}

/* Friend avatars in bottom-left corner */
[class*="absolute"][class*="bottom-2"][class*="left-2"] {
  bottom: 8px !important;
  left: 8px !important;
  position: absolute !important;
}

/* Friend avatars - 24px circular */
[class*="absolute"][class*="bottom-2"][class*="left-2"] [data-user-id],
[class*="absolute"][class*="bottom-2"][class*="left-2"] div[class*="rounded-full"][class*="border-2"] {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  border-radius: 50% !important;
}

[class*="absolute"][class*="bottom-2"][class*="left-2"] img[alt="Friend"] {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}

/* Action Bar buttons - remove background */
button[class*="rounded-full"][class*="p-2"][class*="flex"][class*="items-center"][class*="justify-center"] {
  background: transparent !important;
  background-color: transparent !important;
}

/* Header menu icons - remove hover background */
#header-component button {
  background: transparent !important;
  background-color: transparent !important;
}

#header-component button:hover {
  background: transparent !important;
  background-color: transparent !important;
}

/* Spacing under image */
.relative.w-full + .h-4 {
  height: 16px !important;
  min-height: 16px !important;
  display: block !important;
}

/* Images should be cropped, not compressed */
.relative.w-full img[class*="object-cover"],
.relative.w-full img[class*="lazy-image"],
.relative.w-full img[alt*="image"],
.relative.w-full img[alt*="Track"],
.relative.w-full img[alt*="Catch"] {
  object-fit: cover !important;
  object-position: center !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
}

/* Image wrapper should have overflow hidden */
.relative.w-full > div[class*="absolute"][class*="inset-0"],
.relative.w-full > div[class*="overflow-hidden"] {
  overflow: hidden !important;
}

/* Images should be cropped, not compressed - maintain aspect ratio */
.relative.w-full img[alt*="image"],
.relative.w-full img[alt*="Track"],
.relative.w-full img[alt*="Catch"] {
  object-fit: cover !important;
  object-position: center !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  min-height: 100% !important;
}

/* More specific selector for Action Bar buttons */
div[class*="flex"][class*="items-center"][class*="justify-between"][class*="px-2"][class*="pt-2"] button {
  background: transparent !important;
  background-color: transparent !important;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.notification-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--color-error);
  color: var(--color-text-inverse);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

/* Bottom Menu Component - Base styles */
.bottom-menu-component {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  /* Height is handled by content */
  /* Background is handled by Tailwind classes on inner div: bg-background-light dark:bg-background-dark/80 */
  /* border-top is handled by Tailwind classes on inner div: border-t border-slate-200/10 dark:border-slate-800/70 */
  /* padding is handled by Tailwind classes on inner div: p-2 */
  z-index: 50 !important;
  pointer-events: auto !important;
}

/* Ensure inner div with Tailwind classes has proper styling and doesn't conflict */
.bottom-menu-component > div {
  width: 100% !important;
  /* Height is auto, controlled by content */
  /* Background, border, padding are handled by Tailwind classes - don't override */
  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;
}

/* Ensure links in bottom menu use Tailwind colors and don't get overridden by global a {} rule */
.bottom-menu-component > div > a {
  /* Override global a {} rule to allow Tailwind classes to work */
  color: inherit !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

/* Ensure active links use primary color (Tailwind class takes precedence) */
.bottom-menu-component > div > a.text-primary {
  color: #11a4d4 !important;
}

.dark .bottom-menu-component > div > a.text-primary {
  color: #11a4d4 !important;
}

/* Ensure the add button (middle button) has correct styling - matching map.html */
.bottom-menu-component > div > a > div.bg-primary {
  width: 3.5rem !important; /* w-14 */
  height: 2.5rem !important; /* h-10 */
  background-color: #11a4d4 !important;
  color: white !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 9999px !important; /* rounded-full */
}

.bottom-menu-component > div > a > div.bg-primary > span {
  color: white !important;
}

/* Desktop: ограничиваем ширину и центрируем - matching map.html */
@media (min-width: 768px) {
  .bottom-menu-component {
    max-width: 28rem !important; /* 448px - matching map.html */
    width: 28rem !important; /* Force width */
    margin-left: auto !important;
    margin-right: auto !important;
    left: auto !important;
    right: auto !important;
  }
}

/* Mobile: полная ширина */
@media (max-width: 767px) {
  .bottom-menu-component {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* Dark mode background is handled by Tailwind classes: dark:bg-background-dark/80 */
/* Dark mode border is handled by Tailwind classes: dark:border-slate-800/70 */

/* .bottom-menu-content is deprecated - using Tailwind classes directly on inner div */

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--animation-fast);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  min-width: 60px;
  position: relative;
}

.menu-item:hover {
  background: var(--color-gray-100);
  color: var(--color-text-primary);
}

.menu-item.active {
  color: var(--color-primary-500);
  background: rgba(30, 136, 229, 0.1);
}

.menu-item svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.menu-item span {
  font-size: var(--font-size-xs);
  line-height: 1;
}

.menu-item .badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--color-error);
  color: var(--color-text-inverse);
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 16px;
  text-align: center;
  display: none;
}

/* Button Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  cursor: pointer;
  transition: all var(--animation-fast);
  text-decoration: none;
  min-height: 44px; /* Touch target */
  font-family: inherit;
}

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

.btn-primary {
  background: var(--color-primary-500);
  color: var(--color-text-inverse);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-gray-100);
  color: var(--color-text-primary);
  border: 1px solid var(--color-gray-300);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-gray-200);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary-500);
  border: 1px solid var(--color-primary-500);
}

.btn-outline:hover:not(:disabled) {
  background: var(--color-primary-500);
  color: var(--color-text-inverse);
}

.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-xs);
  min-height: 32px;
}

.btn-lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-size-lg);
  min-height: 48px;
}

/* Card Component */
.card {
  background: var(--color-bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-200);
  overflow: hidden;
  transition: all var(--animation-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-gray-200);
}

.card-body {
  padding: var(--space-4);
}

.card-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--color-gray-200);
  background: var(--color-gray-50);
}

/* Form Elements */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  height: var(--input-height);
  padding: 0 var(--space-3);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  background: var(--color-bg-primary);
  transition: all var(--animation-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.form-input:invalid {
  border-color: var(--color-error);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
  padding: var(--space-3);
}

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right var(--space-2) center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: var(--space-10);
}

.form-checkbox,
input[type="checkbox"].form-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  border: 1px solid var(--color-gray-300);
  background-color: var(--color-bg-primary);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all var(--animation-fast);
}

.form-checkbox:checked,
input[type="checkbox"].form-checkbox:checked {
  background-color: var(--color-primary-500);
  border-color: var(--color-primary-500);
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L4 12.586l7.793-7.793a1 1 0 011.414 0z'/%3e%3c/svg%3e");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

.form-checkbox:focus,
input[type="checkbox"].form-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }

.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }

.bg-primary { background-color: var(--color-bg-primary); }
.bg-secondary { background-color: var(--color-bg-secondary); }

.p-0 { padding: var(--space-0); }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.m-0 { margin: var(--space-0); }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-6 { margin: var(--space-6); }
.m-8 { margin: var(--space-8); }

.mb-0 { margin-bottom: var(--space-0); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-0 { margin-top: var(--space-0); }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Responsive Design */
@media (min-width: 768px) {
  .header-content {
    max-width: 768px;
  }
  
  /* .bottom-menu-content is deprecated */
}

@media (min-width: 1024px) {
  .header-content {
    max-width: 1024px;
  }
  
  /* .bottom-menu-content is deprecated */
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #B0B0B0;
    --color-text-disabled: #666666;
    --color-text-inverse: #000000;
    
    --color-bg-primary: #121212;
    --color-bg-secondary: #1E1E1E;
    --color-bg-tertiary: #2A2A2A;
    
    --color-gray-50: #1E1E1E;
    --color-gray-100: #2A2A2A;
    --color-gray-200: #3A3A3A;
    --color-gray-300: #4A4A4A;
    --color-gray-400: #6A6A6A;
    --color-gray-500: #8A8A8A;
    --color-gray-600: #AAAAAA;
    --color-gray-700: #CACACA;
    --color-gray-800: #EAEAEA;
    --color-gray-900: #FFFFFF;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn var(--animation-normal) ease-in-out;
}

.slide-up {
  animation: slideUp var(--animation-normal) ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
*:focus {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --color-text-primary: #000000;
    --color-text-secondary: #333333;
    --color-bg-primary: #FFFFFF;
    --color-bg-secondary: #F0F0F0;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
