/* ==========================================================================
   Main CSS - Code of Dream
   Imports all component styles
   ========================================================================== */

/* ========== Base Styles ========== */
@import url('./variables.css');
@import url('./reset.css');
@import url('./utilities.css');

/* ========== Component Styles ========== */
@import url('./components/header.css');
@import url('./components/footer.css');
@import url('./components/hero.css');
@import url('./components/cards.css');
@import url('./components/buttons.css');
@import url('./components/sections.css');
@import url('./components/forms.css');

/* ========== Google Fonts ========== */
/* Note: These should be loaded in HTML for better performance */
/* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap'); */

/* ========== Additional Global Styles ========== */

/* Main content wrapper */
.main {
  min-height: 100vh;
  padding-top: 73px; /* Header height */
}

/* Page wrapper for flex layout */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-wrapper .main {
  flex: 1;
}

/* ========== Animations ========== */

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Fade in up animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade in down animation */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale in animation */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Slide in from left */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide in from right */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animation utility classes */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out both;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out both;
}

.animate-fade-in-down {
  animation: fadeInDown 0.6s ease-out both;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease-out both;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out both;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out both;
}

/* Animation delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }

/* ========== Scroll Reveal (JS controlled) ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--left {
  transform: translateX(-50px);
}

.reveal--left.reveal--visible {
  transform: translateX(0);
}

.reveal--right {
  transform: translateX(50px);
}

.reveal--right.reveal--visible {
  transform: translateX(0);
}

.reveal--scale {
  transform: scale(0.9);
}

.reveal--scale.reveal--visible {
  transform: scale(1);
}

/* ========== Loading States ========== */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

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

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

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

.skeleton--image {
  aspect-ratio: 16 / 9;
}

.skeleton--avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

/* ========== Tooltips ========== */
.tooltip {
  position: relative;
}

.tooltip__content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: var(--space-2) var(--space-3);
  background: var(--color-primary-700);
  color: var(--text-primary);
  font-size: var(--text-xs);
  white-space: nowrap;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: var(--z-tooltip);
}

.tooltip__content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--color-primary-700);
}

.tooltip:hover .tooltip__content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-12px);
}

/* ========== Badges ========== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  border-radius: var(--radius-full);
}

.badge--primary {
  background: rgba(139, 92, 246, 0.1);
  color: var(--color-accent-400);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.badge--secondary {
  background: rgba(20, 184, 166, 0.1);
  color: var(--color-secondary-400);
  border: 1px solid rgba(20, 184, 166, 0.2);
}

.badge--success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge--warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge--error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ========== Dividers ========== */
.divider {
  height: 1px;
  background: var(--border-color);
  margin: var(--space-8) 0;
}

.divider--gradient {
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border-color) 50%,
    transparent 100%
  );
}

.divider--accent {
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-accent-600) 50%,
    transparent 100%
  );
}

/* ========== Code Blocks ========== */
.code-block {
  background: var(--color-primary-800);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.code-inline {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(139, 92, 246, 0.1);
  color: var(--color-accent-400);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
}

/* ========== Lists ========== */
.list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.list-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

.list-item__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-accent-400);
  margin-top: 2px;
}

.list-item__icon--check {
  color: var(--color-success);
}

/* ========== Blockquote ========== */
.blockquote {
  position: relative;
  padding: var(--space-6);
  padding-left: var(--space-8);
  background: rgba(139, 92, 246, 0.05);
  border-left: 4px solid var(--color-accent-600);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.blockquote__text {
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.blockquote__author {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ========== Tables ========== */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background: rgba(255, 255, 255, 0.02);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.table td {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ========== Print Styles ========== */
@media print {
  .header,
  .footer,
  .btn,
  .fab {
    display: none !important;
  }
  
  .main {
    padding-top: 0;
  }
  
  body {
    background: white;
    color: black;
  }
}