:root {
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.5);
  --accent: #f43f5e;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-main: 'Outfit', sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Decorations */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.4;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--primary);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: var(--accent);
  bottom: 10%;
  right: -50px;
}

/* Typography & Layout */
#app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.glass-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  margin-bottom: 4rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.dot {
  color: var(--primary);
}

.badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid var(--glass-border);
  color: var(--accent);
  font-weight: 600;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(135deg, #a5b4fc, #f43f5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

/* Search Component */
.search-container {
  display: flex;
  padding: 0.5rem;
  border-radius: 50px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
  margin-bottom: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.search-container:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
}

#search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  color: white;
  font-family: var(--font-main);
  outline: none;
}

.primary-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s;
}

.primary-btn:hover {
  background: #4f46e5;
}

.tags-container {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.2s;
}

.tag:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Results Grid */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding-bottom: 3rem;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 3rem;
}

/* Result Card New Styles */
.deal-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s;
  animation: fadeIn 0.5s ease-out;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.deal-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-glow);
}

.card-image {
  height: 160px;
  background: #1e293b;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

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

.discount-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
}

.card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.deal-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  flex-grow: 0;
}

.deal-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.type-badge {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.action-btn {
  width: 100%;
  background: green;
  /* Picodi Green style */
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  margin-top: auto;
  /* Push to bottom */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: transform 0.1s, background 0.2s;
  box-shadow: 0 4px 15px rgba(0, 128, 0, 0.4);
}

.action-btn:active {
  transform: scale(0.98);
}

.action-btn:hover {
  background: #00a000;
}

.code-preview {
  text-align: center;
  font-family: monospace;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.7;
  letter-spacing: 1px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.3s;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--glass-border);
  padding: 2.5rem;
  border-radius: 24px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(1);
  transition: transform 0.3s;
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.highlight {
  color: var(--accent);
  font-weight: 700;
}

.modal h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.modal-desc {
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.price-box {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
  align-items: baseline;
}

.currency {
  font-size: 1.2rem;
  font-weight: 600;
  margin-right: 2px;
}

.amount {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-main);
}

.period {
  color: var(--text-muted);
  margin-left: 5px;
}

.subscribe-btn {
  background: linear-gradient(45deg, var(--primary), var(--accent));
  color: white;
  border: none;
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: transform 0.1s;
}

.subscribe-btn:hover {
  transform: scale(1.02);
}

.text-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
}

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

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

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  .hero-content {
    margin-bottom: 2rem;
  }
}