/* ===== CSS MOTION GALLERY - RESPONSIVE STYLES ===== */

/* Mobile First Approach */

/* Extra Small Devices (phones, 320px and up) */
@media (max-width: 480px) {
  :root {
    --section-padding: 3rem;
    --container-padding: 1rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
    line-height: 1.1;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .section-title {
    font-family: var(--font-section);
    font-size: 2rem;
  }
  
  .section-subtitle {
    font-size: 0.9rem;
  }
  
  .animation-card {
    padding: 1.5rem;
  }
  
  .card-preview {
    height: 120px;
  }
  
  .floating-card {
    display: none;
  }
  
  .nav-container {
    padding: 0 1rem;
  }
  
  .nav-logo .logo-text {
    font-size: 1.25rem;
  }
  
  .button-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .text-demos {
    gap: 2rem;
  }
  
  .loader-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .playground-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .playground-demo {
    padding: 2rem;
    min-height: 300px;
  }
  
  .control-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  .button-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .loader-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991px) {
  .nav-links {
    display: flex;
  }
  
  .nav-toggle {
    display: none;
  }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .button-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .text-demos {
    grid-template-columns: 1fr;
  }
  
  .loader-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .floating-card {
    display: block;
    width: 160px;
    height: 100px;
    padding: 1rem;
  }
  
  .card-icon {
    font-size: 1.5rem;
  }
  
  .card-text {
    font-size: 0.8rem;
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199px) {
  .hero-title {
    font-size: 5rem;
  }
  
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .button-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .text-demos {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .playground-content {
    grid-template-columns: 1fr 300px;
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .hero-title {
    font-size: 6rem;
  }
  
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .button-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .text-demos {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .loader-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  
  .playground-content {
    grid-template-columns: 1fr 350px;
  }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1600px;
  }
  
  .hero-title {
    font-size: 7rem;
  }
  
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Mobile Navigation */
@media (max-width: 767px) {
  .nav-links {
    position: fixed;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-100%);
    transition: transform 0.3s var(--ease-smooth);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-links.active {
    transform: translateY(0);
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .nav-link {
    font-family: var(--font-logo);
    font-size: 1.1rem;
    text-align: center;
    padding: 0.5rem 0;
  }
}

/* Button Lab Responsive */
.button-lab {
  padding: var(--section-padding) 0;
  background: var(--bg-tertiary);
}

.button-grid {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

.button-demo {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s var(--ease-smooth);
}

.button-demo:hover {
  border-color: var(--accent-blue);
  transform: translateY(-5px);
}

/* Text Showcase Responsive */
.text-showcase {
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
}

.text-demos {
  display: grid;
  gap: 3rem;
  margin-top: 3rem;
}

.text-demo-item {
  text-align: center;
  padding: 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: all 0.3s var(--ease-smooth);
}

.text-demo-item:hover {
  border-color: var(--accent-purple);
  transform: translateY(-5px);
}

.demo-title {
  font-family: var(--font-paragraph);
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Loader Collection Responsive */
.loader-collection {
  padding: var(--section-padding) 0;
  background: var(--bg-quaternary);
}

.loader-grid {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

.loader-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: all 0.3s var(--ease-smooth);
}

.loader-item:hover {
  border-color: var(--accent-coral);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 122, 89, 0.2);
}

.loader-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.loader-title {
  font-family: var(--font-paragraph);
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Feature Panel Responsive */
.feature-panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-primary), var(--bg-tertiary));
  position: relative;
  overflow: hidden;
}

.panel-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.panel-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 70%, var(--accent-teal) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, var(--accent-coral) 0%, transparent 50%);
  opacity: 0.1;
}

.panel-mesh {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
  background-size: 100px 100px;
  animation: meshMove 30s linear infinite;
}

@keyframes meshMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(100px, 100px); }
}

.panel-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  text-align: center;
}

.panel-title {
  font-family: var(--font-section);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2rem;
  overflow: hidden;
}

.title-word {
  display: inline-block;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: wordReveal 1s var(--ease-smooth) forwards;
  transform: translateY(100%);
}

.title-word:nth-child(2) { animation-delay: 0.2s; }
.title-word:nth-child(3) { animation-delay: 0.4s; }

@keyframes wordReveal {
  to { transform: translateY(0); }
}

.panel-description {
  font-family: var(--font-paragraph);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

.panel-visual {
  margin-top: 4rem;
}

.visual-layers {
  position: relative;
  width: 300px;
  height: 200px;
  margin: 0 auto;
}

.layer {
  position: absolute;
  border-radius: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}

.layer-1 {
  width: 100%;
  height: 100%;
  animation: layerFloat 6s ease-in-out infinite;
}

.layer-2 {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  background: linear-gradient(135deg, rgba(77, 166, 255, 0.1), rgba(139, 92, 246, 0.1));
  animation: layerFloat 6s ease-in-out infinite reverse;
  animation-delay: -2s;
}

.layer-3 {
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(34, 211, 238, 0.1));
  animation: layerFloat 6s ease-in-out infinite;
  animation-delay: -4s;
}

@keyframes layerFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

/* Playground Responsive */
.playground {
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
}

.playground-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 3rem;
  align-items: start;
}

.playground-demo {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 4rem 3rem;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.playground-demo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 122, 89, 0.02), rgba(45, 149, 150, 0.02));
  pointer-events: none;
}

.demo-object {
  width: 100px;
  height: 100px;
  position: relative;
  animation: objectPulse 2s ease-in-out infinite;
}

.object-core {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-coral), var(--accent-teal));
  border-radius: 50%;
  position: relative;
  z-index: 2;
}

.object-glow {
  position: absolute;
  top: -20px;
  left: -20px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, var(--accent-coral) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0.3;
  animation: glowPulse 2s ease-in-out infinite;
  z-index: 1;
}

@keyframes objectPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

.playground-controls {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
}

.control-group {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-group label {
  font-family: var(--font-paragraph);
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.control-group input[type="range"] {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--accent-coral), var(--accent-teal));
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(255, 122, 89, 0.3);
}

.control-group input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--accent-coral), var(--accent-teal));
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 10px rgba(255, 122, 89, 0.3);
}

.control-value {
  align-self: flex-end;
  font-size: 0.9rem;
  color: var(--accent-coral);
  font-weight: 600;
  min-width: 40px;
  text-align: right;
}

.control-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.control-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.control-btn:hover {
  border-color: var(--accent-coral);
  background: rgba(255, 122, 89, 0.1);
  transform: translateY(-2px);
}

/* Footer Responsive */
.footer {
  padding: var(--section-padding) 0 2rem;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.footer-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.footer-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, var(--accent-coral), transparent),
    radial-gradient(2px 2px at 40px 70px, var(--accent-teal), transparent);
  background-repeat: repeat;
  background-size: 100px 100px;
  animation: particleFloat 20s linear infinite;
  opacity: 0.1;
}

.footer-content {
  display: grid;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .footer-logo {
  font-family: var(--font-logo);
  font-size: 1.5rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent-coral), var(--accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.footer-tagline {
  font-family: var(--font-paragraph);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links {
  display: grid;
  gap: 2rem;
}

.link-group h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.link-group a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.link-group a:hover {
  color: var(--accent-blue);
}

.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
  margin-bottom: 2rem;
}

.footer-copyright {
  font-family: var(--font-paragraph);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Responsive Footer */
@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .footer-content {
    grid-template-columns: 2fr 1fr;
  }
  
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .cursor-dot {
    width: 2px;
    height: 2px;
  }
  
  .loading-bar {
    height: 1px;
  }
  
  .nav {
    border-bottom-width: 0.5px;
  }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 600px) {
  .hero {
    min-height: 100vh;
  }
  
  .hero-title {
    font-size: clamp(2rem, 6vw, 4rem);
  }
  
  .floating-card {
    display: none;
  }
  
  .scroll-indicator {
    bottom: 1rem;
  }
}

/* Print Styles */
@media print {
  .cursor,
  .loading-screen,
  .nav,
  .scroll-indicator,
  .floating-card {
    display: none !important;
  }
  
  .hero-background,
  .panel-background,
  .footer-background {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .section-title,
  .hero-title,
  .panel-title {
    color: black !important;
  }
}