/**
 * Paper Mario UI Kit - CSS Library
 * Inspired by Paper Mario (GameCube/NDS) menus from early 2000s
 * A reusable CSS library similar to mvp.css
 *
 * CORRECCIÓN 2026-03-19: Simplificar gradientes, mejorar contraste, asegurar mobile-first
 */

/* ============================================ FONTS - Cartoon/Retro Style ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&family=Nunito:wght@400;600;700;800;900&display=swap');

/* ============================================ CSS VARIABLES - Paper Mario Palette ============================================ */
:root {
  /* Primary Colors - Mario Red Theme */
  --pm-primary: #E74C3C;
  --pm-primary-light: #FF6B6B;
  --pm-primary-dark: #C0392B;
  --pm-primary-shadow: #922B21;

  /* Secondary Colors */
  --pm-secondary: #3498DB;
  --pm-secondary-light: #5DADE2;
  --pm-secondary-dark: #2980B9;
  --pm-secondary-shadow: #1A5276;

  /* Accent Colors */
  --pm-accent-yellow: #F1C40F;
  --pm-accent-green: #2ECC71;
  --pm-accent-orange: #E67E22;
  --pm-accent-purple: #9B59B6;
  --pm-accent-pink: #FF69B4;

  /* Paper/Cream Backgrounds - SIMPLIFICADOS */
  --pm-paper: #FFFEF7;
  --pm-paper-dark: #F5F5DC;
  --pm-parchment: #FAF0E6;

  /* Text Colors - Mejor contraste */
  --pm-text: #1A202C;
  --pm-text-light: #4A5568;
  --pm-text-muted: #6B7280;

  /* Special Effects */
  --pm-shadow: rgba(0, 0, 0, 0.15);
  --pm-shadow-heavy: rgba(0, 0, 0, 0.25);
  --pm-glow: rgba(255, 255, 255, 0.4);

  /* Border Radius - Rounded like Paper Mario */
  --pm-radius-sm: 8px;
  --pm-radius: 16px;
  --pm-radius-lg: 24px;
  --pm-radius-xl: 32px;
  --pm-radius-full: 9999px;

  /* Spacing */
  --pm-space-xs: 4px;
  --pm-space-sm: 8px;
  --pm-space: 16px;
  --pm-space-md: 24px;
  --pm-space-lg: 32px;
  --pm-space-xl: 48px;

  /* Transitions */
  --pm-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --pm-transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark Mode (opcional) */
@media (prefers-color-scheme: dark) {
  :root {
    --pm-paper: #1A202C;
    --pm-paper-dark: #2D3748;
    --pm-text: #FFFEF7;
    --pm-text-light: #E2E8F0;
    --pm-text-muted: #B8C5CE;
    --pm-shadow: rgba(0, 0, 0, 0.4);
  }
}

/* ============================================ BASE STYLES ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', 'Fredoka', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--pm-paper);
  min-height: 100vh;
  margin: 0;
  padding: var(--pm-space);
  color: var(--pm-text);
  line-height: 1.6;
}

/* SIMPLIFICACIÓN: Nubes sutiles */
body.pm-clouds {
  background: radial-gradient(ellipse at 20% 30%, rgba(255,255,255,0.3) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.2) 0%, transparent 40%);
  background-color: var(--pm-paper);
  background-attachment: fixed;
}

/* ============================================ TYPOGRAPHY ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Fredoka', sans-serif;
  color: var(--pm-primary-dark);
  margin: var(--pm-space-md) 0 var(--pm-space-sm);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
}

h3 {
  font-size: 1.5rem;
  font-weight: 500;
}

p {
  margin: var(--pm-space-sm) 0 var(--pm-space-md);
  max-width: 70ch;
}

/* ============================================ MOBILE-FIRST ============================================ */
/* Media queries para asegurar mobile-first */
@media (min-width: 768px) {
  /* Desktop: ajustes específicos */
  .container {
        max-width: 1200px;
        margin: 0 auto;
  }
}

@media (max-width: 767px) {
  /* Mobile: ajustes específicos */
  body {
        padding: var(--pm-space-sm);
  }
  
  h1 {
        font-size: 1.8rem;
  }
  
  h2 {
        font-size: 1.5rem;
  }
  
  .feedback-button {
        width: 100%;
        padding: var(--pm-space-sm);
  }
}

/* ============================================ COMPONENTS ============================================ */
.container {
  max-width: 100%;
  padding: 0 var(--pm-space);
}

/* Sistema de Feedback */
.feedback-container {
  background: var(--pm-paper-dark);
  border: 3px solid var(--pm-primary);
  border-radius: var(--pm-radius);
  padding: var(--pm-space-md);
  margin: var(--pm-space-lg) 0;
  box-shadow: var(--pm-shadow);
}

.feedback-button {
  background: var(--pm-primary);
  color: var(--pm-paper);
  border: none;
  border-radius: var(--pm-radius-sm);
  padding: var(--pm-space-sm) var(--pm-space);
  font-weight: 600;
  cursor: pointer;
  transition: var(--pm-transition);
}

.feedback-button:hover {
  background: var(--pm-primary-light);
  box-shadow: var(--pm-shadow);
}

.rating-display {
  background: var(--pm-secondary);
  color: var(--pm-paper);
  padding: var(--pm-space-sm);
  border-radius: var(--pm-radius-sm);
  margin-top: var(--pm-space-sm);
}

/* ============================================ UTILITY CLASSES ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--pm-text-muted); }
.mt-1 { margin-top: var(--pm-space); }
.mb-1 { margin-bottom: var(--pm-space); }
.p-1 { padding: var(--pm-space); }
