.tutorial-section {
  background: linear-gradient(145deg, var(--dark-blue), #1a2540);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--gold);
}

.tutorial-section h2 {
  color: var(--coral);
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.tutorial-section h3 {
  color: var(--gold);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.example-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

/* Selectores */
.selector-example {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 400px;
}

.element-selector {
  color: blue;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.class-selector {
  color: red;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

#id-selector {
  color: green;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.attribute-selector {
  color: purple;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

/* Box Model */
.box-model-example {
  width: 300px;
  height: 200px;
  position: relative;
  margin: 2rem auto;
}

.margin {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 0, 0, 0.1);
  border: 2px dashed red;
}

.border {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  background-color: rgba(0, 255, 0, 0.1);
  border: 2px dashed green;
}

.padding {
  position: absolute;
  top: 40px;
  left: 40px;
  right: 40px;
  bottom: 40px;
  background-color: rgba(0, 0, 255, 0.1);
  border: 2px dashed blue;
}

.content {
  position: absolute;
  top: 60px;
  left: 60px;
  right: 60px;
  bottom: 60px;
  background-color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-blue);
  font-weight: bold;
  border-radius: 8px;
}

/* Display y Position */
.display-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  width: 100%;
}

.display-example {
  padding: 1rem;
  background-color: var(--gold);
  color: var(--dark-blue);
  font-weight: bold;
  border-radius: 8px;
  margin: 0.5rem;
  min-width: 100px;
  text-align: center;
}

.block {
  display: block;
  width: 100%;
}

.inline {
  display: inline;
}

.inline-block {
  display: inline-block;
  width: 200px;
}

.flex {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 200px;
}

.grid {
  display: grid;
  place-items: center;
  width: 200px;
}

.position-container {
  position: relative;
  height: 300px;
  border: 2px dashed var(--gold);
  border-radius: 8px;
  margin: 2rem 0;
  padding: 1rem;
}

.position-example {
  padding: 1rem;
  background-color: var(--gold);
  color: var(--dark-blue);
  font-weight: bold;
  border-radius: 8px;
  width: 150px;
  text-align: center;
}

.static {
  position: static;
}

.relative {
  position: relative;
  top: 20px;
  left: 20px;
}

.absolute {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.fixed {
  position: fixed;
  bottom: 20px;
  right: 20px;
}

.sticky {
  position: sticky;
  top: 20px;
}

/* Colores y Fondos */
.color-example {
  width: 150px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.rgb {
  background-color: rgb(255, 0, 0);
}
.hex {
  background-color: #00ff00;
}
.hsl {
  background-color: hsl(240, 100%, 50%);
}
.rgba {
  background-color: rgba(255, 0, 0, 0.5);
}
.gradient {
  background: linear-gradient(45deg, #ff0000, #00ff00);
}
.bg-multiple {
  background-color: var(--gold);
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.1),
    transparent
  );
}

/* Texto y Tipografía */
.text-examples {
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.text-example {
  width: 100%;
  padding: 1rem;
  margin: 0.5rem 0;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.font-family {
  font-family: "Arial", sans-serif;
}
.font-size {
  font-size: 24px;
}
.font-weight {
  font-weight: bold;
}
.text-align {
  text-align: center;
}
.line-height {
  line-height: 1.6;
}
.letter-spacing {
  letter-spacing: 2px;
}
.text-transform {
  text-transform: uppercase;
}

/* Bordes y Sombras */
.border-example {
  padding: 1rem;
  margin: 0.5rem;
  background-color: var(--gold);
  color: var(--dark-blue);
  font-weight: bold;
  border-radius: 8px;
  min-width: 100px;
  text-align: center;
}

.solid {
  border: 3px solid var(--coral);
}
.dashed {
  border: 3px dashed var(--coral);
}
.dotted {
  border: 3px dotted var(--coral);
}
.double {
  border: 3px double var(--coral);
}
.rounded {
  border-radius: 15px;
}

.shadow-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.shadow-example {
  width: 200px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--gold);
  color: var(--dark-blue);
  font-weight: bold;
  border-radius: 8px;
}

.box-shadow {
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
}

.text-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.multiple-shadow {
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3),
    -5px -5px 15px rgba(255, 255, 255, 0.1);
}

/* Transiciones y Animaciones */
.transition-example {
  width: 150px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--gold);
  color: var(--dark-blue);
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.1);
}

.hover-color:hover {
  background-color: var(--coral);
  color: var(--white);
}

.hover-rotate:hover {
  transform: rotate(45deg);
}

.hover-complex:hover {
  transform: scale(1.1) rotate(45deg);
  background-color: var(--coral);
  color: var(--white);
}

.animation-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.animation-example {
  width: 150px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--gold);
  color: var(--dark-blue);
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
}

.bounce {
  animation: bounce 1s infinite;
}

.pulse {
  animation: pulse 1s infinite;
}

.spin {
  animation: spin 2s linear infinite;
}

.slide {
  animation: slide 2s ease-in-out infinite alternate;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Herramientas Interactivas */
.interactive-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.color-picker,
.shadow-generator {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.color-picker input[type="color"] {
  width: 100px;
  height: 100px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  align-self: center;
}

.color-preview {
  width: 200px;
  height: 100px;
  border-radius: 8px;
  background-color: #ff0000;
  transition: background-color 0.3s ease;
  align-self: center;
}

.color-values {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: "Consolas", monospace;
}

.shadow-preview {
  width: 200px;
  height: 200px;
  background-color: var(--gold);
  border-radius: 8px;
  margin: 0 auto;
  box-shadow: 5px 5px 15px 0px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.3s ease;
}

.shadow-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.control-group input[type="range"] {
  width: 100%;
}

.control-group input[type="color"] {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Código de ejemplo */
.code-example {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.code-example pre {
  margin: 0;
  white-space: pre-wrap;
  color: var(--light-gray);
  font-family: "Consolas", monospace;
}

/* Responsive */
@media (max-width: 768px) {
  .tutorial-section {
    padding: 1rem;
  }

  .example-container {
    flex-direction: column;
    align-items: center;
  }

  .position-container {
    height: 400px;
  }

  .display-example,
  .color-example,
  .border-example,
  .shadow-example,
  .transition-example,
  .animation-example {
    width: 100%;
    max-width: 300px;
  }

  .interactive-container {
    grid-template-columns: 1fr;
  }
}
