/* Ocean Gradient Background Animation */
@keyframes ocean-gradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.ocean-gradient {
  background: linear-gradient(
    135deg,
    #0c4a6e,
    #0369a1,
    #0891b2,
    #06b6d4,
    #0891b2,
    #0369a1
  );
  background-size: 400% 400%;
  animation: ocean-gradient 15s ease infinite;
}

/* Wave Loading Animation */
@keyframes wave {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes wave-rise {
  0%, 100% {
    transform: translateY(0) scaleY(1);
  }
  50% {
    transform: translateY(-10px) scaleY(1.1);
  }
}

.wave-loader {
  position: relative;
  width: 120px;
  height: 60px;
  overflow: hidden;
}

.wave-loader::before,
.wave-loader::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 200%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath fill='%2306b6d4' d='M0,60 C300,120 600,0 900,60 C1200,120 1200,60 1200,60 L1200,120 L0,120 Z'/%3E%3C/svg%3E") repeat-x;
  background-size: 50% 100%;
}

.wave-loader::before {
  animation: wave 2s linear infinite;
  opacity: 0.7;
}

.wave-loader::after {
  animation: wave 3s linear infinite reverse;
  opacity: 0.5;
}

/* Glassmorphism Card */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Mini Sparkline Chart */
.mini-chart {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  opacity: 1;
  pointer-events: none;
}

.mini-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.glass-card-solid {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  transition: all 0.3s ease;
}

/* Condition Badge Pulse */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 currentColor;
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 8px 2px currentColor;
    opacity: 0.9;
  }
}

.badge-pulse {
  animation: pulse-glow 3s ease-in-out infinite;
}

.badge-excellent {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.badge-good {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.badge-fair {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: white;
}

.badge-poor {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
}

.badge-flat {
  background: linear-gradient(135deg, #64748b, #475569);
  color: white;
}

.badge-unknown {
  background: linear-gradient(135deg, #9ca3af, #6b7280);
  color: white;
}

/* Card Hover Effects */
.card-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-lift:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Skeleton Loading */
@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}

.skeleton-title {
  height: 1.5em;
  width: 60%;
  margin-bottom: 1em;
}

.skeleton-card {
  height: 200px;
}

/* Fade In Animation */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fade-in 0.5s ease forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Direction Arrow */
.direction-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

/* Pull to Refresh Indicator */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.refresh-spinner {
  animation: spin 1s linear infinite;
}

/* Chart Container */
.chart-container {
  position: relative;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 12px;
  padding: 16px;
  backdrop-filter: blur(8px);
}

/* Ripple Effect */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.5;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

/* Offline Banner */
.offline-banner {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  padding: 8px 16px;
  text-align: center;
  font-weight: 600;
}

/* Online/Offline Indicator */
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-online {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.status-offline {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

/* Difficulty Badges */
.difficulty-beginner {
  background: linear-gradient(135deg, #34d399, #10b981);
}

.difficulty-intermediate {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.difficulty-advanced {
  background: linear-gradient(135deg, #f87171, #ef4444);
}

/* Feature Tags */
.feature-tag {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
}

.feature-tag:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Back Button */
.back-button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Wave Height Indicator */
.wave-indicator {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 24px;
}

.wave-bar {
  width: 4px;
  background: linear-gradient(to top, #0891b2, #06b6d4);
  border-radius: 2px;
  transition: height 0.3s ease;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}
