/* ===================================
   SITE DETAIL PAGE - SINGLE CSS FILE
   Modern, Responsive & Clean Design
   =================================== */

/* CSS Variables - Dark Theme */
:root {
  --primary-color: #6366f1;
  --primary-hover: #5855eb;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --dark-color: #0f172a;
  --light-color: #1e293b;
  --border-color: #334155;
  --text-color: #e2e8f0;
  --text-muted: #94a3b8;
  --white: #ffffff;
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-secondary: #334155;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-main);
  margin: 0;
  padding: 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 1rem 0;
  font-weight: 600;
  line-height: 1.3;
  color: var(--dark-color);
}

p {
  margin: 0 0 1rem 0;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-content {
  text-align: center;
}

.loading-logo {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 2rem;
}

.loading-logo i {
  margin-right: 0.5rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Header */
.main-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color) !important;
}

.navbar-brand i {
  margin-right: 0.5rem;
}

.navbar-nav .nav-link {
  color: var(--text-color) !important;
  font-weight: 500;
  padding: 0.75rem 1rem !important;
  transition: var(--transition);
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

/* Site Header Section */
.site-header-section {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-hover)
  );
  color: var(--white);
  padding: 3rem 0;
  margin-bottom: 2rem;
  border-radius: var(--border-radius-lg);
}

.site-header-content {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius);
  border: 3px solid rgba(255, 255, 255, 0.3);
  object-fit: contain;
  background: var(--white);
  padding: 0.5rem;
}

.site-info h1 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.site-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.star {
  color: #fbbf24 !important;
  font-size: 1.1rem;
}

.rating-score {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--white);
}

.status-badge,
.sponsor-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success-color);
}

.status-badge.inactive {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger-color);
}

.sponsor-badge {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning-color);
}

/* Site Statistics */
.site-stats-section {
  margin-bottom: 2rem;
}

.site-stats-section .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 50px;
  height: 50px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--primary-color);
  font-size: 1.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Detail Cards */
.detail-card {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.detail-card:hover {
  box-shadow: var(--shadow-md);
}

.detail-card-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: between;
}

.detail-card-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-card-header i {
  color: var(--primary-color);
}

.detail-card-body {
  padding: 1.5rem;
}

/* Sticky Sidebar */
.sticky-sidebar {
  position: sticky;
  top: calc(80px + 2rem);
}

/* Overview Content */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.overview-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.overview-label {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.overview-value {
  font-weight: 600;
  color: var(--text-color);
}

.site-description {
  padding: 1rem;
  background: var(--light-color);
  border-radius: var(--border-radius);
  color: var(--text-color);
  line-height: 1.7;
}

/* Bonuses */
.bonus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.bonus-card {
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.bonus-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.bonus-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.bonus-title {
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bonus-title i {
  color: var(--primary-color);
}

.bonus-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--success-color);
}

.bonus-description {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.bonus-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.bonus-action:hover {
  background: var(--primary-hover);
  color: var(--white);
  transform: translateY(-1px);
}

/* Reviews */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.review-item {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: var(--transition);
}

.review-item:hover {
  border-color: var(--primary-color);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
}

.review-author-info h6 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-color);
}

.review-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.review-rating {
  display: flex;
  gap: 0.25rem;
}

.review-content {
  color: var(--text-color);
  line-height: 1.6;
}

/* Quick Actions */
.quick-actions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--light-color);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--dark-color);
  transition: var(--transition);
}

.quick-action:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateX(4px);
}

.quick-action i {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

/* Similar Sites */
.similar-sites-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.similar-site-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.similar-site-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.similar-site-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius);
  object-fit: contain;
  background: var(--white);
  border: 1px solid var(--border-color);
}

.similar-site-info {
  flex: 1;
}

.similar-site-name {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.similar-site-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.similar-site-rating .star {
  color: #fbbf24 !important;
}

/* Site Tips */
.site-tips {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-tips li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.site-tips li:last-child {
  border-bottom: none;
}

.site-tips i {
  color: var(--success-color);
  font-size: 0.875rem;
}

/* Mobile CTA Bar */
.mobile-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border-color);
  padding: 1rem;
  display: none;
  align-items: center;
  gap: 1rem;
  z-index: 1000;
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mobile-cta-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: var(--white);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.mobile-cta-btn:hover {
  background: var(--primary-hover);
  color: var(--white);
}

.mobile-share-btn {
  background: var(--light-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.75rem;
  font-size: 1.1rem;
  transition: var(--transition);
}

.mobile-share-btn:hover {
  background: var(--border-color);
}

/* Review Modal */
.star-rating {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.rating-star {
  font-size: 2rem;
  color: var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.rating-star:hover,
.rating-star.active {
  color: #fbbf24 !important;
}

.rating-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.rating-text.selected {
  color: var(--primary-color);
  font-weight: 600;
}

.char-counter {
  text-align: right;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 1000;
  display: none;
}

.back-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* Footer */
.main-footer {
  background: var(--dark-color);
  color: var(--white);
  padding: 2rem 0 1rem;
  margin-top: 4rem;
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-brand i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-end;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h5 {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .site-header-content {
    flex-direction: column;
    text-align: center;
  }

  .site-info h1 {
    font-size: 2rem;
  }

  .site-meta {
    justify-content: center;
  }

  .sticky-sidebar {
    position: static;
  }

  .detail-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footer-links {
    justify-content: center;
    margin-top: 1rem;
  }
}

@media (max-width: 767.98px) {
  .main-content {
    padding: 1rem 0;
  }

  .site-header-section {
    padding: 2rem 0;
    margin-bottom: 1rem;
  }

  .site-logo {
    width: 60px;
    height: 60px;
  }

  .site-info h1 {
    font-size: 1.75rem;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .bonus-grid {
    grid-template-columns: 1fr;
  }

  .detail-card {
    margin-bottom: 1rem;
  }

  .detail-card-header,
  .detail-card-body {
    padding: 1rem;
  }

  .mobile-cta-bar {
    display: flex;
  }

  body {
    padding-bottom: 80px;
  }

  .back-to-top {
    bottom: 100px;
    right: 1rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  .site-stats-section .row {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .review-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .similar-site-item {
    padding: 0.75rem;
  }
}

/* Custom Bootstrap Overrides */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.modal-content {
  border-radius: var(--border-radius-lg);
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  background: var(--light-color);
  border-bottom: 1px solid var(--border-color);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-card {
  animation: fadeInUp 0.6s ease-out;
}

.detail-card:nth-child(2) {
  animation-delay: 0.1s;
}
.detail-card:nth-child(3) {
  animation-delay: 0.2s;
}
.detail-card:nth-child(4) {
  animation-delay: 0.3s;
}
.detail-card:nth-child(5) {
  animation-delay: 0.4s;
}

/* Utility Classes */
.text-muted {
  color: var(--text-muted) !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

.bg-light {
  background-color: var(--light-color) !important;
}

/* Print Styles */
@media print {
  .mobile-cta-bar,
  .back-to-top,
  .loading-screen,
  .main-header {
    display: none !important;
  }

  .main-content {
    margin-top: 0 !important;
  }

  .detail-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
