/* CSS Demo Page Enhanced – Arshia Mohammadi */

:root {
  --color-bg: #f4f4f4;
  --color-text: #1a1a1a;
  --color-accent: #4e9eff;
  --color-card: #ffffff;
  --color-border: #e0e0e0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1c1c2a;
    --color-text: #ffffff;
    --color-accent: #ff5fcf;
    --color-card: #2a2a3a;
    --color-border: #3a3a3a;
  }
}

body {
  margin: 0;
  padding: 0 1rem;
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
}

/* Navigation */
.demo-nav {
  background: var(--color-accent);
  padding: 1rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.demo-nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.demo-nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
}

.demo-nav a:hover {
  opacity: 0.8;
}

/* Heading */
.demo-heading {
  font-size: 2.4rem;
  text-align: center;
  margin: 2rem 0;
}

/* Grid */
.grid-showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

/* Cards */
.card {
  background: linear-gradient(135deg, var(--color-card), var(--color-border));
  padding: 1.5rem;
  border-left: 5px solid var(--color-accent);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, background 0.5s ease;
}

.card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--color-accent);
}

.card p {
  font-size: 1rem;
}

/* Animations */
.bounce {
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

.rotate {
  animation: rotate 8s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.scale {
  animation: scale 3s ease-in-out infinite;
}

@keyframes scale {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.fade {
  animation: fade 5s ease-in-out infinite;
}

@keyframes fade {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.9rem;
  padding: 1.5rem;
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
}

/* Responsive Grid */
@media (min-width: 700px) {
  .grid-showcase {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-showcase {
    grid-template-columns: repeat(4, 1fr);
  }
}

