/* =========================================
   IMPORT BASE STYLES
========================================= */

@import url("main.css");

/* =========================================
   GLOBAL HELPERS
========================================= */

.hidden {
  display: none !important;
}

/* =========================================
   HERO SECTION
========================================= */

.hero-section {
  width: 100%;
  text-align: center;
  background-image: url("assets/box_half.svg");
  background-repeat: repeat;
  background-position: center;
}

.hero-section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 140px;
}

.hero-title {
  font-size: 64px;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-description {
  font-size: 20px;
  max-width: 780px;
  margin: 0 auto;
}

.upload-area {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.upload-image {
  width: 100%;
  max-width: 680px;
}

.upload-image-mobile {
  display: none;
}

/* =========================================
   PUBLIC RESULTS PAGE (Dashboard Style)
========================================= */

.results-page {
  background: #f5f7fb;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------- HEADER ---------- */

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 30px;
}

.results-left {
  display: flex;
  gap: 24px;
  align-items: center;
}

.query-image-wrapper img {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #e6e9f0;
}

.results-meta h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}

.include-checkbox {
  font-size: 14px;
  color: #666;
}

.results-actions {
  margin-top: 12px;
}

.new-search-btn {
  background: #0066ff;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s ease;
}

.new-search-btn:hover {
  background: #0066ff;
}

/* ---------- RIGHT NOTIFY ---------- */

.results-right {
  background: #fff7d6;
  padding: 16px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.notify-content {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.notify-btn {
  background: #111827;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
}

/* ---------- TABS ---------- */

.results-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.tab {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}

.tab.active {
  background: #0066ff;
  color: #fff;
}

/* ---------- TOOLBAR ---------- */

.results-toolbar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.toolbar-btn {
  background: #fff;
  border: 1px solid #e6e9f0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

/* ---------- GRID ---------- */

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.result-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e6e9f0;
  transition: 0.2s ease;
}

.result-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* ---------- LOAD MORE ---------- */

.load-more-wrapper {
  text-align: center;
  margin-top: 40px;
}

.load-more-btn {
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  background: #0066ff;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

.load-more-btn:hover {
  background: #0066ff;
}

/* =========================================
   GLOBAL LOADER
========================================= */

.global-loader {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #ddd;
  border-top: 4px solid #0066ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 768px) {

  .hero-title {
    font-size: 42px;
  }

  .upload-image {
    display: none;
  }

  .upload-image-mobile {
    display: block;
    width: 100%;
  }

  .results-header {
    flex-direction: column;
    gap: 20px;
  }

  .results-left {
    flex-direction: column;
    align-items: flex-start;
  }

  .results-right {
    width: 100%;
    justify-content: space-between;
  }

}

/* =========================================
   RESULT CARD FOOTER
========================================= */

.result-card-footer {
  padding: 12px;
  text-align: center;
  border-top: 1px solid #f0f0f0;
}

.view-source-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  background: #0066ff;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: 0.2s ease;
}

.view-source-btn:hover {
  background: #0066ff;
}

.view-source-btn.locked {
  background: #e5e7eb;
  color: #666;
  cursor: pointer;
}

/* =========================================
   UPGRADE MODAL
========================================= */

.upgrade-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.upgrade-modal-content {
  background: #fff;
  padding: 40px;
  border-radius: 16px;
  width: 400px;
  text-align: center;
}

.upgrade-modal-content h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

.upgrade-modal-content p {
  font-size: 14px;
  margin-bottom: 24px;
  color: #555;
}

.upgrade-btn {
  display: inline-block;
  background: #0066ff;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  margin-bottom: 10px;
}

.close-upgrade {
  background: none;
  border: none;
  color: #777;
  cursor: pointer;
  margin-top: 10px;
}

/* =========================================
   SIMILARITY BADGE STYLING
========================================= */

.image-wrapper {
  position: relative;
}

.similarity-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  color: #fff;
  backdrop-filter: blur(4px);
}

/* HIGH MATCH */
.similarity-high {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

/* MEDIUM MATCH */
.similarity-medium {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

/* LOW MATCH */
.similarity-low {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

/* =========================================
   PRICING PAGE
========================================= */

.main-content-pricing{
  padding:80px 20px;
  max-width:1200px;
  margin:0 auto;
}

.pricing-section{
  width:100%;
}

.pricing-header{
  text-align:center;
  margin-bottom:60px;
}

.pricing-title{
  font-size:42px;
  font-weight:700;
  margin-bottom:10px;
}

.pricing-subtitle{
  font-size:18px;
  color:#666;
}

/* ---------- PRICING GRID ---------- */

.pricing-cards{
  display:flex;
  justify-content:center;
  gap:28px;
  flex-wrap:wrap;
}

/* ---------- CARD ---------- */

.pricing-card{
  width:320px;
  background:#fff;
  border:1px solid #e6e9f0;
  border-radius:16px;
  padding:36px 32px;
  text-align:center;
  transition:all .25s ease;
  display:flex;
  flex-direction:column;
}

.pricing-card:hover{
  transform:translateY(-6px);
  box-shadow:0 12px 28px rgba(0,0,0,0.08);
}

/* ---------- FEATURED PLAN ---------- */

.pricing-card.featured{
  border:2px solid #0066ff;
  transform:scale(1.04);
}

/* ---------- PLAN TEXT ---------- */

.plan-name{
  font-size:22px;
  font-weight:600;
  margin-bottom:6px;
}

.plan-description{
  font-size:14px;
  color:#666;
  margin-bottom:26px;
}

/* ---------- PRICE ---------- */

.plan-price{
  margin-bottom:24px;
}

.price-amount{
  font-size:42px;
  font-weight:700;
}

.price-period{
  font-size:16px;
  color:#666;
}

/* ---------- FEATURES ---------- */

.plan-features{
  list-style:none;
  padding:0;
  margin:0 0 30px 0;
}

.plan-features li{
  padding:10px 0;
  border-bottom:1px solid #f1f3f7;
  font-size:15px;
}

.plan-features li:last-child{
  border:none;
}

/* ---------- BUTTON ---------- */

.btn-plan{
  display:inline-block;
  padding:12px 26px;
  border-radius:10px;
  font-weight:500;
  text-decoration:none;
  background:#0066ff;
  color:#fff;
  border:none;
  cursor:pointer;
  transition:.2s ease;
}

.btn-plan:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 18px rgba(0,102,255,0.25);
}

.btn-plan:disabled{
  background:#e5e7eb;
  color:#666;
  cursor:not-allowed;
  box-shadow:none;
}

/* =========================================
   PRICING RESPONSIVE
========================================= */

@media (max-width: 900px){

  .pricing-cards{
    flex-direction:column;
    align-items:center;
  }

  .pricing-card.featured{
    transform:none;
  }

}