/* ============================================
   THISPLAYBOOK.APP - CSS DESIGN SYSTEM
   Premium Glassmorphism Dark Theme
   ============================================ */

:root {
  /* Primary Colors */
  --cyan-bright: #00f2fe;
  --cyan-medium: #4facfe;
  --cyan-dark: #2c8fb3;
  
  /* Secondary Colors */
  --purple-bright: #667eea;
  --purple-medium: #764ba2;
  --purple-dark: #5a3a7a;
  
  /* Accent Colors */
  --pink-bright: #f093fb;
  --pink-medium: #f5576c;
  
  /* Build-Specific Colors */
  --build-explore: #f093fb;
  --build-anchor: #4facfe;
  --build-connect: #43e97b;
  --build-shift: #fa709a;
  --build-move: #30cfd0;
  --build-build: #a8edea;
  --build-rest: #ff9a9e;
  
  /* Neutral Colors */
  --black: #0a0a0a;
  --dark-gray: #1a1a1a;
  --medium-gray: #2a2a2a;
  --light-gray: #888888;
  --white: #ffffff;
  
  /* Semantic Colors */
  --success: #43e97b;
  --warning: #fee140;
  --error: #f5576c;
  --info: #4facfe;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-dark: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  
  /* Glass Effects */
  --glass-bg: rgba(26, 26, 26, 0.7);
  --glass-bg-light: rgba(42, 42, 42, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-hover: rgba(0, 242, 254, 0.3);
  --glow-cyan: rgba(0, 242, 254, 0.3);
  --glow-purple: rgba(102, 126, 234, 0.3);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  
  /* Font Weights */
  --weight-light: 300;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-black: 900;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.37);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(0, 242, 254, 0.3);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-spring: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--cyan-bright);
  text-decoration: none;
  transition: var(--transition-base);
}

a:hover {
  color: var(--cyan-medium);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================
   GLASSMORPHISM COMPONENTS
   ============================================ */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: var(--transition-spring);
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-glow), var(--shadow-md);
  transform: translateY(-5px);
}

.glass-card-static {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ============================================
   BUTTON STYLES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  transition: var(--transition-spring);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 10px 30px var(--glow-cyan);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 242, 254, 0.5);
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 20px rgba(0, 242, 254, 0.4);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: var(--white);
  box-shadow: 0 10px 30px var(--glow-purple);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--white);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-glow);
}

.btn-large {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
}

.btn-small {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   TYPOGRAPHY UTILITIES
   ============================================ */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted {
  color: var(--light-gray);
}

.text-center {
  text-align: center;
}

.heading-xl {
  font-size: var(--text-5xl);
  font-weight: var(--weight-bold);
  line-height: 1.2;
}

.heading-lg {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  line-height: 1.25;
}

.heading-md {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  line-height: 1.3;
}

.heading-sm {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.input {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: var(--text-base);
  transition: var(--transition-base);
}

.input:focus {
  outline: none;
  border-color: var(--cyan-medium);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
}

.input::placeholder {
  color: var(--light-gray);
}

.textarea {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: transparent;
  border: 2px solid var(--medium-gray);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: var(--text-base);
  resize: vertical;
  min-height: 120px;
  transition: var(--transition-base);
}

.textarea:focus {
  outline: none;
  border-color: var(--cyan-medium);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-narrow {
  max-width: 800px;
}

.container-wide {
  max-width: 1400px;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid {
  display: grid;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   SPACING UTILITIES
   ============================================ */
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.p-10 { padding: var(--space-10); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 242, 254, 0.6);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

@keyframes typing {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-right {
  animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-scale-in {
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-glow-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Staggered animations */
.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  
  .heading-xl { font-size: var(--text-4xl); }
  .heading-lg { font-size: var(--text-3xl); }
}

@media (max-width: 768px) {
  .container { padding: 0 var(--space-4); }
  
  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .heading-xl { font-size: var(--text-3xl); }
  .heading-lg { font-size: var(--text-2xl); }
  
  .hide-mobile { display: none; }
}

@media (max-width: 480px) {
  html { font-size: 14px; }
  
  .btn-large {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
  }
}
