:root {
  --primary: #3498db;
  --secondary: #2ecc71;
  --accent: #e74c3c;
  --dark: #2c3e50;
  --light: #ecf0f1;
  --gray: #95a5a6;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
header {
  text-align: center;
  color: white;
  padding: 30px 0;
  margin-bottom: 30px;
}
header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
header p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 800px;
  margin: 0 auto;
}
.logo {
  font-size: 3rem;
  margin-bottom: 20px;
  color: white;
}
.card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
}
.card h2 {
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--light);
  display: flex;
  align-items: center;
}
.card h2 i {
  margin-right: 10px;
}
.device-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.info-item {
  background: var(--light);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  position: relative;
}
.info-item h3 {
  color: var(--dark);
  margin-bottom: 10px;
  font-size: 1rem;
}
.info-value {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--primary);
}
.device-age-warning {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--accent);
  animation: bounce 2s infinite;
  font-size: 1.2rem;
}
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}
.integration {
  background: var(--dark);
  color: white;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  position: relative;
  font-family: "Courier New", monospace;
  overflow-x: auto;
}
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.2s ease;
}
.copy-btn:hover {
  background: #2980b9;
}
.copy-btn.copied {
  background: var(--secondary);
}
.campaigns {
  margin-top: 30px;
}
.campaign {
  background: var(--light);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  border-left: 4px solid var(--gray);
  transition: all 0.3s ease;
}
.campaign.matched {
  border-left-color: var(--secondary);
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  animation: pulse 2s infinite;
  transform: scale(1.02);
}
@keyframes pulse {
  0% {
    transform: scale(1.02);
  }
  50% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1.02);
  }
}
.campaign h3 {
  color: var(--dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}
.campaign h3 i {
  margin-right: 10px;
}
.criteria {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
  justify-content: center;
  align-items: center;
}
.criteria strong {
  margin-right: 10px;
}
.criterion {
  background: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}
.criterion i {
  margin-right: 5px;
  color: var(--primary);
}
.criterion.met {
  background: var(--secondary);
  color: white;
  animation: checkmark 0.5s ease;
}
.criterion.met i {
  color: white;
}
@keyframes checkmark {
  0% {
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}
.modal.show {
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: scale(0.9);
  animation: modalPop 0.3s ease forwards;
}
@keyframes modalPop {
  to {
    transform: scale(1);
  }
}
.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: var(--gray);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}
.modal-close:hover {
  color: var(--accent);
}
.modal-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 20px;
  animation: iconBounce 0.6s ease;
}
@keyframes iconBounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}
.modal-message {
  font-size: 1.3rem;
  color: var(--dark);
  margin-bottom: 25px;
  line-height: 1.4;
}
.modal-cta {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 25px;
  font-size: 1.1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}
.modal-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  margin: 5px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}
.btn i {
  margin-right: 8px;
}
.btn:hover {
  background: #2980b9;
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--gray);
}
.btn-secondary:hover {
  background: #7f8c8d;
}
.loading {
  text-align: center;
  padding: 40px;
  color: var(--primary);
  font-style: italic;
}
.loading::after {
  content: "";
  animation: dots 1.5s infinite;
}
@keyframes dots {
  0%,
  20% {
    color: rgba(52, 152, 219, 0.2);
    text-shadow: 0.25em 0 0 rgba(52, 152, 219, 0.2),
      0.5em 0 0 rgba(52, 152, 219, 0.2);
  }
  40% {
    color: var(--primary);
    text-shadow: 0.25em 0 0 rgba(52, 152, 219, 0.2),
      0.5em 0 0 rgba(52, 152, 219, 0.2);
  }
  60% {
    text-shadow: 0.25em 0 0 var(--primary), 0.5em 0 0 rgba(52, 152, 219, 0.2);
  }
  80%,
  100% {
    text-shadow: 0.25em 0 0 var(--primary), 0.5em 0 0 var(--primary);
  }
}
select#simulateDevice {
  width: 100%;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid var(--gray);
  background-color: white;
  font-size: 1rem;
  color: var(--dark);
  transition: all 0.2s ease;
  cursor: pointer;
}
select#simulateDevice:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}
.demo-note {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #f39c12;
  color: #856404;
}
.demo-note i {
  margin-right: 10px;
  color: #f39c12;
}
.stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  color: white;
  font-size: 0.9rem;
}
.stat-item {
  text-align: center;
}
.stat-value {
  font-size: 1.3rem;
  font-weight: bold;
  display: block;
}
footer {
  text-align: center;
  margin-top: 50px;
  padding: 20px;
  color: white;
  font-size: 0.9rem;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.product-item {
  background: var(--light);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.2s ease;
}

.product-item:hover {
  transform: translateY(-2px);
}

.product-item h4 {
  margin: 10px 0 5px 0;
  color: var(--dark);
}

.product-item p {
  font-weight: bold;
  color: var(--primary);
  margin: 5px 0;
}

.product-item small {
  color: var(--gray);
}

.technical-demo {
  border-top: 3px solid var(--accent);
}
.text-and-button {
  display: flex;
  align-items: center;
  justify-content: space-between; /* pushes button to the right */
  gap: 1rem;
}

.text-and-button p {
  margin: 0;
}

/* On smaller screens stack them */
@media (max-width: 600px) {
  .text-and-button {
    flex-direction: column;
    align-items: flex-start; /* left-align button under text */
  }

  .text-and-button a {
    margin-top: 0.5rem;
  }
}
@media (max-width: 768px) {
  .device-info {
    grid-template-columns: 1fr;
  }
  header h1 {
    font-size: 2rem;
  }
  .card {
    padding: 20px;
  }
  .stats-bar {
    flex-direction: column;
    gap: 10px;
  }
}
.back-link {
  text-align: center;
  margin: 30px 0;
}

.back-link a {
  color: white;
  font-weight: bold;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.back-link a i {
  margin-right: 8px;
}
