/* ============================================
   ARDUINO CODE LAB - PROFESSIONAL & MODERN
   Design: Clean, Professional, Student-Friendly
============================================ */

:root {
  --primary: #293761;
  --primary-light: #3d5282;
  --primary-dark: #1e2847;
  --accent: #4ECDC4;
  --accent-2: #FFE66D;
  --accent-3: #A8E6CF;
  --accent-4: #FF8B94;
  --accent-5: #C7CEEA;
  --success: #52C41A;
  --warning: #FFB800;
  --danger: #FF4757;
  --purple: #A29BFE;
  --orange: #FF7675;
  --pink: #FD79A8;
  --blue: #74B9FF;
  --green: #00B894;
  --yellow: #FDCB6E;
  --cyan: #4ECDC4;
  --white: #FFFFFF;
  --black: #2D3436;
  --gray-50: #FDFDFD;
  --gray-100: #F8F9FA;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-600: #6C757D;
  --gray-800: #343A40;

  --shadow-sm: 0 4px 12px rgba(41, 55, 97, 0.15);
  --shadow-md: 0 8px 24px rgba(41, 55, 97, 0.2);
  --shadow-lg: 0 12px 36px rgba(41, 55, 97, 0.25);
  --shadow-xl: 0 16px 48px rgba(41, 55, 97, 0.3);
  --shadow-rainbow: 0 8px 32px rgba(41, 55, 97, 0.3), 0 0 0 1px rgba(78, 205, 196, 0.2), 0 0 0 2px rgba(255, 230, 109, 0.1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #F8F9FC;
  color: var(--gray-800);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Subtle Background Pattern */
.animated-blocks-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.03;
}

.block {
  position: absolute;
  border-radius: 8px;
  background: var(--primary);
}

.block-1 {
  width: 120px;
  height: 120px;
  top: 10%;
  left: 5%;
  transform: rotate(45deg);
}

.block-2 {
  width: 100px;
  height: 100px;
  top: 30%;
  right: 10%;
  transform: rotate(-30deg);
}

.block-3 {
  width: 80px;
  height: 80px;
  top: 60%;
  left: 8%;
  transform: rotate(60deg);
}

.block-4 {
  width: 90px;
  height: 90px;
  bottom: 20%;
  right: 15%;
  transform: rotate(-45deg);
}

.block-5 {
  width: 70px;
  height: 70px;
  top: 40%;
  left: 50%;
  transform: rotate(30deg);
}

.block-6 {
  width: 110px;
  height: 110px;
  bottom: 30%;
  left: 20%;
  transform: rotate(-60deg);
}

.block-7 {
  width: 85px;
  height: 85px;
  top: 70%;
  right: 25%;
  transform: rotate(45deg);
}

.block-8 {
  width: 95px;
  height: 95px;
  top: 15%;
  left: 70%;
  transform: rotate(-30deg);
}

.block-9 {
  width: 75px;
  height: 75px;
  bottom: 15%;
  right: 5%;
  transform: rotate(60deg);
}

.block-10 {
  width: 105px;
  height: 105px;
  top: 50%;
  left: 30%;
  transform: rotate(-45deg);
}

.block-11 {
  width: 88px;
  height: 88px;
  bottom: 40%;
  left: 60%;
  transform: rotate(30deg);
}

.block-12 {
  width: 92px;
  height: 92px;
  top: 80%;
  right: 40%;
  transform: rotate(-60deg);
}

/* Remove floating shapes */
.floating-shapes {
  display: none;
}

/* ============================================
   PREMIUM ANIMATED BACKGROUND
============================================ */
.premium-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Floating Orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: orbFloat 15s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(42, 56, 99, 0.15) 0%, transparent 70%);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(78, 130, 255, 0.2) 0%, transparent 70%);
  top: 50%;
  right: -5%;
  animation-delay: -5s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(138, 155, 196, 0.2) 0%, transparent 70%);
  bottom: -10%;
  left: 30%;
  animation-delay: -10s;
}

.orb-4 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(100, 140, 230, 0.2) 0%, transparent 70%);
  top: 30%;
  left: 50%;
  animation-delay: -7s;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(30px, -30px) scale(1.05);
  }

  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }

  75% {
    transform: translate(20px, 10px) scale(1.02);
  }
}

/* Grid Overlay */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(41, 55, 97, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41, 55, 97, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(60px, 60px);
  }
}

/* Gradient Mesh */
.gradient-mesh {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(42, 56, 99, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(78, 130, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 80%, rgba(138, 155, 196, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 60% 30%, rgba(100, 140, 230, 0.08) 0%, transparent 40%);
}

/* Circuit Lines */
.circuit-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

.circuit-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawCircuit 8s linear infinite;
}

.circuit-path.delay-1 {
  animation-delay: -2.5s;
}

.circuit-path.delay-2 {
  animation-delay: -5s;
}

@keyframes drawCircuit {
  0% {
    stroke-dashoffset: 1000;
  }

  50% {
    stroke-dashoffset: 0;
  }

  100% {
    stroke-dashoffset: -1000;
  }
}

/* Floating Particles */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  border-radius: 50%;
  animation: particleFloat 10s ease-in-out infinite;
}

.particle:nth-child(1) {
  left: 10%;
  top: 20%;
  animation-delay: 0s;
}

.particle:nth-child(2) {
  left: 30%;
  top: 70%;
  animation-delay: -2s;
}

.particle:nth-child(3) {
  left: 50%;
  top: 30%;
  animation-delay: -4s;
}

.particle:nth-child(4) {
  left: 70%;
  top: 60%;
  animation-delay: -6s;
}

.particle:nth-child(5) {
  left: 85%;
  top: 25%;
  animation-delay: -8s;
}

.particle:nth-child(6) {
  left: 20%;
  top: 85%;
  animation-delay: -1s;
}

.particle:nth-child(7) {
  left: 60%;
  top: 15%;
  animation-delay: -3s;
}

.particle:nth-child(8) {
  left: 90%;
  top: 80%;
  animation-delay: -5s;
}

@keyframes particleFloat {

  0%,
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0.6;
  }

  25% {
    transform: translateY(-30px) translateX(10px);
    opacity: 1;
  }

  50% {
    transform: translateY(-10px) translateX(-15px);
    opacity: 0.8;
  }

  75% {
    transform: translateY(-25px) translateX(5px);
    opacity: 1;
  }
}

/* ============================================
   PROFESSIONAL HEADER - Brand Colors Only
============================================ */
.pro-header {
  position: relative;
  background: linear-gradient(135deg, #1A2340 0%, #2A3863 100%);
  border-radius: 20px;
  margin-bottom: 32px;
  box-shadow: 0 8px 32px rgba(42, 56, 99, 0.3);
  overflow: hidden;
}

.header-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 40%);
  pointer-events: none;
}

.header-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 48px;
  gap: 48px;
}

.header-left {
  flex: 1;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.brand-logo {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 14px 18px;
}

.logo-icon {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 24px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
}

.bracket {
  color: rgba(255, 255, 255, 0.8);
}

.logo-symbol {
  color: white;
  font-size: 20px;
}

.brand-text {
  flex: 1;
}

.brand-title {
  font-size: 32px;
  font-weight: 800;
  color: white;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
}

.brand-tagline {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-weight: 400;
}

.header-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 18px;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.stat-pill:hover {
  background: rgba(255, 255, 255, 0.15);
}

.stat-text {
  font-size: 13px;
  font-weight: 600;
  color: white;
}

.header-right {
  flex-shrink: 0;
}

.code-preview {
  transform: perspective(1000px) rotateY(-5deg);
  transition: transform 0.3s ease;
}

.code-preview:hover {
  transform: perspective(1000px) rotateY(0deg);
}

.code-window {
  background: #0D1117;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  width: 320px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-window-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.code-content {
  padding: 16px 20px;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.7;
}

.code-line {
  color: rgba(255, 255, 255, 0.7);
}

.keyword {
  color: #7C8FD4;
}

.func {
  color: #8AB4F8;
}

.num {
  color: #B8C0E0;
}

/* Section Header Modern */
.section-header-modern {
  text-align: center;
  margin-bottom: 32px;
}

.section-title-modern {
  font-size: 26px;
  font-weight: 700;
  color: #2A3863;
  margin: 0 0 10px 0;
}

.section-desc {
  font-size: 15px;
  color: #666;
  margin: 0;
}

/* ============================================
   RESPONSIVE HEADER
============================================ */
@media (max-width: 900px) {
  .header-content {
    flex-direction: column;
    padding: 32px;
    text-align: center;
    gap: 24px;
  }

  .brand-section {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
  }

  .header-stats {
    justify-content: center;
  }

  .header-right {
    display: none;
  }

  .brand-title {
    font-size: 26px;
  }
}

@media (max-width: 600px) {
  .pro-header {
    border-radius: 16px;
  }

  .header-content {
    padding: 24px 20px;
  }

  .brand-title {
    font-size: 22px;
  }

  .stat-pill {
    padding: 8px 14px;
  }

  .stat-text {
    font-size: 12px;
  }

  .section-title-modern {
    font-size: 22px;
  }
}

.header-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 50px;
  gap: 40px;
}

.header-left {
  flex: 1;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.brand-logo {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 16px 20px;
  backdrop-filter: blur(10px);
}

.logo-icon {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 24px;
}

.bracket {
  color: #4ECDC4;
  font-weight: 800;
  font-family: 'Courier New', monospace;
  animation: bracketPulse 2s ease-in-out infinite;
}

@keyframes bracketPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.logo-symbol {
  font-size: 32px;
  filter: drop-shadow(0 0 15px rgba(255, 200, 0, 0.8));
  animation: symbolGlow 2s ease-in-out infinite alternate;
}

@keyframes symbolGlow {
  0% {
    filter: drop-shadow(0 0 15px rgba(255, 200, 0, 0.6));
    transform: scale(1);
  }

  100% {
    filter: drop-shadow(0 0 25px rgba(255, 200, 0, 1));
    transform: scale(1.1);
  }
}

.brand-text {
  flex: 1;
}

.brand-title {
  font-size: 36px;
  font-weight: 900;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #FFFFFF 0%, #4ECDC4 50%, #FFFFFF 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

.brand-tagline {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-weight: 500;
}

.header-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(78, 205, 196, 0.3);
  padding: 12px 20px;
  border-radius: 50px;
  backdrop-filter: blur(5px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: default;
}

.stat-pill:hover {
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.25), rgba(255, 255, 255, 0.1));
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 30px rgba(78, 205, 196, 0.3);
  border-color: rgba(78, 205, 196, 0.5);
}

.stat-icon {
  font-size: 18px;
}

.stat-text {
  font-size: 13px;
  font-weight: 600;
  color: white;
}

.header-right {
  flex-shrink: 0;
}

.code-preview {
  transform: perspective(1200px) rotateY(-8deg) rotateX(2deg);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: codeFloat 4s ease-in-out infinite;
}

@keyframes codeFloat {

  0%,
  100% {
    transform: perspective(1200px) rotateY(-8deg) rotateX(2deg) translateY(0);
  }

  50% {
    transform: perspective(1200px) rotateY(-8deg) rotateX(2deg) translateY(-10px);
  }
}

.code-preview:hover {
  transform: perspective(1200px) rotateY(0deg) rotateX(0deg) scale(1.03);
}

.code-window {
  background: linear-gradient(180deg, #1E1E2E 0%, #141420 100%);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(78, 205, 196, 0.2) inset,
    0 0 40px rgba(78, 205, 196, 0.1);
  width: 360px;
}

.code-window-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: #2D2D3A;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red {
  background: #FF5F56;
}

.dot.yellow {
  background: #FFBD2E;
}

.dot.green {
  background: #27C93F;
}

.code-content {
  padding: 16px 18px;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
}

.code-line {
  color: #ABB2BF;
}

.keyword {
  color: #C678DD;
}

.func {
  color: #61AFEF;
}

.num {
  color: #D19A66;
}

.code-line.typing::after {
  content: '|';
  color: #4ECDC4;
  animation: blink 1s step-end infinite;
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

/* Section Header Modern */
.section-header-modern {
  text-align: center;
  margin-bottom: 32px;
}

.section-line {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #2A3863, #4ECDC4);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.section-title-modern {
  font-size: 28px;
  font-weight: 800;
  color: #2A3863;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.section-icon {
  font-size: 32px;
}

.section-desc {
  font-size: 15px;
  color: #666;
  margin: 0;
}

/* ============================================
   RESPONSIVE HEADER
============================================ */
@media (max-width: 900px) {
  .header-content {
    flex-direction: column;
    padding: 30px;
    text-align: center;
  }

  .brand-section {
    flex-direction: column;
    gap: 16px;
  }

  .header-stats {
    justify-content: center;
  }

  .header-right {
    display: none;
    /* Hide code preview on tablet */
  }

  .brand-title {
    font-size: 26px;
  }
}

@media (max-width: 600px) {
  .pro-header {
    border-radius: 16px;
    margin-bottom: 24px;
  }

  .header-content {
    padding: 24px 20px;
  }

  .brand-logo {
    padding: 12px 16px;
  }

  .logo-icon {
    font-size: 20px;
  }

  .logo-symbol {
    font-size: 24px;
  }

  .brand-title {
    font-size: 22px;
  }

  .brand-tagline {
    font-size: 13px;
  }

  .header-stats {
    gap: 8px;
  }

  .stat-pill {
    padding: 8px 12px;
  }

  .stat-text {
    font-size: 12px;
  }

  .section-title-modern {
    font-size: 22px;
    flex-direction: column;
    gap: 8px;
  }

  .section-desc {
    font-size: 14px;
  }
}

/* ============================================
   PREMIUM HERO SECTION (Legacy - keeping for reference)
============================================ */
.hero-section {
  position: relative;
  padding: 60px 40px;
  background: linear-gradient(135deg, #1A2340 0%, #2A3863 40%, #3D4E7A 100%);
  border-radius: 24px;
  margin-bottom: 48px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(42, 56, 99, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  animation: heroGlow 4s ease-in-out infinite;
}

@keyframes heroGlow {

  0%,
  100% {
    box-shadow:
      0 20px 60px rgba(42, 56, 99, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transform: translateY(0);
  }

  50% {
    box-shadow:
      0 25px 70px rgba(42, 56, 99, 0.5),
      0 0 0 2px rgba(255, 255, 255, 0.15) inset;
    transform: translateY(-3px);
  }
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content-wrapper {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-badge-container {
  margin-bottom: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.badge-icon {
  font-size: 18px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
  animation: iconGlow 2s ease-in-out infinite;
}

@keyframes iconGlow {

  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
    transform: scale(1);
  }

  50% {
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 1)) drop-shadow(0 0 25px rgba(78, 130, 255, 0.6));
    transform: scale(1.05);
  }
}

.badge-new {
  background: linear-gradient(135deg, #4E82FF, #2A3863);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(78, 130, 255, 0.5);
  animation: newBadgePop 2s ease-in-out infinite;
}

@keyframes newBadgePop {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.animate-pulse {
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  }

  50% {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(42, 56, 99, 0.4);
  }
}

.hero-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.title-icon {
  font-size: 56px;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
  animation: iconFloat 4s ease-in-out infinite;
}

@keyframes iconFloat {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-8px) rotate(5deg);
  }
}

.title-gradient {
  font-size: 52px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 0%, #E8EFFF 30%, #ffffff 50%, #D0DFFF 70%, #ffffff 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  letter-spacing: -1px;
  animation: titleShine 3s ease-in-out infinite;
  filter: drop-shadow(0 2px 10px rgba(42, 56, 99, 0.3));
}

@keyframes titleShine {

  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.15);
  }
}

.hero-subtitle {
  font-size: 22px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.feature-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.feature-chip:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.chip-icon {
  font-size: 18px;
}

/* Hero Decorative Elements */
.hero-decor {
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  width: 300px;
  height: 300px;
  pointer-events: none;
}

.decor-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  animation: ringPulse 4s ease-in-out infinite;
}

.ring-1 {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  animation-delay: 0s;
}

.ring-2 {
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
  animation-delay: -1.3s;
  border-color: rgba(78, 205, 196, 0.2);
}

.ring-3 {
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
  animation-delay: -2.6s;
  border-color: rgba(255, 230, 109, 0.15);
}

@keyframes ringPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* ============================================
   PREMIUM SECTION HEADER
============================================ */
.section-header-premium {
  margin-bottom: 36px;
  text-align: center;
}

.section-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}

.section-icon-animated {
  font-size: 40px;
  animation: rocketBounce 2s ease-in-out infinite;
}

@keyframes rocketBounce {

  0%,
  100% {
    transform: translateY(0) rotate(-10deg);
  }

  50% {
    transform: translateY(-8px) rotate(10deg);
  }
}

.section-title-text {
  font-size: 34px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  margin: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 16px;
  color: var(--gray-600);
  font-weight: 500;
}

/* ============================================
   TASK LIST SCREEN
============================================ */
#task-list-screen {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  animation: fadeIn 0.6s ease-out;
  position: relative;
  z-index: 1;
}

/* Hero Header */
.hero-header {
  text-align: center;
  padding: 48px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 48px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.hero-header::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}

.hero-header h1 {
  font-size: 48px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero-header p {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}

.hero-sparkles {
  display: none;
}

/* Progress Stats */
.progress-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.stat-card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 500;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  font-size: 32px;
}

/* Task Cards Grid */
.task-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.task-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.task-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.task-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.task-card:hover::before {
  transform: scaleX(1);
}

.task-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.task-icon {
  font-size: 56px;
  line-height: 1;
}

.task-difficulty-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.difficulty-beginner {
  background: #E6F7E6;
  color: #389E0D;
}

.difficulty-intermediate {
  background: #FFF7E6;
  color: #D46B08;
}

.difficulty-advanced {
  background: #FFF1F0;
  color: #CF1322;
}

.task-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.task-card p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 20px;
}

.task-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

.task-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--gray-600);
}

.task-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.start-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.start-btn:hover {
  background: var(--primary-dark);
  transform: translateX(4px);
}

.start-btn:active {
  transform: translateX(2px);
}

/* ============================================
   TASK SCREEN
============================================ */
#task-screen {
  display: none;
  min-height: 100vh;
  padding: 20px;
  animation: slideIn 0.5s ease-out;
  position: relative;
  z-index: 1;
}

/* Top Navigation Bar */
.top-nav {
  background: var(--white);
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.back-button {
  background: var(--gray-100);
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-button:hover {
  background: var(--gray-200);
  transform: translateX(-4px);
}

.task-title-nav {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.nav-right {
  display: flex;
  gap: 12px;
}

/* Workspace Layout */
.workspace-layout {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
  align-items: start;
}

/* Main Panel */
.main-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gray-100);
}

.panel-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

#blocklyDiv {
  width: 100%;
  height: 560px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Instructions Card */
.instructions-card {
  background: linear-gradient(135deg, #EBF4FF 0%, #E0EFFE 100%);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 20px;
  border-left: 4px solid var(--accent);
}

.instructions-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.instructions-card ol {
  margin-left: 20px;
  color: var(--gray-800);
}

.instructions-card li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
}

/* Side Panel */
.side-panel {
  position: sticky;
  top: 20px;
}

/* View Switcher */
.view-switcher {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.view-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.view-tab.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.view-tab:hover:not(.active) {
  background: var(--gray-100);
}

/* Simulator Panel */
.simulator-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}

.arduino-board {
  background: linear-gradient(135deg, #1a4d6d 0%, #0d3d5c 100%);
  border-radius: var(--radius-md);
  padding: 32px;
  position: relative;
  min-height: 320px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.board-label {
  color: var(--white);
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.usb-port {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 36px;
  height: 26px;
  background: linear-gradient(135deg, #d9d9d9, #b8b8b8);
  border-radius: 4px;
  border: 2px solid #9a9a9a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.power-indicator {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.power-led {
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--success);
  animation: pulse 2s ease-in-out infinite;
}

.power-text {
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.pin-section {
  margin-top: 48px;
}

.pin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.1);
  padding: 14px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.pin-row:hover {
  background: rgba(255, 255, 255, 0.15);
}

.pin-label {
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.led {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2a2a2a;
  border: 3px solid #444;
  transition: var(--transition);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.led.on {
  box-shadow:
    0 0 20px var(--led-color, #FFD700),
    0 0 40px var(--led-color, #FFD700),
    inset 0 0 10px var(--led-color, #FFD700);
  border-color: var(--led-color, #FFD700);
}

.led[data-color="red"].on {
  background: #FF4D4F;
  --led-color: #FF4D4F;
}

.led[data-color="yellow"].on {
  background: #FAAD14;
  --led-color: #FAAD14;
}

.led[data-color="green"].on {
  background: #52C41A;
  --led-color: #52C41A;
}

.led[data-color="default"].on {
  background: #FFD700;
  --led-color: #FFD700;
}

.led[data-color="blue"].on {
  background: #4A90E2;
  --led-color: #4A90E2;
}

/* Buzzer Component */
.buzzer {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #3d4e7a 0%, #2A3863 100%);
  padding: 10px 16px;
  border-radius: 8px;
  border: 2px solid #5B6FA0;
  transition: var(--transition);
}

.buzzer-icon {
  font-size: 24px;
  filter: grayscale(1);
  transition: var(--transition);
}

.sound-waves {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: var(--transition);
}

.buzzer.on {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF4757 100%);
  border-color: #FF6B6B;
  animation: buzzerPulse 0.15s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(255, 71, 87, 0.5);
}

.buzzer.on .buzzer-icon {
  filter: grayscale(0) brightness(1.2);
  animation: iconShake 0.1s ease-in-out infinite;
}

.buzzer.on .sound-waves {
  border-color: rgba(255, 255, 255, 0.6);
  animation: soundWave 0.3s ease-out infinite;
}

@keyframes buzzerPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

@keyframes iconShake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-2px);
  }

  75% {
    transform: translateX(2px);
  }
}

@keyframes soundWave {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Sound Sensor Component */
.sensor-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.sound-sensor {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.sensor-icon {
  font-size: 28px;
  transition: var(--transition);
}

.sound-level-bar {
  flex: 1;
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.sound-level-fill {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, #52C41A, #FFD700, #FF4757);
  border-radius: 6px;
  transition: width 0.1s ease-out;
}

.sound-sensor.active .sensor-icon {
  animation: micPulse 0.2s ease-in-out infinite;
}

.sound-sensor.active .sound-level-fill {
  animation: soundLevel 0.5s ease-out;
}

@keyframes micPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }
}

@keyframes soundLevel {
  0% {
    width: 20%;
  }

  50% {
    width: 90%;
  }

  100% {
    width: 20%;
  }
}

/* Motor Component */
.motor {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #5B6FA0 0%, #3d4e7a 100%);
  padding: 12px 16px;
  border-radius: 8px;
  border: 2px solid #8A9BC4;
}

.motor-shaft {
  width: 30px;
  height: 30px;
  background: conic-gradient(#FFF, #AAA, #FFF, #AAA, #FFF);
  border-radius: 50%;
  border: 3px solid #666;
  transition: var(--transition);
}

.motor-speed {
  color: white;
  font-weight: 700;
  font-size: 14px;
  min-width: 40px;
}

.motor.on .motor-shaft {
  animation: motorSpin var(--motor-speed, 1s) linear infinite;
}

.motor.slow .motor-shaft {
  --motor-speed: 1s;
}

.motor.medium .motor-shaft {
  --motor-speed: 0.5s;
}

.motor.fast .motor-shaft {
  --motor-speed: 0.15s;
}

@keyframes motorSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Distance Sensor */
.distance-sensor {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.distance-slider {
  flex: 1;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, #52C41A, #FFD700, #FF4757);
  border-radius: 4px;
  cursor: pointer;
}

.distance-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  border: 3px solid #2A3863;
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.distance-display {
  color: white;
  font-weight: 700;
  font-size: 14px;
  min-width: 60px;
  text-align: right;
}

/* Sound Controls */
.sound-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.sound-slider {
  flex: 1;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, #52C41A, #FFD700, #FF4757);
  border-radius: 4px;
  cursor: pointer;
}

.sound-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  border: 2px solid #2A3863;
  cursor: grab;
}

.sound-value {
  color: white;
  font-weight: 700;
  font-size: 13px;
  min-width: 25px;
}

.clap-btn {
  background: linear-gradient(135deg, #4ECDC4, #2A3863);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.clap-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.clap-btn.active {
  background: linear-gradient(135deg, #FF6B6B, #FF4757);
  transform: scale(1.1);
  animation: clapPulse 0.3s ease-out;
}

@keyframes clapPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1.1);
  }
}

/* Status Monitor */
.status-monitor {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 16px;
  min-height: 120px;
  max-height: 180px;
  overflow-y: auto;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  margin-top: 16px;
  border: 1px solid var(--gray-200);
}

.status-line {
  padding: 6px 10px;
  margin-bottom: 4px;
  border-radius: 4px;
  border-left: 3px solid var(--primary);
  background: var(--white);
}

.status-line.setup {
  border-left-color: var(--warning);
}

.status-line.loop {
  border-left-color: var(--success);
}

.status-line.error {
  border-left-color: var(--danger);
  background: #FFF1F0;
}

/* Code Output */
#codeOutput {
  width: 100%;
  height: 500px;
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 20px;
  border-radius: var(--radius-md);
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  overflow: auto;
  white-space: pre;
  border: 2px solid var(--gray-200);
  display: none;
  line-height: 1.6;
}

#codeOutput.active {
  display: block;
}

/* Control Panel */
.control-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  gap: 12px;
}

.control-btn {
  flex: 1;
  border: none;
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.control-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.control-btn:active {
  transform: translateY(0);
}

.btn-run {
  background: linear-gradient(135deg, var(--success) 0%, #73d13d 100%);
  color: var(--white);
}

.btn-stop {
  background: linear-gradient(135deg, var(--danger) 0%, #ff7875 100%);
  color: var(--white);
}

.btn-reset {
  background: linear-gradient(135deg, var(--warning) 0%, #ffc53d 100%);
  color: var(--white);
}

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(0.95);
  }
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 1200px) {
  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 768px) {
  #task-list-screen {
    padding: 16px;
  }

  .hero-header {
    padding: 32px 20px;
  }

  .hero-header h1 {
    font-size: 32px;
  }

  .hero-header p {
    font-size: 16px;
  }

  .task-cards-grid {
    grid-template-columns: 1fr;
  }

  .control-panel {
    flex-direction: column;
  }

  #blocklyDiv {
    height: 400px;
  }

  .top-nav {
    flex-direction: column;
    gap: 12px;
  }

  .nav-left {
    width: 100%;
    justify-content: space-between;
  }

  .task-title-nav {
    font-size: 18px;
  }

  .section-title {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .hero-header h1 {
    font-size: 28px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-icon {
    font-size: 28px;
  }

  .stat-number {
    font-size: 24px;
  }

  .task-card {
    padding: 20px;
  }

  .task-icon {
    font-size: 44px;
  }
}

/* ============================================
   SCROLLBAR STYLING
============================================ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-600);
}