/* Base Styles */
.almanac-demo {
  scrollbar-color: #304b49 #45b7d1;
}

body {
  font-family: sans-serif;
  line-height: 1.6;
  max-width: 65ch;
  margin: 0 auto;
  padding: 2rem;
  color: #333;
}

h1 {
  color: #2c3e50;
  border-bottom: 2px solid #258177;
  padding-bottom: 0.5rem;
}

h2 {
  color: #0f355b;
  margin-top: 2rem;
  border-bottom: 3px solid #0f355b;
}

p {
  margin: 0.5rem;
}

ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

a {
  color: #4c568e;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #29aab9;
  text-decoration: underline;
}

/* Card Styles */
.card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card h3 {
  color: #258177;
  margin-top: 0;
  margin-bottom: 1rem;
}

.card code {
  padding: 1rem;
  margin-top: 1rem;
  overflow-x: auto;
}

section .card + .card {
  margin-top: 1.5rem;
}

/* Buttons */
.button {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 16px;
  background-color: #4c708e;
  color: white;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #29aab9;
  color: white;
  text-decoration: none;
}

/* backdrop-filter demo */
.demo-area {
  position: relative;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
  padding: 2rem;
  margin: 1rem 0;
  border-radius: 4px;
  overflow: hidden;
}

.demo-area code {
  position: relative;
  display: block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 1rem;
  border-radius: 4px;
  color: #333;
  font-family: monospace;
  white-space: pre-wrap;
}

/* Cursor Demo */
.grab-cursor {
  cursor: grab;
}

/* Perspective Demo */
section {
  perspective: 2000px;
}

.perspective-demo {
  transform: rotateY(10deg);
  transition: transform 0.4s ease;
  margin: 50px;
}

.perspective-demo:hover {
  transform: rotateY(0deg);
}

/* Code Styles */
pre {
  margin: 0;
}

.code-block {
  background-color: #dbedff;
  border-radius: 4px;
  border-left: 3px solid #34cadb;
  margin: 0;
  font-family: monospace;
  display: block;
  padding: 0.5rem;
}

code {
  background-color: #dbedff;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
}

/* Resource and Summary Section */
.resource-section {
  background-color: #e3f7f5;
  padding: 1rem;
  border-radius: 15px;
  margin-top: 1.5rem;
}

.resource-section h2 {
  margin: 0;
}

.resource-section .card {
  text-align: center;
}

/* Grid Demo */
.grid-demo-container {
  margin: 2rem 0;
}

.grid-demo {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  background-color: #4c708e;
  border-radius: 8px;
  height: 300px;
  gap: 3px;
  padding: 10px;
}

.grid-item {
  background-color: #29aab9;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: 1px solid #333;
}

.css {
  grid-area: 2 / 2 / 5 / 7;
}

.is {
  grid-area: 6 / 3 / 8 / 6;
}

.awesome {
  grid-area: 1 / 8 / 11 / 11;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
}

.css,
.is,
.awesome {
  font-size: 1rem;
}

/* Footer Styles */
footer {
  margin-top: 2rem;
  text-align: center;
}

footer p {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

footer a {
  color: #4c568e;
  text-decoration: none;
}

footer a:hover {
  color: #29aab9;
}

/* Media Queries */
@media screen and (min-width: 768px) {
  footer p {
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
  }

  .grid-demo {
    height: 600px;
    gap: 10px;
    padding: 20px;
  }

  .css,
  .is,
  .awesome {
    font-size: 4rem;
  }
}

@media screen and (min-width: 1440px) {
  .grid-demo {
    height: 800px;
    gap: 15px;
    padding: 25px;
  }

  .css,
  .is,
  .awesome {
    font-size: 6rem;
  }
}
