/* OctoTracker - Deep Sea Theme Styles */

/* Floating Bubbles Animation */
@keyframes bubbleFloat {
  0% {
    transform: translateY(100vh) translateX(0px) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(50px) scale(1);
    opacity: 0;
  }
}

@keyframes bubbleFloatAlt {
  0% {
    transform: translateY(100vh) translateX(0px) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-100px) translateX(-30px) scale(1.2);
    opacity: 0;
  }
}

/* Swimming Animation (Active State) */
@keyframes octopusSwimming {
  0% { 
    transform: translateY(0px) rotate(0deg);
    box-shadow: 
      0 0 30px rgba(0, 255, 255, 0.3),
      0 0 60px rgba(0, 255, 255, 0.2),
      inset 0 0 30px rgba(0, 255, 255, 0.1);
  }
  25% { 
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 
      0 0 35px rgba(0, 255, 255, 0.4),
      0 0 70px rgba(0, 255, 255, 0.25),
      inset 0 0 35px rgba(0, 255, 255, 0.15);
  }
  50% { 
    transform: translateY(-4px) rotate(0deg);
    box-shadow: 
      0 0 40px rgba(0, 255, 255, 0.5),
      0 0 80px rgba(0, 255, 255, 0.3),
      inset 0 0 40px rgba(0, 255, 255, 0.2);
  }
  75% { 
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: 
      0 0 35px rgba(0, 255, 255, 0.4),
      0 0 70px rgba(0, 255, 255, 0.25),
      inset 0 0 35px rgba(0, 255, 255, 0.15);
  }
  100% { 
    transform: translateY(0px) rotate(0deg);
    box-shadow: 
      0 0 30px rgba(0, 255, 255, 0.3),
      0 0 60px rgba(0, 255, 255, 0.2),
      inset 0 0 30px rgba(0, 255, 255, 0.1);
  }
}

/* Resting Animation (Inactive State) */
@keyframes octopusResting {
  0% { 
    transform: translateY(0px);
    box-shadow: 
      0 4px 20px rgba(100, 150, 200, 0.2),
      inset 0 0 20px rgba(100, 150, 200, 0.1);
  }
  50% { 
    transform: translateY(-2px);
    box-shadow: 
      0 6px 25px rgba(100, 150, 200, 0.25),
      inset 0 0 25px rgba(100, 150, 200, 0.12);
  }
  100% { 
    transform: translateY(0px);
    box-shadow: 
      0 4px 20px rgba(100, 150, 200, 0.2),
      inset 0 0 20px rgba(100, 150, 200, 0.1);
  }
}

/* Tentacle Wave Animation */
@keyframes tentacleWave {
  0%, 100% { transform: rotate(-2deg) scaleX(1); }
  25% { transform: rotate(1deg) scaleX(1.02); }
  50% { transform: rotate(-1deg) scaleX(1); }
  75% { transform: rotate(2deg) scaleX(0.98); }
}

/* Background Bubbles */
.ocean-container {
  position: relative;
  overflow: hidden;
}

.ocean-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 200, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 255, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(100, 255, 200, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, 
      #0a1a2e 0%,
      #16213e 25%, 
      #0f3460 50%, 
      #533483 75%, 
      #16537e 100%
    );
  pointer-events: none;
  z-index: -2;
}

/* Floating Bubbles */
.bubble {
  position: fixed;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.bubble:nth-child(1) {
  width: 12px;
  height: 12px;
  left: 10%;
  animation: bubbleFloat 8s infinite linear;
  animation-delay: -2s;
}

.bubble:nth-child(2) {
  width: 8px;
  height: 8px;
  left: 20%;
  animation: bubbleFloatAlt 12s infinite linear;
  animation-delay: -5s;
}

.bubble:nth-child(3) {
  width: 16px;
  height: 16px;
  left: 35%;
  animation: bubbleFloat 10s infinite linear;
  animation-delay: -1s;
}

.bubble:nth-child(4) {
  width: 6px;
  height: 6px;
  left: 50%;
  animation: bubbleFloatAlt 7s infinite linear;
  animation-delay: -3s;
}

.bubble:nth-child(5) {
  width: 10px;
  height: 10px;
  left: 70%;
  animation: bubbleFloat 9s infinite linear;
  animation-delay: -4s;
}

.bubble:nth-child(6) {
  width: 14px;
  height: 14px;
  left: 85%;
  animation: bubbleFloatAlt 11s infinite linear;
  animation-delay: -6s;
}

/* Deep Sea Header */
.ocean-header {
  background: linear-gradient(135deg, 
    rgba(0, 50, 100, 0.9) 0%,
    rgba(0, 80, 120, 0.85) 50%,
    rgba(20, 100, 140, 0.9) 100%
  );
  border: 1px solid rgba(0, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 40px rgba(0, 255, 255, 0.1);
}

.ocean-title {
  color: #00ffff;
  text-shadow: 
    0 0 10px rgba(0, 255, 255, 0.5),
    0 0 20px rgba(0, 255, 255, 0.3),
    0 0 30px rgba(0, 255, 255, 0.1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Ocean Buttons */
.ocean-btn {
  background: linear-gradient(135deg, 
    rgba(0, 150, 200, 0.9) 0%,
    rgba(0, 100, 150, 0.95) 100%
  );
  border: 1px solid rgba(0, 255, 255, 0.4);
  color: #e0ffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.ocean-btn:hover {
  background: linear-gradient(135deg, 
    rgba(0, 200, 250, 0.95) 0%,
    rgba(0, 150, 200, 1) 100%
  );
  box-shadow: 
    0 6px 20px rgba(0, 255, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.ocean-btn-primary {
  background: linear-gradient(135deg, 
    rgba(100, 50, 200, 0.9) 0%,
    rgba(150, 100, 250, 0.95) 100%
  );
  border: 1px solid rgba(200, 150, 255, 0.4);
}

.ocean-btn-primary:hover {
  background: linear-gradient(135deg, 
    rgba(150, 100, 250, 0.95) 0%,
    rgba(200, 150, 255, 1) 100%
  );
  box-shadow: 
    0 6px 20px rgba(150, 100, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Project Cards - Octopus Themed */
.project-card {
  background: linear-gradient(135deg,
    rgba(30, 60, 100, 0.9) 0%,
    rgba(50, 80, 120, 0.85) 100%
  );
  border: 1px solid rgba(100, 200, 255, 0.3);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(8px);
  cursor: pointer;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: #b0e0ff;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(0, 255, 255, 0.2);
}

.project-card:hover::before {
  opacity: 1;
}

/* Swimming State (Active) */
.project-card.active {
  background: linear-gradient(135deg,
    rgba(0, 150, 150, 0.9) 0%,
    rgba(0, 200, 200, 0.85) 50%,
    rgba(50, 255, 200, 0.9) 100%
  );
  color: #003333;
  border-color: rgba(0, 255, 255, 0.8);
  animation: octopusSwimming 4s ease-in-out infinite;
  position: relative;
}

.project-card.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 255, 255, 0.1) 0%, transparent 60%);
  border-radius: 20px;
  animation: tentacleWave 2s ease-in-out infinite;
}

/* Resting State (Inactive) */
.project-card:not(.active) {
  animation: octopusResting 6s ease-in-out infinite;
}

.project-card:not(.active) .project-status {
  color: #87ceeb;
}

.project-name {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 8px;
  word-break: break-word;
  color: inherit;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  z-index: 2;
  position: relative;
}

.project-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.delete-btn, .reset-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.8;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.delete-btn:hover, .reset-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.delete-btn {
  background: linear-gradient(135deg, #ff4757, #ff3742);
  color: white;
  box-shadow: 0 2px 10px rgba(255, 71, 87, 0.3);
}

.reset-btn {
  background: linear-gradient(135deg, #ffa502, #ff9500);
  color: white;
  font-size: 16px;
  box-shadow: 0 2px 10px rgba(255, 165, 2, 0.3);
}

.project-time {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 16px 0;
  font-family: 'Courier New', monospace;
  color: inherit;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 2;
  position: relative;
}

.project-status {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.9;
  color: inherit;
  z-index: 2;
  position: relative;
}

.project-card.active .project-status {
  opacity: 1;
  color: #001a1a;
  font-weight: 600;
}

/* Ocean Total Time Panel */
.ocean-total-panel {
  background: linear-gradient(135deg, 
    rgba(20, 40, 80, 0.9) 0%,
    rgba(40, 60, 100, 0.85) 100%
  );
  border: 1px solid rgba(0, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ocean-total-time {
  color: #ffffff;
  text-shadow: 
    0 0 15px rgba(0, 255, 255, 0.8),
    0 0 30px rgba(0, 255, 255, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.5);
}

.ocean-copyright {
  color: rgba(176, 224, 255, 0.6);
  border-color: rgba(0, 255, 255, 0.2);
}

/* Ocean Modal */
.ocean-modal-content {
  background: linear-gradient(135deg, 
    rgba(20, 40, 80, 0.95) 0%,
    rgba(40, 60, 100, 0.9) 100%
  );
  border: 1px solid rgba(0, 255, 255, 0.4);
  backdrop-filter: blur(15px);
  color: #b0e0ff;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(0, 255, 255, 0.2);
}

.ocean-modal-content h2 {
  color: #00ffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.ocean-input {
  background: rgba(0, 50, 100, 0.6);
  border: 1px solid rgba(0, 255, 255, 0.4);
  color: #b0e0ff;
  backdrop-filter: blur(5px);
}

.ocean-input:focus {
  border-color: #00ffff;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
  outline: none;
}

.ocean-input::placeholder {
  color: rgba(176, 224, 255, 0.6);
}

/* Empty State */
.empty-ocean {
  color: rgba(176, 224, 255, 0.8);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.empty-ocean h3 {
  color: #00ffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
  .ocean-header {
    padding: 15px;
  }
  
  .ocean-header > div {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .ocean-header > div > div {
    flex-direction: column;
    width: 100%;
  }
  
  .ocean-btn {
    width: 100%;
  }
  
  .ocean-title {
    font-size: 1.6rem;
  }
  
  .project-card {
    padding: 20px;
  }
  
  .project-time {
    font-size: 1.8rem;
  }

  .bubble {
    display: none; /* Hide bubbles on mobile for performance */
  }
}