/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
  min-height: 100vh;
  color: #fff;
  line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
  background: #3b82f6;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #8b5cf6;
}

/* Utility Classes */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass Effect */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header.scrolled {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

@media (min-width: 768px) {
  .header-content {
    height: 5rem;
  }
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}

@media (min-width: 768px) {
  .logo {
    font-size: 2rem;
  }
}

.nav {
  display: none;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

.nav a {
  color: #a1a1aa;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.nav a:hover {
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
  transform: translateY(-1px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(139, 92, 246, 0.5);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu {
  display: none;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu.active {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 0;
  color: #a1a1aa;
  text-decoration: none;
}

.mobile-menu a:hover {
  color: #fff;
}

/* Hero Section */
.hero {
  position: relative;
  padding-top: 8rem;
  padding-bottom: 5rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero {
    padding-top: 10rem;
    padding-bottom: 7rem;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg::before,
.hero-bg::after {
  content: '';
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
  animation: pulse 4s ease-in-out infinite;
}

.hero-bg::before {
  top: 25%;
  left: 25%;
  background: #7c3aed;
}

.hero-bg::after {
  bottom: 25%;
  right: 25%;
  background: #3b82f6;
  animation-delay: 2s;
}

@keyframes pulse {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.1); }
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: #d4d4d8;
  margin-bottom: 2rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.5rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 4rem;
  }
}

.hero-description {
  font-size: 1.125rem;
  color: #a1a1aa;
  margin-bottom: 2.5rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.search-box {
  position: relative;
  max-width: 36rem;
  margin: 0 auto 3rem;
}

.search-box input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: all 0.2s;
}

.search-box input::placeholder {
  color: #71717a;
}

.search-box input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.search-box svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #71717a;
}

/* Stats */
.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: rgba(124, 58, 237, 0.2);
}

.stat-icon svg {
  color: #8b5cf6;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.875rem;
  color: #71717a;
}

/* Section */
.section {
  padding: 4rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 6rem 0;
  }
}

.section-border {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
}

.section-icon.premium {
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
}

.section-icon.new {
  background: linear-gradient(135deg, #34d399 0%, #14b8a6 100%);
}

.section-icon.top {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 1.875rem;
  }
}

.section-subtitle {
  font-size: 0.875rem;
  color: #a1a1aa;
  margin-top: 0.25rem;
}

.badge-special {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: #fbbf24;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  gap: 1.5rem;
}

.cards-grid.premium {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .cards-grid.premium {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cards-grid.new {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .cards-grid.new {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards-grid.new {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Card */
.card {
  position: relative;
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.card-glow {
  position: absolute;
  inset: -2px;
  border-radius: calc(1rem + 2px);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover .card-glow {
  opacity: 1;
}

.card-glow.premium {
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  filter: blur(8px);
  opacity: 0.2;
}

.card:hover .card-glow.premium {
  opacity: 0.4;
}

.card-inner {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  height: 100%;
}

.card-inner.premium {
  border: 2px solid rgba(251, 191, 36, 0.3);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.1), inset 0 0 20px rgba(251, 191, 36, 0.05);
}

.card-badge {
  position: absolute;
  top: -0.75rem;
  left: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.card-badge.premium {
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  color: #000;
}

.card-badge.new {
  background: linear-gradient(135deg, #34d399 0%, #14b8a6 100%);
  color: #000;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-top: 0.5rem;
}

.card-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.card-icon img {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
}

.card-title-wrapper {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card:hover .card-title {
  color: #a78bfa;
}

.card-category {
  font-size: 0.75rem;
  color: #71717a;
}

.card-description {
  font-size: 0.875rem;
  color: #a1a1aa;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-description.small {
  font-size: 0.75rem;
  -webkit-line-clamp: 2;
}

.card-actions {
  display: flex;
  gap: 0.75rem;
}

.card-actions .btn {
  flex: 1;
}

/* List */
.sites-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}

.list-item:hover {
  transform: scale(1.005);
}

.list-item.rank-1 {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
  border-color: rgba(251, 191, 36, 0.3);
}

.list-item.rank-2 {
  background: linear-gradient(90deg, rgba(161, 161, 170, 0.2) 0%, rgba(113, 113, 122, 0.2) 100%);
  border-color: rgba(161, 161, 170, 0.3);
}

.list-item.rank-3 {
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.2) 0%, rgba(180, 83, 9, 0.2) 100%);
  border-color: rgba(217, 119, 6, 0.3);
}

.list-rank {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.list-rank svg {
  width: 1.25rem;
  height: 1.25rem;
}

.list-rank .rank-number {
  font-weight: 600;
  color: #71717a;
}

.list-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.list-icon img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

.list-content {
  flex: 1;
  min-width: 0;
}

.list-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.list-title {
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item:hover .list-title {
  color: #a78bfa;
}

.list-category {
  display: none;
  padding: 0.125rem 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: #a1a1aa;
}

@media (min-width: 640px) {
  .list-category {
    display: inline-block;
  }
}

.list-description {
  font-size: 0.875rem;
  color: #71717a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Filters */
.filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 9999px;
  color: #a1a1aa;
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.filter-btn.active {
  background: #7c3aed;
  color: #fff;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.page-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 0.5rem;
  color: #a1a1aa;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.page-btn.active {
  background: #7c3aed;
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 0;
}

.empty-icon {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  margin: 0 auto 1rem;
}

.empty-icon svg {
  color: #71717a;
}

.empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-text {
  color: #71717a;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 32rem;
  background: #0f0f1a;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  transform: scale(0.95);
  transition: transform 0.3s;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.modal-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  border-radius: 0.5rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 0.5rem;
}

.modal-close:hover {
  color: #fff;
}

/* Form */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #d4d4d8;
  margin-bottom: 0.5rem;
}

.form-label svg {
  color: #8b5cf6;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #52525b;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.form-textarea {
  resize: none;
  min-height: 5rem;
}

.form-error {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.form-actions .btn {
  flex: 1;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 1rem 1.5rem;
  background: rgba(20, 20, 30, 0.95);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 0.75rem;
  color: #fff;
  animation: slideIn 0.3s ease;
}

.toast.success {
  border-color: rgba(52, 211, 153, 0.3);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.3);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Footer */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 3rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-brand {
  text-align: center;
}

@media (min-width: 768px) {
  .footer-brand {
    text-align: left;
  }
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-copy {
  font-size: 0.875rem;
  color: #71717a;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: #71717a;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #8b5cf6;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  color: #71717a;
  transition: all 0.2s;
}

.footer-social a:hover {
  background: rgba(124, 58, 237, 0.2);
  color: #8b5cf6;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.875rem;
  color: #52525b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.footer-bottom svg {
  color: #ef4444;
  fill: #ef4444;
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 0;
}

.spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Date Badge */
.date-badge {
  font-size: 0.75rem;
  color: #34d399;
}
