/* ================================================
   Modern Design System for Dekoboko Expo
   Professional UI/UX Implementation
   ================================================ */

/* ================================================
   Design Tokens
   ================================================ */
:root {
  /* Color System - Sophisticated Palette */
  --color-primary: #6366F1;      /* Indigo-500 */
  --color-primary-dark: #4F46E5; /* Indigo-600 */
  --color-secondary: #EC4899;    /* Pink-500 */
  --color-accent: #F59E0B;       /* Amber-500 */
  --color-success: #10B981;      /* Emerald-500 */
  --color-danger: #EF4444;       /* Red-500 */
  
  /* Gradient System */
  --gradient-primary: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
  --gradient-hero: linear-gradient(180deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  --gradient-aurora: linear-gradient(45deg, #667EEA, #764BA2, #F093FB, #F5576C);
  
  /* Neutral Colors */
  --color-dark: #0F172A;
  --color-dark-secondary: #1E293B;
  --color-dark-tertiary: #334155;
  --color-light: #F8FAFC;
  --color-light-secondary: #F1F5F9;
  --color-text-primary: #F8FAFC;
  --color-text-secondary: #CBD5E1;
  --color-text-muted: #94A3B8;
  
  /* Spacing System (8px base) */
  --space-xs: 0.5rem;   /* 8px */
  --space-sm: 1rem;     /* 16px */
  --space-md: 1.5rem;   /* 24px */
  --space-lg: 2rem;     /* 32px */
  --space-xl: 3rem;     /* 48px */
  --space-2xl: 4rem;    /* 64px */
  --space-3xl: 6rem;    /* 96px */
  
  /* Typography Scale */
  --font-xs: clamp(0.75rem, 1vw, 0.875rem);
  --font-sm: clamp(0.875rem, 1.2vw, 1rem);
  --font-base: clamp(1rem, 1.5vw, 1.125rem);
  --font-lg: clamp(1.125rem, 2vw, 1.25rem);
  --font-xl: clamp(1.25rem, 2.5vw, 1.5rem);
  --font-2xl: clamp(1.5rem, 3vw, 2rem);
  --font-3xl: clamp(2rem, 4vw, 3rem);
  --font-4xl: clamp(2.5rem, 5vw, 4rem);
  --font-5xl: clamp(3rem, 6vw, 5rem);
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-black: 900;
  
  /* Line Heights */
  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;
  --leading-loose: 2;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows - Neumorphic & Glass */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
  --shadow-2xl: 0 25px 50px rgba(0,0,0,0.25);
  --shadow-glow: 0 0 50px rgba(99, 102, 241, 0.3);
  --shadow-inner: inset 0 2px 4px rgba(0,0,0,0.06);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Blur Effects */
  --blur-sm: 4px;
  --blur-md: 12px;
  --blur-lg: 24px;
  --blur-xl: 40px;
}

/* ================================================
   Global Styles
   ================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--color-dark);
  color: var(--color-text-primary);
  line-height: var(--leading-normal);
  overflow-x: hidden;
  position: relative;
}

/* ================================================
   Utility Classes
   ================================================ */

/* Glass Morphism */
.glass {
  background: var(--gradient-glass);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Glow Effects */
.glow {
  box-shadow: var(--shadow-glow);
  transition: box-shadow var(--transition-base);
}

.glow:hover {
  box-shadow: 0 0 80px rgba(99, 102, 241, 0.5);
}

/* Text Gradients */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-aurora {
  background: var(--gradient-aurora);
  background-size: 200% 200%;
  animation: aurora 8s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-hero);
  z-index: -2;
}

.animated-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-20px, -20px) rotate(1deg); }
  66% { transform: translate(20px, -10px) rotate(-1deg); }
}

/* Particle Effect Container */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: drift linear infinite;
}

@keyframes drift {
  from {
    transform: translateY(0px);
    opacity: 1;
  }
  to {
    transform: translateY(-100vh);
    opacity: 0;
  }
}

/* ================================================
   Components
   ================================================ */

/* Modern Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-glass {
  background: var(--gradient-glass);
  backdrop-filter: blur(var(--blur-md));
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Modern Cards */
.card {
  background: var(--gradient-glass);
  backdrop-filter: blur(var(--blur-md));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Modern Input Fields */
.input-group {
  position: relative;
  margin-bottom: var(--space-lg);
}

.input-field {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  color: white;
  font-size: var(--font-base);
  transition: all var(--transition-base);
}

.input-field:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-label {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  transition: all var(--transition-base);
  pointer-events: none;
}

.input-field:focus + .input-label,
.input-field:not(:placeholder-shown) + .input-label {
  top: -10px;
  left: var(--space-sm);
  font-size: var(--font-sm);
  background: var(--color-dark);
  padding: 0 var(--space-xs);
  color: var(--color-primary);
}

/* Progress Indicators */
.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 4;
}

.progress-ring-value {
  fill: transparent;
  stroke: url(#gradient);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: var(--circumference);
  stroke-dashoffset: var(--offset);
  transition: stroke-dashoffset var(--transition-slow);
}

/* Floating Action Button */
.fab {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-spring);
  z-index: 1000;
}

.fab:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.5);
}

/* Loading Animations */
.loader {
  width: 48px;
  height: 48px;
  position: relative;
}

.loader-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loader-ring:nth-child(2) {
  animation-delay: 0.15s;
  border-top-color: var(--color-secondary);
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
}

.loader-ring:nth-child(3) {
  animation-delay: 0.3s;
  border-top-color: var(--color-accent);
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Grid System */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Smooth Scroll Indicator */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 9999;
  transition: transform 0.1s linear;
}

/* Performance Optimizations */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
}

.lazy-load {
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.lazy-load.loaded {
  opacity: 1;
}