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

:root {
  --primary-red: #d32f2f;
  --header-gradient: linear-gradient(180deg, #ff4d4d 0%, #d32f2f 100%);
  --bg-color: #f8fafc;
  --card-bg-sangat-puas: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  --card-bg-puas: linear-gradient(135deg, #2196f3 0%, #1565c0 100%);
  --card-bg-cukup: linear-gradient(135deg, #ff9800 0%, #ef6c00 100%);
  --card-bg-tidak-puas: linear-gradient(135deg, #f44336 0%, #c62828 100%);
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Header Sections */
.header-bar-1 {
  background: var(--header-gradient);
  color: #ffffff;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.header-bar-2 {
  background-color: #f1f5f9;
  border-bottom: 2px solid #e2e8f0;
  color: var(--text-primary);
  text-align: center;
  padding: 1.2rem 1rem;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Main Workspace */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Cards Grid */
.cards-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  width: 100%;
  max-height: 70%;
}

/* Individual Feedback Card */
.feedback-card {
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.feedback-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.feedback-card:hover {
  transform: translateY(-8px) scale(1.03);
}

.feedback-card:active {
  transform: translateY(2px) scale(0.97);
  transition-duration: 0.05s;
}

/* Emoji / Icon Styling */
.card-icon {
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feedback-card:hover .card-icon {
  transform: scale(1.15) rotate(5deg);
}

/* Card Titles */
.card-title {
  color: #ffffff;
  font-size: clamp(1.1rem, 2.5vw, 1.8rem);
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Card Specific Colors */
.card-sangat-puas {
  background: var(--card-bg-sangat-puas);
}
.card-sangat-puas:hover {
  box-shadow: 0 15px 30px rgba(76, 175, 80, 0.4);
}

.card-puas {
  background: var(--card-bg-puas);
}
.card-puas:hover {
  box-shadow: 0 15px 30px rgba(33, 150, 243, 0.4);
}

.card-cukup {
  background: var(--card-bg-cukup);
}
.card-cukup:hover {
  box-shadow: 0 15px 30px rgba(255, 152, 0, 0.4);
}

.card-tidak-puas {
  background: var(--card-bg-tidak-puas);
}
.card-tidak-puas:hover {
  box-shadow: 0 15px 30px rgba(244, 67, 54, 0.4);
}

/* Footer Section */
.footer-bar {
  background-color: #e2e8f0;
  border-top: 1px solid #cbd5e1;
  color: var(--text-primary);
  text-align: center;
  padding: 1rem;
  font-size: clamp(0.9rem, 1.8vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: auto;
}

/* Thank You Overlay screen */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background-color: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.thank-you-box {
  background: white;
  padding: 3rem 4rem;
  border-radius: 32px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 90%;
  width: 500px;
}

.overlay.active .thank-you-box {
  transform: scale(1);
}

.thank-you-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  animation: bounce 1.5s infinite;
}

.thank-you-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.thank-you-message {
  font-size: 1.1rem;
  color: var(--text-muted);
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .cards-container {
    gap: 1.5rem;
  }
  .feedback-card {
    border-radius: 20px;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 1rem;
  }
  .cards-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    max-height: 80%;
  }
}

@media (max-width: 480px) {
  .cards-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    overflow-y: auto;
    max-height: 90%;
    aspect-ratio: auto;
  }
  .feedback-card {
    aspect-ratio: auto;
    height: 120px;
    flex-direction: row;
    justify-content: flex-start;
    padding: 1rem 2rem;
    gap: 2rem;
  }
  .card-icon {
    font-size: 3rem;
  }
  body {
    overflow-y: auto;
  }
}
