@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

body {
  background-color: #0f172a;
  color: #fff;
  font-family: 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
}

.hint-text {
  margin-bottom: 15px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.resizable-wrapper {
  container-type: inline-size;
  container-name: card-container;
  resize: horizontal;
  overflow: hidden;
  width: 320px;
  max-width: 900px;
  min-width: 280px;
  background: #1e293b;
  border: 2px dashed #38bdf8;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.smart-card {
  background: #fff;
  color: #334155;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.badge {
  background: #e0f2fe;
  color: #0284c7;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  align-self: flex-start;
}

.card-title {
  margin: 0;
  line-height: 1.1;
  font-size: clamp(1.25rem, 6cqi, 3rem);
  font-weight: 800;
  color: #0f172a;
  transition: font-size 0.2s ease;
}

.card-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: #64748b;
  margin: 0;
}

.card-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #cbd5e1;
}

.btn {
  background: #0f172a;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
}

.btn:hover {
  background: #334155;
}

@container card-container (min-width: 480px) {
  .smart-card {
    flex-direction: row;
    align-items: stretch;
  }
  
  .card-image {
    flex: 0 0 40%;
  }
  
  .card-image img {
    height: 100%;
  }
  
  .card-content {
    justify-content: center;
    padding: 30px;
  }
}

@container card-container (min-width: 750px) {
  .smart-card {
    background: linear-gradient(to right, #ffffff, #f8fafc);
  }

  .card-image {
    flex: 0 0 50%;
  }

  .card-title {
    font-size: 5cqi;
    color: #0284c7;
  }
  
  .card-desc {
    font-size: 1.125rem;
  }
  
  .btn {
    background: #0ea5e9;
    padding: 12px 24px;
  }
  
  .btn:hover {
    background: #0284c7;
  }
}