:root {
  --primary-color: #4737bb;
  --secondary-color: #821ad4;

  --accent-color: #c084fc;
  --dark-color: #1e1e2e;
  --light-color: #faf7ff;

  --success-color: #4caf50;
  --warning-color: #ff9800;
  --danger-color: #ff4d6d;

  --text-color: #2c2c54;
  --border-radius: 6px;
  --box-shadow: 0 4px 15px rgba(71, 55, 187, 0.2);
  --transition: all 0.3s ease-in-out;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f9f9f9;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

header {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 2rem 0;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow);
}

header h1 {
  margin-bottom: 0.5rem;
}

header i {
  margin-right: 0.5rem;
}

main {
  margin-bottom: 3rem;
}

section {
  margin-bottom: 2.5rem;
}

h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

h3 {
  color: var(--secondary-color);
  margin-bottom: 0.75rem;
}

.controls {
  background-color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 1.5rem;
}

.control-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.control {
  margin-bottom: 1rem;
  min-width: 200px;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  background-color: white;
  font-family: inherit;
  transition: all 0.2s ease-in-out;
}

select:hover, select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 5px var(--accent-color);
}
.info-message {
  background-color: var(--light-color);
  color: var(--primary-color);
  padding: 10px;
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: bold;
  margin-bottom: 15px;
}


.demo-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.flex-container {
  display: flex;
  background-color: #f0f0f0;
  border: 2px dashed var(--primary-color);
  min-height: 200px;
  padding: 1rem;
  transition: var(--transition);
}

.flex-item {
  background-color: var(--secondary-color);
  color: white;
  padding: 1.5rem;
  margin: 0.5rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  min-width: 80px;
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.flex-item:nth-child(odd) {
  background-color: var(--primary-color);
}

.flex-item:hover {
  transform: scale(1.05);
}

.code-display {
  background-color: var(--dark-color);
  color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  overflow-x: auto;
}

pre {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.4;
}

code {
  display: block;
  padding: 0.5rem;
}

.example-container {
  background-color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 2rem;
}

.center-demo {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f0f0f0;
  height: 200px;
  border: 1px solid #ddd;
  margin-bottom: 1rem;
}

.centered-item {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
}

.navbar-demo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--dark-color);
  padding: 1rem;
  color: white;
  border-radius: var(--border-radius);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.menu {
  display: flex;
  list-style: none;
}

.menu li {
  margin-left: 1.5rem;
}

.menu a {
  color: white;
  text-decoration: none;
  transition: var(--transition);
}

.menu a:hover {
  color: var(--accent-color);
}

.resize-note {
  text-align: center;
  margin-top: 1rem;
  font-style: italic;
  color: #666;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.gallery-item {
  flex: 1 0 150px;
  max-width: 200px;
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

.resources ul {
  list-style: none;
}

.resources li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
}

.resources li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

.resources a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.resources a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

footer {
  background-color: var(--dark-color);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.social {
  display: flex;
  gap: 1rem;
}

.social a {
  color: white;
  font-size: 1.5rem;
  transition: var(--transition);
}

.social a:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .control-group {
    flex-direction: column;
  }

  .navbar-demo {
    flex-direction: column;
  }

  .menu {
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .menu li {
    margin: 0.5rem 0.75rem;
  }

  footer .container {
    flex-direction: column;
    gap: 1rem;
  }
}
