/* Custom styles - Tailwind CDN provides base utilities */
:root {
  --accent: #A3E635;
  --accent-rgb: 163, 230, 53;
  --bg-dark: #1a1a1a;
  --sidebar-dark: #101010;
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-dark);
  color: white;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.sidebar-panel {
  background-color: var(--sidebar-dark) !important;
  color: white;
}
.sidebar-panel .sidebar-link:not(.active):not(.active-full) {
  color: white;
}

.app-topbar {
  background-color: rgba(26, 26, 26, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.mobile-tabbar {
  background-color: rgba(26, 26, 26, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.sidebar-panel select {
  background-color: #0d0d0d !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Light theme */
.light-theme body {
  background-color: rgb(249 250 251);
  color: rgb(17 24 32);
}
.light-theme .app-topbar {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-color: rgb(229 231 235) !important;
  color: rgb(55 65 81) !important;
}
.light-theme .app-topbar .text-gray-400 { color: rgb(75 85 99) !important; }
.light-theme .app-topbar [class*="bg-gray-900"],
.light-theme .app-topbar [class*="bg-gray-800"] {
  background-color: rgba(255, 255, 255, 0.9) !important;
}
.light-theme .bg-gray-800\/40,
.light-theme [class*="bg-gray-800/40"] {
  background-color: rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}
.light-theme .border-gray-800\/70,
.light-theme [class*="border-gray-800/70"] {
  border-color: rgb(229 231 235) !important;
}
.light-theme .text-gray-300 { color: rgb(75 85 99) !important; }
.light-theme .text-gray-400 { color: rgb(75 85 99) !important; }
.light-theme .mobile-tabbar {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgb(229 231 235);
}
.light-theme .mobile-tabbar .tab-item {
  color: rgb(75 85 99);
}
.light-theme .mobile-tabbar .tab-item:hover { color: var(--accent); }
.light-theme .mobile-tabbar .active-item {
  background-color: rgba(var(--accent-rgb), 0.25);
  color: var(--accent);
}
.light-theme .sidebar-panel {
  background-color: rgb(249 250 251) !important;
  color: rgb(31 41 55) !important;
  border-color: rgb(229 231 235) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.light-theme .sidebar-panel,
.light-theme .sidebar-panel h1,
.light-theme .sidebar-panel .sidebar-link:not(.active):not(.active-full) {
  color: rgb(31 41 55) !important;
}
.light-theme .sidebar-panel .text-gray-500 {
  color: rgb(75 85 99) !important;
}
.light-theme .sidebar-panel select {
  background-color: white !important;
  border-color: rgb(229 231 235) !important;
  color: rgb(31 41 55) !important;
}
.light-theme .sidebar-link { color: rgb(55 65 81); }
.light-theme .sidebar-link:hover { color: var(--accent); }
.light-theme .sidebar-link.active {
  border-color: var(--accent);
  background-color: rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
}
/* Active sidebar - full green bg (Контакты, Флот) */
.sidebar-link.active-full {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #111827 !important;
}
.light-theme .sidebar-link.active-full {
  background-color: var(--accent) !important;
  color: #111827 !important;
}
.light-theme .service-card-title { color: #111827 !important; font-weight: 600; }
.light-theme .service-card-more { color: var(--accent); }
.light-theme .btn-primary {
  background-color: var(--accent);
  color: #111827;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.light-theme .btn-primary:hover { background-color: #84cc16; }
.light-theme .btn-outline {
  border-color: var(--accent);
  color: var(--accent);
}
.light-theme .btn-outline:hover { background-color: rgba(var(--accent-rgb), 0.15); }
.light-theme .bg-gray-800 { background-color: rgb(243 244 246); color: rgb(17 24 32); }
.light-theme .bg-gray-900 { background-color: rgb(249 250 251); color: rgb(31 41 55); }
.light-theme .about-card {
  background-color: white !important;
  color: #1f2937 !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
}
.light-theme .about-card h3 { color: #111827 !important; }
.light-theme .about-card p,
.light-theme .about-card ul,
.light-theme .about-card li { color: #4b5563 !important; }
.light-theme h1, .light-theme h2, .light-theme h3,
.light-theme h4, .light-theme h5, .light-theme h6,
.light-theme .card-heading { color: #111827 !important; }
.light-theme main [class*="bg-gray-800"] {
  background-color: white !important;
  border: 1px solid #e5e7eb !important;
  color: #1f2937 !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
}
.light-theme main [class*="bg-gray-800"] h2,
.light-theme main [class*="bg-gray-800"] h3 { color: #111827 !important; }
.light-theme main [class*="bg-gray-800"] h3.service-card-title { color: #111827 !important; }
.light-theme main [class*="bg-gray-800"] p,
.light-theme main [class*="bg-gray-800"] ul,
.light-theme main [class*="bg-gray-800"] li { color: #4b5563 !important; }
.light-theme main [class*="text-green-400"]:not(h2):not(h3),
.light-theme main [class*="text-lime-400"]:not(h2):not(h3) { color: var(--accent) !important; }
.light-theme main h2[class*="text-lime-400"],
.light-theme main h3[class*="text-lime-400"] { color: #111827 !important; }
.light-theme main .text-gray-300,
.light-theme main .text-gray-400 { color: #4b5563 !important; }
/* Contact page & forms: dark text on light cards */
.light-theme main [class*="bg-gray-800"] a,
.light-theme main [class*="bg-gray-800"] button,
.light-theme main [class*="bg-gray-800"] button span,
.light-theme main [class*="bg-gray-800"] label,
.light-theme main [class*="bg-gray-800"] .text-white { color: #111827 !important; }
.light-theme main [class*="bg-gray-800"] a:hover,
.light-theme main [class*="bg-gray-800"] button:hover { color: var(--accent) !important; }
.light-theme main [class*="bg-gray-800"] input,
.light-theme main [class*="bg-gray-800"] textarea {
  background-color: #f9fafb !important;
  border-color: rgb(209 213 219) !important;
  color: #111827 !important;
}
.light-theme main [class*="bg-gray-800"] input::placeholder,
.light-theme main [class*="bg-gray-800"] textarea::placeholder { color: rgb(107 114 128) !important; }
.light-theme main [class*="bg-gray-800"] .border-gray-600,
.light-theme main [class*="bg-gray-800"] .border-gray-700 { border-color: rgb(209 213 219) !important; }
.light-theme main [class*="bg-gray-800"] .bg-gray-700\/50 { background-color: rgb(243 244 246) !important; }

/* Headings */
h1, h2, h3, h4, h5, h6 { color: white; }
.light-theme h1, .light-theme h2, .light-theme h3,
.light-theme h4, .light-theme h5, .light-theme h6 { color: rgb(17 24 32) !important; }

/* High contrast */
.high-contrast body { background-color: black; color: white; }
.high-contrast .bg-gray-800,
.high-contrast [class*="bg-gray-800"] { background-color: black !important; }
.high-contrast .text-gray-400 { color: rgb(229 231 235); }
.high-contrast .text-gray-300 { color: rgb(243 244 246); }
.high-contrast .border-gray-700 { border-color: rgb(107 114 128); }

/* Large text */
.large-text body { font-size: 18px; line-height: 1.6; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background-color: rgb(31 41 55); }
::-webkit-scrollbar-thumb {
  background-color: rgba(var(--accent-rgb), 0.5);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(var(--accent-rgb), 0.7); }
.light-theme ::-webkit-scrollbar-track { background-color: rgb(229 231 235); }
.light-theme ::-webkit-scrollbar-thumb { background-color: rgba(var(--accent-rgb), 0.7); }

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.3s;
  outline: none;
}
.btn:focus-visible { box-shadow: 0 0 0 2px var(--accent); outline-offset: 2px; }
.btn-primary {
  background-color: var(--accent);
  color: #111827;
}
.btn-primary:hover { background-color: #84cc16; color: #111827; }
.btn-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
}
.btn-outline:hover { background-color: rgba(var(--accent-rgb), 0.1); }

/* Mobile tabbar */
.mobile-tabbar .tab-item {
  color: rgb(209 213 219);
}
.mobile-tabbar .tab-item:hover { color: var(--accent); }
.mobile-tabbar .active-item {
  background-color: rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
}

/* Tab ripple */
.tab-ripple {
  position: absolute;
  border-radius: 9999px;
  pointer-events: none;
  transform: scale(0);
  background: rgba(var(--accent-rgb), 0.25);
  animation: tab-ripple 550ms ease-out forwards;
}
@keyframes tab-ripple { to { transform: scale(1); opacity: 0; } }

/* Hover float */
.hover-float {
  transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.hover-float:hover { transform: translateY(-4px); }

/* Card transition */
.card-transition {
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.card-transition:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: scale(1.02) translateY(-2px);
}

/* Background animate */
.bg-animate {
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Loading bar */
.loading-bar {
  height: 3px;
  background: linear-gradient(to right, var(--accent), #84cc16);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.7);
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.loading-bar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 2s infinite;
}

/* Animate fade in / slide up */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}
.animate-slide-up {
  animation: slideUp 0.6s ease-out forwards;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
