/**
 * Houtini Components CSS
 * Interactive components and special effects
 */

/* ====================================
   CLEAN CSS TYPEWRITER EFFECT
   ==================================== */

.houtini-prompt-container {
  background: var(--houtini-glass-bg-light);
  backdrop-filter: var(--houtini-glass-blur);
  -webkit-backdrop-filter: var(--houtini-glass-blur);
  border: 2px solid var(--houtini-cyan);
  border-radius: 12px;
  padding: 24px;
  margin: 32px auto;
  max-width: 700px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--houtini-shadow-glow);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
  font-size: 1.1rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.houtini-typewriter {
  display: inline-block;
  width: 100%;
  text-align: center;
}

.houtini-typewriter-text {
  color: var(--houtini-cyan);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid var(--houtini-cyan);
  letter-spacing: 0.05em;
  display: inline-block;
  
  /* Multi-phrase animation that cycles through different text */
  animation: 
    houtini-multi-phrase 16s infinite,
    houtini-cursor-blink 0.75s step-end infinite;
}

/* Multi-phrase typewriter animation */
@keyframes houtini-multi-phrase {
  /* Phase 1: WordPress Plugin (0-25%) */
  0%, 20% {
    width: 0;
  }
  5%, 15% {
    width: 100%;
  }
  
  /* Phase 2: Security Analysis (25-50%) */
  25%, 45% {
    width: 0;
  }
  30%, 40% {
    width: 100%;
  }
  
  /* Phase 3: Unit Tests (50-75%) */
  50%, 70% {
    width: 0;
  }
  55%, 65% {
    width: 100%;
  }
  
  /* Phase 4: React Components (75-100%) */
  75%, 95% {
    width: 0;
  }
  80%, 90% {
    width: 100%;
  }
  
  100% {
    width: 0;
  }
}

/* Cursor blink animation */
@keyframes houtini-cursor-blink {
  from, to { 
    border-color: var(--houtini-cyan);
  }
  50% { 
    border-color: transparent;
  }
}

/* Phrase content changes - we'll use JavaScript for this to be more flexible */
.houtini-typewriter-text[data-phrase="1"]::before {
  content: "Houtini, let's build a WordPress plugin";
}

.houtini-typewriter-text[data-phrase="2"]::before {
  content: "Houtini, analyze this codebase for security";
}

.houtini-typewriter-text[data-phrase="3"]::before {
  content: "Houtini, generate comprehensive unit tests";
}

.houtini-typewriter-text[data-phrase="4"]::before {
  content: "Houtini, create responsive React components";
}

/* ====================================
   BUTTON ENHANCEMENTS
   ==================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--houtini-gradient-primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.35);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--houtini-cyan);
  border-color: var(--houtini-cyan);
  box-shadow: 0 0 15px rgba(0, 204, 255, 0.2);
}

.btn-secondary:hover {
  background: var(--houtini-gradient-primary);
  color: white;
  border-color: var(--houtini-primary);
  transform: translateY(-2px);
}

/* ====================================
   CARD COMPONENTS
   ==================================== */

.card {
  background: var(--houtini-glass-bg-light);
  backdrop-filter: var(--houtini-glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  box-shadow: var(--houtini-shadow-lg);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--houtini-shadow-xl);
  border-color: var(--houtini-cyan);
}

.card-title {
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card-text {
  color: var(--bs-secondary-color);
  line-height: 1.6;
}

/* Category Badges */
.badge {
  background: var(--houtini-gradient-primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

@media (max-width: 768px) {
  .houtini-prompt-container {
    padding: 16px;
    font-size: 1rem;
    margin: 24px auto;
  }
  
  .houtini-typewriter-text {
    letter-spacing: 0.02em;
  }
  
  /* Adjust animation speed for mobile */
  .houtini-typewriter-text {
    animation: 
      houtini-typing 3s steps(35, end),
      houtini-blink-caret 0.75s step-end infinite;
  }
}

@media (max-width: 480px) {
  .houtini-prompt-container {
    font-size: 0.9rem;
  }
  
  .houtini-typewriter-text {
    animation: 
      houtini-typing 2.5s steps(30, end),
      houtini-blink-caret 0.75s step-end infinite;
  }
}
