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

body {
  background: linear-gradient(135deg, #0b1120 0%, #0a0f1a 100%);
  color: #f1f5f9;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === MARKETPLACE HEADER === */
.marketplace-header {
  padding: 20px 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #334155;
  position: sticky;
  top: 0;
  z-index: 100;
}

.marketplace-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.marketplace-header .logo {
  color: white;
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}

.back-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.back-link:hover {
  text-decoration: underline;
}

/* === MAIN TITLE === */
.main-title {
  text-align: center;
  font-size: 52px;
  font-weight: 800;
  color: white;
  margin: 80px 0 20px;
  background: linear-gradient(90deg, #fbbf24, #fcd34d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.main-desc {
  text-align: center;
  font-size: 19px;
  color: #94a3b8;
  max-width: 700px;
  margin: 0 auto 60px;
}

/* === BUTTONS === */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: auto;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-primary:hover {
  opacity: 0.95;
  transform: scale(1.02);
}

.btn-secondary {
  background: transparent;
  color: #3b82f6;
  border: 2px solid #3b82f6;
  border-radius: 999px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(59, 130, 246, 0.1);
}

/* === AGENTS GRID === */
.prebuilt-agents {
  padding: 60px 0 100px;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.agent-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(56, 189, 248, 0.1);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.agent-card:hover {
  transform: translateY(-8px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: rgba(30, 41, 59, 0.8);
}

.agent-icon {
  font-size: 28px;
  margin-bottom: 16px;
  text-align: center;
}

.agent-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin: 0 0 12px;
  text-align: center;
}

.agent-card p {
  font-size: 15px;
  color: #cbd5e1;
  margin-bottom: 24px;
  text-align: center;
  flex-grow: 1;
}

/* === CUSTOM AGENT === */
.custom-agent {
  padding: 60px 0 80px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(5px);
  border-top: 1px solid #334155;
}

.custom-content {
  display: flex;
  gap: 60px;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.custom-text h2 {
  font-size: 32px;
  color: white;
  margin-bottom: 12px;
}

.custom-text p {
  font-size: 17px;
  color: #cbd5e1;
}

.custom-form {
  background: rgba(30, 41, 59, 0.7);
  padding: 32px;
  border-radius: 20px;
  flex: 1;
  border: 1px solid #334155;
}

.custom-form input,
.custom-form textarea {
  width: 100%;
  padding: 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.7);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
}

.custom-form textarea {
  min-height: 100px;
  resize: vertical;
}

/* === MODAL === */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 40px;
  width: 90%;
  max-width: 960px;
  position: relative;
  border: 1px solid #334155;
}

.modal-header {
  text-align: center;
  margin-bottom: 36px;
}

.modal-header h2 {
  font-size: 28px;
  color: white;
  margin-bottom: 10px;
}

.modal-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.plan-card {
  background: rgba(30, 41, 59, 0.7);
  border-radius: 18px;
  padding: 28px;
  text-align: left;
  display: flex;
  flex-direction: column;
  border: 1px solid #334155;
}

.plan-card.featured {
  border: 2px solid #3b82f6;
  background: rgba(30, 41, 59, 0.9);
  position: relative;
}

.plan-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-price {
  font-size: 26px;
  font-weight: 700;
  color: white;
  margin: 12px 0 18px;
}

.plan-price span {
  font-size: 15px;
  color: #94a3b8;
  font-weight: 400;
}

.plan-features {
  list-style: none;
  margin: 16px 0;
  flex-grow: 1;
}

.plan-features li {
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
}

.plan-features li::before {
  content: "✓";
  color: #34d399;
  font-weight: bold;
}

.close-modal {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 28px;
  cursor: pointer;
  position: absolute;
  top: 16px;
  right: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.close-modal:hover {
  background: rgba(255,255,255,0.1);
}

/* === AUTH MODAL === */
.auth-modal {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #334155;
  text-align: left;
}

.auth-header h2 {
  font-size: 24px;
  color: white;
  margin-bottom: 8px;
}

.auth-header p {
  color: #94a3b8;
  font-size: 15px;
  margin-bottom: 32px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  color: #cbd5e1;
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 500;
}

.input-group input {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.7);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
}

.btn-block {
  width: 100%;
  padding: 14px;
  font-size: 16px;
}

.divider {
  text-align: center;
  color: #64748b;
  font-size: 14px;
  margin: 24px 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #334155;
  margin: 0 16px;
}

.social-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: rgba(30, 41, 59, 0.6);
  color: white;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.2s;
}

.social-btn:hover {
  border-color: #4285F4;
  background: rgba(66, 133, 244, 0.1);
}

.auth-footer {
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
  margin-top: 24px;
}

.auth-footer a {
  color: #3b82f6;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* === RESPONSIVE === */
@media (max-width: 1150px) {
  .agents-grid,
  .modal-plans {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-title { font-size: 38px; }
  .main-desc { font-size: 17px; }
  .agents-grid,
  .modal-plans {
    grid-template-columns: 1fr;
  }
  .custom-content {
    flex-direction: column;
  }
  .modal-content {
    padding: 28px;
  }
}
