/* =============================================================================
   CALLIOPE AI PLATFORM - COMPREHENSIVE SERVICE CATALOG STYLES
   Enterprise-grade AI development platform with professional design
   ============================================================================= */

/* Base Theme & Variables */
:root {
  --calliope-primary: #0AF0CE;
  --calliope-secondary: #3FF1EF;
  --calliope-accent: #00E5B8;
  --calliope-dark: #0B1120;
  --calliope-card: rgba(22, 35, 69, 0.9);
  --calliope-border: rgba(10, 240, 206, 0.3);
  --calliope-text: #D6FCF4;
  --calliope-text-muted: #E6E9EE;
  
  /* Enhanced color palette for service catalog */
  --calliope-success: #00E676;
  --calliope-warning: #FFB74D;
  --calliope-error: #E57373;
  --calliope-info: #64B5F6;
  
  /* Card variants */
  --calliope-card-hover: rgba(22, 35, 69, 0.95);
  --calliope-card-active: rgba(10, 240, 206, 0.1);
  
  /* Service status colors */
  --status-available: #00E676;
  --status-coming-soon: #FFB74D;
  --status-maintenance: #E57373;
  
  /* Typography */
  --font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =============================================================================
   BASE LAYOUT & BACKGROUND
   ============================================================================= */

/* Background & Layout */
body {
  background: #0B1120;
  color: #D6FCF4;
  min-height: 100vh;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(10, 240, 206, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(63, 241, 239, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(75, 58, 176, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* Ensure all content is above the background overlay */
.navbar, .container, .container-fluid, main, footer {
  position: relative;
  z-index: 2;
}

/* =============================================================================
   BRAND ELEMENTS & ANIMATIONS
   ============================================================================= */

.calliope-brand-gradient {
  background: linear-gradient(45deg, #0AF0CE, #3FF1EF, #00E5B8);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.calliope-card {
  background: linear-gradient(145deg, rgba(22, 35, 69, 0.9), rgba(31, 51, 93, 0.9));
  border: 2px solid rgba(10, 240, 206, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.calliope-card:hover {
  border-color: #0AF0CE;
  box-shadow: 0 8px 32px rgba(10, 240, 206, 0.3);
  transform: translateY(-2px);
}

/* =============================================================================
   ACTIVE ENVIRONMENTS / SERVER LIST STYLES
   ============================================================================= */

.running-servers-card .card-header {
  background: linear-gradient(145deg, rgba(10, 240, 206, 0.1), rgba(63, 241, 239, 0.1));
  border-bottom: 2px solid rgba(10, 240, 206, 0.3);
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.running {
  background: #00E5B8;
  box-shadow: 0 0 8px rgba(0, 229, 184, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.environment-count {
  font-size: 1rem;
  font-weight: 400;
  color: #A9A8E5;
  opacity: 0.8;
}

.new-server-btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  min-width: auto;
}

.new-server-btn .btn-icon {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.limit-reached {
  color: #FF6B6B;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 6px;
}

.servers-table {
  color: #D6FCF4;
}

.servers-table th {
  color: #0AF0CE;
  border-color: rgba(10, 240, 206, 0.3);
  font-weight: 600;
}

.servers-table td {
  border-color: rgba(10, 240, 206, 0.1);
}

.server-link {
  color: #D6FCF4;
  text-decoration: none;
  font-weight: 500;
}

.server-link:hover {
  color: #0AF0CE;
}

.server-instance-name {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.85rem;
  color: #A9A8E5;
  background: rgba(169, 168, 229, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.running {
  background: rgba(0, 229, 184, 0.2);
  color: #00E5B8;
  border: 1px solid rgba(0, 229, 184, 0.5);
}

.status-badge.pending {
  background: rgba(255, 215, 0, 0.2);
  color: #FFD700;
  border: 1px solid rgba(255, 215, 0, 0.5);
}

.status-badge.stopped {
  background: rgba(169, 168, 229, 0.2);
  color: #A9A8E5;
  border: 1px solid rgba(169, 168, 229, 0.5);
}

.btn-danger {
  background: rgba(75, 58, 176, 0.8);
  border-color: #4B3AB0;
  color: #FFFFFF;
}

.btn-danger:hover {
  background: #4B3AB0;
  border-color: #5A4DC7;
}

.btn-success {
  background: rgba(0, 229, 184, 0.8);
  border-color: #00E5B8;
  color: #162345;
}

.btn-success:hover {
  background: #00E5B8;
  border-color: #0AF0CE;
}

.btn-primary {
  background: linear-gradient(135deg, #0AF0CE, #3FF1EF);
  border-color: #0AF0CE;
  color: #162345;
  font-weight: 600;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3FF1EF, #0AF0CE);
  border-color: #3FF1EF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 240, 206, 0.3);
}

.no-servers-message {
  color: #E6E9EE;
  opacity: 0.7;
  font-size: 1.1rem;
}

/* =============================================================================
   INSTANCE SIZE GUIDE STYLES
   ============================================================================= */

.resource-guide {
  background: linear-gradient(145deg, rgba(10, 240, 206, 0.05), rgba(63, 241, 239, 0.05));
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(10, 240, 206, 0.2);
  margin-top: 2rem;
}

.resource-guide h3 {
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

.resource-card {
  background: rgba(22, 35, 69, 0.6);
  border: 1px solid rgba(10, 240, 206, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
  transition: all 0.3s ease;
}

.resource-card:hover {
  border-color: rgba(10, 240, 206, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 240, 206, 0.15);
}

.resource-card h5 {
  color: #0AF0CE;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  text-align: center;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(10, 240, 206, 0.3);
}

.resource-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.resource-card li {
  color: #E6E9EE;
  font-size: 0.9rem;
  line-height: 1.8;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(10, 240, 206, 0.1);
  transition: all 0.2s ease;
}

.resource-card li:last-child {
  border-bottom: none;
}

.resource-card li:hover {
  color: #D6FCF4;
  padding-left: 0.5rem;
  background: rgba(10, 240, 206, 0.05);
  border-radius: 4px;
}

.resource-card strong {
  color: #D6FCF4;
  font-weight: 600;
}

.resource-guide-note {
  color: #E6E9EE;
  font-size: 1rem;
  opacity: 0.9;
  background: rgba(10, 240, 206, 0.08);
  padding: 1rem 2rem;
  border-radius: 12px;
  border: 1px solid rgba(10, 240, 206, 0.2);
  margin: 0;
  line-height: 1.6;
}

.resource-guide-note strong {
  color: #0AF0CE;
  font-weight: 600;
}

/* Different colors for different resource types */
.resource-card:nth-child(1) h5 {
  color: #0AF0CE;  /* General Purpose - Primary brand */
}

.resource-card:nth-child(2) h5 {
  color: #3FF1EF;  /* Compute Optimized - Secondary brand */
}

.resource-card:nth-child(3) h5 {
  color: #A9A8E5;  /* Memory Optimized - Purple */
}

.resource-card:nth-child(4) h5 {
  color: #FFD700;  /* GPU Accelerated - Gold */
}

.resource-card:nth-child(2) {
  border-color: rgba(63, 241, 239, 0.2);
}

.resource-card:nth-child(2):hover {
  border-color: rgba(63, 241, 239, 0.4);
  box-shadow: 0 8px 24px rgba(63, 241, 239, 0.15);
}

.resource-card:nth-child(3) {
  border-color: rgba(169, 168, 229, 0.2);
}

.resource-card:nth-child(3):hover {
  border-color: rgba(169, 168, 229, 0.4);
  box-shadow: 0 8px 24px rgba(169, 168, 229, 0.15);
}

.resource-card:nth-child(4) {
  border-color: rgba(255, 215, 0, 0.2);
}

.resource-card:nth-child(4):hover {
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.15);
}

/* Responsive design for resource guide */
@media (max-width: 768px) {
  .resource-guide {
    padding: 1rem;
  }
  
  .resource-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .resource-guide-note {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
  }
}

.calliope-btn {
  background: linear-gradient(135deg, #0AF0CE, #3FF1EF);
  color: #162345;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.calliope-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 240, 206, 0.4);
  color: #162345;
  text-decoration: none;
}

.bg-body-tertiary {
  background-color: rgba(6, 11, 21, 0.8) !important;
  backdrop-filter: blur(10px);
}

/* =============================================================================
   NAVBAR & HEADER STYLING
   ============================================================================= */

/* Modern navbar with gradient background */
.navbar {
  background: linear-gradient(135deg, rgba(11, 17, 32, 0.95), rgba(22, 35, 69, 0.95));
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(10, 240, 206, 0.2);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  z-index: 1050 !important; /* Bootstrap navbar z-index + extra for safety */
  position: relative;
}

/* Logo styling */
.navbar-brand {
  display: flex;
  align-items: center;
  color: #D6FCF4 !important;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  color: var(--calliope-primary) !important;
  transform: scale(1.02);
}

.navbar-logo,
.jpy-logo {
  max-height: 40px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(10, 240, 206, 0.3));
  transition: all 0.3s ease;
}

.navbar-logo:hover,
.jpy-logo:hover {
  filter: drop-shadow(0 0 15px rgba(10, 240, 206, 0.6));
  transform: scale(1.05);
}

/* Navigation links */
.navbar-nav .nav-link {
  color: #E6E9EE !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: var(--calliope-primary) !important;
  background: rgba(10, 240, 206, 0.1);
  transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
  color: var(--calliope-primary) !important;
  background: rgba(10, 240, 206, 0.15);
}

/* Dropdown styling */
.dropdown-menu {
  background: var(--calliope-card);
  border: 1px solid var(--calliope-border);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  z-index: 9999 !important; /* Ensure dropdown appears above all content */
  position: absolute !important;
}

.dropdown-item {
  color: var(--calliope-text);
  padding: 8px 16px;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: var(--calliope-card-hover);
  color: var(--calliope-primary);
  transform: translateX(4px);
}

/* User info styling */
.navbar-text {
  color: var(--calliope-primary) !important;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(10, 240, 206, 0.3);
}

/* Logout button styling */
.btn-outline-light {
  border-color: var(--calliope-primary) !important;
  color: var(--calliope-primary) !important;
  background: transparent;
  font-weight: 600;
  padding: 0.375rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-outline-light:hover {
  background: var(--calliope-primary) !important;
  color: #162345 !important;
  border-color: var(--calliope-primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 240, 206, 0.3);
}

/* Mobile hamburger menu */
.navbar-toggler {
  border-color: rgba(10, 240, 206, 0.3) !important;
  padding: 0.375rem 0.75rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(10, 240, 206, 0.25);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2810, 240, 206, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Container fluid adjustments */
.navbar .container-fluid {
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .navbar .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .navbar-collapse {
    background: linear-gradient(145deg, rgba(22, 35, 69, 0.98), rgba(31, 51, 93, 0.98));
    border-radius: 12px;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(10, 240, 206, 0.2);
  }
  
  .navbar-nav {
    text-align: center;
  }
  
  .navbar-nav .nav-link {
    margin: 0.25rem 0;
  }
}

/* Footer styling to match header */
.calliope-footer {
  background: linear-gradient(135deg, rgba(6, 11, 21, 0.95), rgba(22, 35, 69, 0.95)) !important;
  backdrop-filter: blur(20px);
  color: #E6E9EE !important;
  font-size: 0.9rem;
  margin-top: 3rem;
  border-top: 2px solid rgba(10, 240, 206, 0.3);
  padding: 2rem 0 !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

/* =============================================================================
   HERO SECTION
   ============================================================================= */

.hero-section {
  padding: 3rem 0;
  background: linear-gradient(135deg, rgba(10, 240, 206, 0.1) 0%, rgba(63, 241, 239, 0.1) 50%, rgba(0, 229, 184, 0.1) 100%);
  border-radius: 24px;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(10, 240, 206, 0.2) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(63, 241, 239, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.hero-logo {
  max-height: 80px;
  filter: drop-shadow(0 0 20px rgba(10, 240, 206, 0.5));
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.4rem;
  color: #E6E9EE;
  opacity: 0.9;
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #0AF0CE;
  text-shadow: 0 0 10px rgba(10, 240, 206, 0.5);
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: #E6E9EE;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

/* =============================================================================
   ENVIRONMENT CARDS & LAUNCHER
   ============================================================================= */

.launcher-card {
  position: relative;
  overflow: hidden;
}

.launcher-icon-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(10, 240, 206, 0.2), rgba(63, 241, 239, 0.2));
  border-radius: 50%;
  border: 2px solid rgba(10, 240, 206, 0.3);
}

.launcher-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 10px rgba(10, 240, 206, 0.5));
}

.card-title {
  color: #D6FCF4;
  font-weight: 600;
}

.card-description {
  color: #E6E9EE;
  opacity: 0.9;
  line-height: 1.5;
}

.environment-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.env-option {
  background: rgba(10, 240, 206, 0.1);
  color: #0AF0CE;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(10, 240, 206, 0.3);
  font-size: 0.9rem;
  font-weight: 500;
}

.featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(45deg, #FFD700, #FFA500);
  color: #162345;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: badgeShine 2s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
  z-index: 10;
}

@keyframes badgeShine {
  0%, 100% { box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4); }
  50% { box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6); }
}

/* =============================================================================
   EMBEDDED SPAWN FORM
   ============================================================================= */

.embedded-spawn-form {
  max-width: 1200px;
  margin: 0 auto;
}

.quick-launch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.environment-card {
  display: block;
  background: linear-gradient(145deg, rgba(22, 35, 69, 0.4), rgba(31, 51, 93, 0.4));
  border: 2px solid rgba(10, 240, 206, 0.2);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  backdrop-filter: blur(10px);
  margin: 0;
  height: 100%;
  min-height: 160px;
}

.environment-card:hover {
  border-color: rgba(10, 240, 206, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 240, 206, 0.2);
}

.environment-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.environment-card input[type="radio"]:checked + .card-content {
  border-color: #0AF0CE;
  background: linear-gradient(145deg, rgba(10, 240, 206, 0.15), rgba(63, 241, 239, 0.15));
}

.environment-card input[type="radio"]:checked ~ .card-content .env-icon {
  color: #0AF0CE;
  text-shadow: 0 0 10px rgba(10, 240, 206, 0.5);
  transform: scale(1.1);
}

.environment-card.selected {
  border-color: #0AF0CE !important;
  box-shadow: 0 0 20px rgba(10, 240, 206, 0.4) !important;
  transform: translateY(-2px) !important;
}

.card-content {
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.3s ease;
  text-align: center;
}

.env-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  display: block;
}

.environment-card h4 {
  color: #D6FCF4;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.environment-card p {
  color: #E6E9EE;
  opacity: 0.8;
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

.featured-card {
  border-color: rgba(10, 240, 206, 0.4);
}

.featured-card .card-content {
  background: linear-gradient(145deg, rgba(10, 240, 206, 0.08), rgba(63, 241, 239, 0.08));
}

.launch-controls {
  background: linear-gradient(145deg, rgba(22, 35, 69, 0.6), rgba(31, 51, 93, 0.6));
  border: 2px solid rgba(10, 240, 206, 0.3);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  max-width: 500px;
  margin: 0 auto;
}

.selected-environment {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.selection-label {
  color: #E6E9EE;
  font-weight: 500;
}

.selected-env-name {
  color: #0AF0CE;
  font-weight: 600;
  font-size: 1.1rem;
  text-shadow: 0 0 10px rgba(10, 240, 206, 0.3);
}

.launch-button {
  font-size: 1.2rem;
  padding: 16px 32px;
  min-width: 220px;
  box-shadow: 0 6px 20px rgba(10, 240, 206, 0.3);
  transition: all 0.3s ease;
}

.launch-button:hover {
  box-shadow: 0 8px 28px rgba(10, 240, 206, 0.5);
  transform: translateY(-3px);
}

.launch-button .btn-icon {
  margin-right: 0.5rem;
  font-size: 1.3rem;
}

.advanced-options-link {
  color: #A9A8E5;
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.advanced-options-link:hover {
  color: #0AF0CE;
  opacity: 1;
  text-decoration: underline;
}

/* =============================================================================
   ENHANCED LOADING OVERLAY WITH PROGRESS MONITORING
   ============================================================================= */

/* Loading Overlay Container */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 17, 32, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Loading Content Card */
.loading-content {
  background: var(--calliope-card);
  border: 1px solid var(--calliope-border);
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(10, 240, 206, 0.1);
  max-width: 450px;
  width: 90%;
  position: relative;
  overflow: hidden;
}

/* Animated background effect */
.loading-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(10, 240, 206, 0.05),
    transparent
  );
  animation: shimmer 2s infinite;
}

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

/* Loading Spinner */
.loading-spinner {
  margin-bottom: 25px;
  position: relative;
  z-index: 1;
}

.loading-spinner .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 3px;
  border-color: var(--calliope-primary);
  border-right-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Loading Text */
.loading-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--calliope-text);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
}

/* Progress Container */
.progress-container {
  margin-top: 25px;
  position: relative;
  z-index: 1;
}

/* Enhanced Progress Bar */
.progress-container .progress {
  height: 8px;
  background: rgba(10, 240, 206, 0.1);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--calliope-border);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-container .progress-bar {
  background: linear-gradient(
    90deg,
    var(--calliope-primary),
    var(--calliope-secondary),
    var(--calliope-primary)
  );
  background-size: 200% 100%;
  animation: progressShine 2s ease-in-out infinite;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

@keyframes progressShine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Progress Text */
.progress-text {
  font-size: 14px;
  color: var(--calliope-text-muted);
  margin-top: 12px;
  opacity: 0.8;
  font-weight: 500;
}

/* Progress indicator for launch */
.launch-progress {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(10, 240, 206, 0.3);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(10, 240, 206, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0AF0CE, #3FF1EF);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 4px;
}

.progress-text {
  color: #E6E9EE;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0.8;
}

/* Hidden state */
.hidden {
  display: none !important;
}

/* Form loading state */
.embedded-spawn-form.loading {
  opacity: 0.7;
  pointer-events: none;
}

.embedded-spawn-form.loading .launch-button {
  background: linear-gradient(135deg, #666, #888);
  cursor: not-allowed;
}

.embedded-spawn-form.loading .launch-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translate(-50%, -50%);
}

/* Enhanced Error Message Styling */
.error-message {
  background: var(--calliope-card);
  border: 1px solid var(--calliope-error);
  color: var(--calliope-text);
  box-shadow: 
    0 10px 25px rgba(229, 115, 115, 0.3),
    0 0 20px rgba(229, 115, 115, 0.1);
}

.error-message .btn-close {
  filter: invert(1);
  opacity: 0.8;
}

.error-message .btn-close:hover {
  opacity: 1;
}

/* =============================================================================
   RUNNING SERVERS & STATUS
   ============================================================================= */

.running-servers-card .card-header {
  background: linear-gradient(145deg, rgba(10, 240, 206, 0.1), rgba(63, 241, 239, 0.1));
  border-bottom: 2px solid rgba(10, 240, 206, 0.3);
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.running {
  background: #00E5B8;
  box-shadow: 0 0 8px rgba(0, 229, 184, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.servers-table {
  color: #D6FCF4;
}

.servers-table th {
  color: #0AF0CE;
  border-color: rgba(10, 240, 206, 0.3);
  font-weight: 600;
}

.servers-table td {
  border-color: rgba(10, 240, 206, 0.1);
}

.server-link {
  color: #D6FCF4;
  text-decoration: none;
  font-weight: 500;
}

.server-link:hover {
  color: #0AF0CE;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.running {
  background: rgba(0, 229, 184, 0.2);
  color: #00E5B8;
  border: 1px solid rgba(0, 229, 184, 0.5);
}

.status-badge.pending {
  background: rgba(255, 215, 0, 0.2);
  color: #FFD700;
  border: 1px solid rgba(255, 215, 0, 0.5);
}

.status-badge.stopped {
  background: rgba(169, 168, 229, 0.2);
  color: #A9A8E5;
  border: 1px solid rgba(169, 168, 229, 0.5);
}

/* Named Servers UI Styles */
.environment-count {
  font-size: 1rem;
  font-weight: 400;
  color: #A9A8E5;
  opacity: 0.8;
}

.new-server-btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  min-width: auto;
}

.new-server-btn .btn-icon {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.limit-reached {
  color: #FF6B6B;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 6px;
}

.server-instance-name {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.85rem;
  color: #A9A8E5;
  background: rgba(169, 168, 229, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.no-servers-message {
  color: #E6E9EE;
  opacity: 0.7;
  font-size: 1.1rem;
}

/* =============================================================================
   BUTTON STYLING
   ============================================================================= */

.btn-danger {
  background: rgba(75, 58, 176, 0.8);
  border-color: #4B3AB0;
  color: #FFFFFF;
}

.btn-danger:hover {
  background: #4B3AB0;
  border-color: #5A4DC7;
}

.btn-success {
  background: rgba(0, 229, 184, 0.8);
  border-color: #00E5B8;
  color: #162345;
}

.btn-success:hover {
  background: #00E5B8;
  border-color: #0AF0CE;
}

.btn-primary {
  background: linear-gradient(135deg, #0AF0CE, #3FF1EF);
  border-color: #0AF0CE;
  color: #162345;
  font-weight: 600;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3FF1EF, #0AF0CE);
  border-color: #3FF1EF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 240, 206, 0.3);
}

/* =============================================================================
   COMPREHENSIVE TOOL CATALOG
   ============================================================================= */

.catalog-section {
  background: linear-gradient(145deg, rgba(22, 35, 69, 0.3), rgba(31, 51, 93, 0.3));
  border-radius: 24px;
  padding: 3rem 2rem;
  margin-top: 3rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(10, 240, 206, 0.1);
}

.catalog-category {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(10, 240, 206, 0.1);
}

.catalog-category:last-of-type {
  border-bottom: none;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  font-size: 1.8rem;
  color: #0AF0CE;
  font-weight: 700;
}

.category-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(10, 240, 206, 0.5));
}

.category-subtitle {
  font-size: 1rem;
  color: #E6E9EE;
  opacity: 0.8;
  font-weight: 400;
  margin-left: auto;
}

.tool-card {
  background: linear-gradient(145deg, rgba(22, 35, 69, 0.6), rgba(31, 51, 93, 0.6));
  border: 2px solid rgba(10, 240, 206, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
}

.tool-card:hover {
  border-color: rgba(10, 240, 206, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 240, 206, 0.2);
}

.tool-card h4 {
  color: #D6FCF4;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.tool-description {
  color: #E6E9EE;
  opacity: 0.9;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.instance-matrix {
  background: rgba(10, 240, 206, 0.05);
  border-radius: 12px;
  padding: 1rem;
  margin-top: auto;
}

.matrix-header {
  color: #0AF0CE;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.8rem;
}

.matrix-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.size-badge {
  background: rgba(10, 240, 206, 0.1);
  color: #0AF0CE;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(10, 240, 206, 0.2);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.size-badge:hover {
  background: rgba(10, 240, 206, 0.2);
  border-color: rgba(10, 240, 206, 0.4);
}

.size-badge.gpu {
  background: rgba(255, 215, 0, 0.1);
  color: #FFD700;
  border-color: rgba(255, 215, 0, 0.3);
}

.size-badge.gpu:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.5);
}

.coming-soon {
  opacity: 0.6;
  position: relative;
  overflow: hidden;
}

.coming-soon-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(45deg, #A9A8E5, #4B3AB0);
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.license-note {
  margin-top: 0.8rem;
  padding: 0.5rem;
  background: rgba(255, 165, 0, 0.1);
  color: #FFA500;
  border-radius: 6px;
  font-size: 0.85rem;
  text-align: center;
  border: 1px solid rgba(255, 165, 0, 0.3);
}

.tool-card.byol {
  border-color: rgba(169, 168, 229, 0.3);
}

.tool-card.byol:hover {
  border-color: rgba(169, 168, 229, 0.5);
  box-shadow: 0 8px 24px rgba(169, 168, 229, 0.2);
}

/* =============================================================================
   INSTANCE TYPE CARDS & RESOURCE GUIDE
   ============================================================================= */

.instance-type-card {
  background: linear-gradient(145deg, rgba(22, 35, 69, 0.6), rgba(31, 51, 93, 0.6));
  border: 2px solid rgba(10, 240, 206, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.instance-type-card:hover {
  border-color: rgba(10, 240, 206, 0.5);
  transform: translateY(-2px);
}

.instance-type-card h4 {
  color: #0AF0CE;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.instance-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.instance-item {
  background: rgba(10, 240, 206, 0.05);
  color: #E6E9EE;
  padding: 0.5rem;
  border-radius: 6px;
  border-left: 3px solid rgba(10, 240, 206, 0.5);
  font-size: 0.85rem;
  text-align: left;
}

.compute-optimized {
  border-color: rgba(63, 241, 239, 0.3);
}

.compute-optimized h4 {
  color: #3FF1EF;
}

.compute-optimized .instance-item {
  border-left-color: rgba(63, 241, 239, 0.5);
  background: rgba(63, 241, 239, 0.05);
}

.memory-optimized {
  border-color: rgba(169, 168, 229, 0.3);
}

.memory-optimized h4 {
  color: #A9A8E5;
}

.memory-optimized .instance-item {
  border-left-color: rgba(169, 168, 229, 0.5);
  background: rgba(169, 168, 229, 0.05);
}

.gpu-optimized {
  border-color: rgba(0, 229, 184, 0.3);
}

.gpu-optimized h4 {
  color: #00E5B8;
}

.gpu-optimized .instance-item {
  border-left-color: rgba(0, 229, 184, 0.5);
  background: rgba(0, 229, 184, 0.05);
}

/* Resource Guide */
.resource-guide {
  background: linear-gradient(145deg, rgba(10, 240, 206, 0.05), rgba(63, 241, 239, 0.05));
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(10, 240, 206, 0.2);
}

.resource-guide h3 {
  color: #0AF0CE;
  font-weight: 700;
}

.resource-card {
  background: rgba(22, 35, 69, 0.6);
  border: 1px solid rgba(10, 240, 206, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
}

.resource-card h5 {
  color: #0AF0CE;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.resource-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.resource-card li {
  color: #E6E9EE;
  font-size: 0.9rem;
  line-height: 1.8;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(10, 240, 206, 0.1);
}

.resource-card li:last-child {
  border-bottom: none;
}

.resource-card strong {
  color: #D6FCF4;
  font-weight: 600;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 992px) {
  .quick-launch-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .catalog-section {
    padding: 2rem 1rem;
  }
  
  .category-header {
    font-size: 1.5rem;
    flex-wrap: wrap;
  }
  
  .category-subtitle {
    font-size: 0.9rem;
    width: 100%;
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

@media (max-width: 768px) {
  .quick-launch-grid {
    grid-template-columns: 1fr;
  }
  
  .launch-controls {
    padding: 1.5rem;
  }
  
  .launch-button {
    font-size: 1.1rem;
    padding: 14px 28px;
    min-width: 200px;
  }
  
  .tool-card {
    padding: 1rem;
  }
  
  .resource-guide {
    padding: 1rem;
  }
  
  .resource-card {
    padding: 1rem;
  }
} 

/* Instance Size Selector Styling */
.instance-size-selector {
  margin-top: 12px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.instance-size-selector .size-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 4px;
}

.instance-size-selector .size-select {
  width: 100%;
  padding: 4px 8px;
  font-size: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  color: #333;
  cursor: pointer;
}

.instance-size-selector .size-select:focus {
  outline: none;
  border-color: var(--calliope-primary, #007bff);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.instance-size-selector .size-hint {
  margin-top: 4px;
}

.instance-size-selector .size-description {
  font-size: 0.7rem;
  color: #888;
  font-style: italic;
}

/* Enhanced environment card styling for size selector */
.environment-card {
  transition: all 0.3s ease;
  position: relative;
}

.environment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.environment-card input[type="radio"]:checked + .card-content {
  border-color: var(--calliope-primary, #007bff);
}

.environment-card input[type="radio"]:checked + .card-content .instance-size-selector {
  background: rgba(0, 123, 255, 0.1);
  border-color: var(--calliope-primary, #007bff);
}

/* Selected size display styling */
.selected-size-display {
  font-weight: 500;
  color: #666;
  margin-left: 8px;
}

#selected-size-display {
  color: var(--calliope-primary, #007bff);
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .instance-size-selector .size-select {
    font-size: 0.7rem;
  }
  
  .instance-size-selector .size-label {
    font-size: 0.75rem;
  }
} 

/* Instance size badges in running servers table */
.instance-size {
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.8em;
  font-weight: 500;
  display: inline-block;
  min-width: 100px;
  text-align: center;
  white-space: nowrap;
}

.instance-size.docker {
  background-color: #e1f5fe;
  color: #0277bd;
  border: 1px solid #b3e5fc;
}

.instance-size.medium {
  background-color: #f3e5f5;
  color: #7b1fa2;
  border: 1px solid #ce93d8;
}

.instance-size.large {
  background-color: #fff3e0;
  color: #f57c00;
  border: 1px solid #ffcc02;
}

.instance-size.xlarge {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.instance-size.m-medium {
  background-color: #e8f5e8;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.instance-size.c-medium {
  background-color: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

.instance-size.small {
  background-color: #f1f8e9;
  color: #558b2f;
  border: 1px solid #c5e1a5;
}

.instance-size.unknown {
  background-color: #f5f5f5;
  color: #616161;
  border: 1px solid #e0e0e0;
}

/* =============================================================================
   DELETE BUTTON STYLES
   ============================================================================= */

.delete-server {
  background-color: #dc3545;
  border-color: #dc3545;
  color: white;
  transition: all 0.2s ease;
}

.delete-server:hover {
  background-color: #c82333;
  border-color: #bd2130;
  color: white;
  transform: scale(1.05);
}

.delete-server:active {
  transform: scale(0.98);
}

.delete-icon {
  font-style: normal;
}

/* =============================================================================
   AUTO-REFRESH INDICATOR
   ============================================================================= */

.auto-refresh-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(10, 240, 206, 0.1);
  border: 1px solid rgba(10, 240, 206, 0.3);
  border-radius: 20px;
  padding: 5px 15px;
  font-size: 12px;
  color: var(--calliope-primary);
  display: none;
  z-index: 1000;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.auto-refresh-indicator.active {
  display: block;
} 