:root {
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(255, 255, 255, 0.4);
  --text-dark: #1e293b;
  --text-muted: #64748b;
}

#quay-so-app {
  font-family: 'Outfit', sans-serif;
  max-width: 550px;
  margin: 40px auto;
  background: radial-gradient(circle at top right, #f0f4ff, #ffffff);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.card-header-premium {
  background: var(--primary-gradient);
  padding: 3rem 1rem;
  color: white;
}

.premium-title {
  font-weight: 700;
  font-size: 2.4rem;
  letter-spacing: -0.01em;
}

.premium-subtitle {
  opacity: 0.7;
  font-weight: 300;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 5px;
}

/* Tabs */
.premium-tabs-group {
  background: #f1f5f9;
  padding: 6px;
  border-radius: 999px;
  display: inline-flex;
  margin: 0 auto;
}

.tab-pill {
  border: none;
  background: transparent;
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-pill.active {
  background: white;
  color: #4f46e5;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tab-pane-premium {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-pane-premium.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Display */
.glow-result {
  font-size: 7rem;
  font-weight: 800;
  color: #4f46e5;
  text-shadow: 0 0 40px rgba(79, 70, 229, 0.2);
  line-height: 1;
  margin: 20px 0;
}

.btn-premium-action {
  position: relative;
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 1.2rem 3rem;
  border-radius: 1.2rem;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s;
  overflow: hidden;
  width: 100%;
  margin-top: 10px;
}

.btn-premium-action:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.4);
}

.btn-premium-action:active {
  transform: translateY(-1px);
}

.btn-premium-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* History */
.history-section {
  background: #f8fafc;
  border: 1px solid #edf2f7;
}

.history-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.btn-text-danger {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 5px;
}

.btn-text-danger:hover {
  background: #fee2e2;
}

.bubble-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  padding: 10px 2px;
}

.history-bubble {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Config */
.config-grid {
  background: white;
  border: 1px solid #f1f5f9;
}

.config-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.config-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

.config-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 0.8rem;
  border: 2px solid #f1f5f9;
  font-weight: 600;
  color: #4f46e5;
  transition: border-color 0.2s;
}

.config-input:focus {
  outline: none;
  border-color: #4f46e5;
}

.config-note {
  font-size: 0.75rem;
  color: #94a3b8;
  font-style: italic;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}

.crystal-icon {
  display: inline-block;
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
  }

  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 1));
  }
}