:root {
  --primary-color: #f59e0b;
  --success-color: #10b981;
  --bg-dark: #0f172a;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --text-light: #f9fafb;
  --border-color: rgba(255, 255, 255, 0.12);
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
}

.cr-container {
  padding: 2rem 1rem;
  min-height: 100vh;
  text-align: center;
}

.cr-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.cr-instructions {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: var(--text-light);
}

.cr-info {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.cr-box {
  position: relative;
  max-width: 800px;
  height: 400px;
  margin: auto;
  background: var(--glass-bg);
  border-radius: 12px;
  overflow: hidden;
  border: 4px solid;
  border-image: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet) 1;
  animation: rainbow-border 4s linear infinite;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

@keyframes rainbow-border {
  0% { border-image-source: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet); }
  100% { border-image-source: linear-gradient(450deg, red, orange, yellow, green, blue, indigo, violet); }
}

.cr-start-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  z-index: 10;
}

.cr-start-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

.emoji {
  position: absolute;
  font-size: 2rem;
  cursor: pointer;
  animation: pop 0.3s ease-out;
}

@keyframes pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.emoji.clicked {
  transform: scale(1.4) rotate(10deg);
  opacity: 0.5;
}

.cr-result-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(30, 41, 59, 0.95);
  border-radius: 1rem;
  padding: 2rem;
  color: var(--text-light);
  width: 90%;
  max-width: 360px;
  z-index: 20;
  text-align: center;
  transition: transform 0.4s ease;
}

.cr-result-popup.show {
  transform: translate(-50%, -50%) scale(1);
}

.cr-result-popup h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.cr-btn-group {
  margin-top: 1rem;
}

.cr-btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.cr-btn.primary {
  background-color: var(--primary-color);
  color: white;
}

.cr-btn.primary:hover {
  background-color: var(--success-color);
}