/* Mobile App Flutter-like Styles */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #f9fafb;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 0.5rem;
  --bottom-nav-height: 70px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="dark"] {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --text-color: #f3f4f6;
  --text-light: #d1d5db;
  --bg-color: #111827;
  --white: #1f2937;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile App Container */
.mobile-app-container {
  display: none;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-color);
}

/* Main Content Area */
.mobile-main-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
  -webkit-overflow-scrolling: touch;
}

/* Bottom Navigation Bar */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
  background: var(--white);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: var(--safe-area-bottom);
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .mobile-bottom-nav {
  background: var(--white);
  border-top-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

/* Bottom Nav Items */
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  padding: 8px 4px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  min-width: 0;
}

.mobile-nav-item:hover {
  background-color: rgba(37, 99, 235, 0.05);
}

.mobile-nav-item.active {
  color: var(--primary-color);
}

.mobile-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.mobile-nav-item i {
  font-size: 1.5rem;
  margin-bottom: 4px;
  transition: var(--transition);
}

.mobile-nav-item span {
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  line-height: 1;
  transition: var(--transition);
}

.mobile-nav-item.active i,
.mobile-nav-item.active span {
  color: var(--primary-color);
}

/* Mobile App Header */
.mobile-app-header {
  background: var(--white);
  padding: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

[data-theme="dark"] .mobile-app-header {
  background: var(--white);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.mobile-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-header-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Mobile Pages */
.mobile-page {
  display: none;
  min-height: 100%;
  padding: 1rem;
}

.mobile-page.active {
  display: block;
}

/* Mobile Cards */
.mobile-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

[data-theme="dark"] .mobile-card {
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mobile-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Mobile Buttons */
.mobile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  outline: none;
  width: 100%;
  margin-bottom: 0.5rem;
}

.mobile-btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.mobile-btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

.mobile-btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.mobile-btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Mobile List Items */
.mobile-list-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: var(--white);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: var(--transition);
  cursor: pointer;
}

[data-theme="dark"] .mobile-list-item {
  background: var(--white);
}

.mobile-list-item:hover {
  background-color: rgba(37, 99, 235, 0.05);
  transform: translateX(4px);
}

.mobile-list-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  margin-left: 1rem;
  flex-shrink: 0;
}

.mobile-list-item-content {
  flex: 1;
  min-width: 0;
}

.mobile-list-item-title {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.mobile-list-item-subtitle {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Mobile Search */
.mobile-search {
  position: relative;
  margin-bottom: 1rem;
}

.mobile-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background: var(--white);
  color: var(--text-color);
  font-size: 1rem;
  transition: var(--transition);
}

[data-theme="dark"] .mobile-search-input {
  background: var(--white);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

.mobile-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.mobile-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

/* Mobile Tabs */
.mobile-tabs {
  display: flex;
  background: var(--white);
  border-radius: 8px;
  padding: 0.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .mobile-tabs {
  background: var(--white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mobile-tab {
  flex: 1;
  padding: 0.5rem 1rem;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  color: var(--text-light);
}

.mobile-tab.active {
  background: var(--primary-color);
  color: var(--white);
}

/* Mobile Floating Action Button */
.mobile-fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + 1rem);
  right: 1rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  transition: var(--transition);
  z-index: 999;
}

.mobile-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}

.mobile-fab i {
  font-size: 1.5rem;
}

/* Mobile Modal */
.mobile-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-modal.active {
  opacity: 1;
  visibility: visible;
}

.mobile-modal-content {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem;
  max-width: 90%;
  max-height: 80%;
  overflow-y: auto;
  transform: scale(0.9);
  transition: var(--transition);
}

[data-theme="dark"] .mobile-modal-content {
  background: var(--white);
}

.mobile-modal.active .mobile-modal-content {
  transform: scale(1);
}

/* Mobile Loading */
.mobile-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.mobile-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(37, 99, 235, 0.2);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .mobile-app-container {
    display: flex;
  }
  
  .desktop-content {
    display: none;
  }
}

@media (min-width: 769px) {
  .mobile-app-container {
    display: none;
  }
  
  .desktop-content {
    display: block;
  }
}

/* Mobile Animations */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mobile-page.slide-in-up {
  animation: slideInUp 0.3s ease-out;
}

.mobile-page.slide-in-down {
  animation: slideInDown 0.3s ease-out;
}

/* Mobile Haptic Feedback */
@media (hover: none) and (pointer: coarse) {
  .mobile-nav-item:active,
  .mobile-btn:active,
  .mobile-list-item:active {
    transform: scale(0.95);
  }
}

/* Mobile Safe Area Support */
@supports (padding: max(0px)) {
  .mobile-bottom-nav {
    padding-bottom: max(var(--safe-area-bottom), 0px);
  }
  
  .mobile-main-content {
    padding-bottom: calc(var(--bottom-nav-height) + max(var(--safe-area-bottom), 0px));
  }
}

/* Install Toast Styles */
.install-toast {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.install-toast.hide {
  animation: slideDown 0.3s ease-in;
}

@keyframes slideDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* Install Button Hover Effects */
.install-btn-android:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.install-btn-ios:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

/* Toast Close Button */
.toast-close-btn {
  transition: all 0.2s ease;
}

.toast-close-btn:hover {
  transform: scale(1.1);
  color: #ef4444;
}

/* Dark Mode Toast Styles */
[data-theme="dark"] .install-toast {
  background: #1f2937;
  border-color: #374151;
}

[data-theme="dark"] .install-toast .text-gray-900 {
  color: #f9fafb;
}

[data-theme="dark"] .install-toast .text-gray-600 {
  color: #d1d5db;
}

[data-theme="dark"] .install-toast .text-gray-500 {
  color: #9ca3af;
}

[data-theme="dark"] .toast-close-btn {
  color: #9ca3af;
}

[data-theme="dark"] .toast-close-btn:hover {
  color: #f87171;
} 