@import 'variables.css';

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg-color);
  color: var(--text-main);
  padding: 0;
  margin: 0;
  font-size: var(--text-base);
  min-height: 100vh;
}

.app-layout {
  display: flex;
  min-height: calc(100vh - var(--navbar-height));
  width: 100%;
}

#sidebar-placeholder {
  min-height: 100%;
  background: var(--bg-surface);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.topbar {
  background: var(--bg-surface);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar-inner {
  min-height: var(--navbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: var(--logo-height);
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .logo img {
    height: 60px;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  margin-left: auto;
  margin-right: 18px;
}

.nav a {
  text-decoration: none;
  font-size: var(--text-sm);
  color: var(--text-muted);
  white-space: nowrap;
}

.actions {
  display: flex;
  gap: 8px;
}

.btn-outline,
.btn-solid,
.hero-btn,
.request-btn {
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-outline {
  min-width: clamp(60px, 8vw, 100px);
  height: var(--btn-height-sm);
  background: transparent;
  border: 1.5px solid var(--primary-color);
  color: var(--primary-color);
  font-size: var(--text-sm);
  padding: 0 12px;
}

.btn-solid {
  min-width: clamp(60px, 8vw, 100px);
  height: var(--btn-height-sm);
  background: var(--btn-gradient);
  border: none;
  color: var(--btn-text);
  font-size: var(--text-sm);
  padding: 0 12px;
  font-weight: 700;
}

.hero {
  background: linear-gradient(180deg, #111 0%, #000 100%);
  color: #fff;
  padding: var(--section-padding) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 16px;
  border-radius: 999px;
  background: rgba(241, 201, 125, 0.1);
  border: 1px solid rgba(241, 201, 125, 0.2);
  font-size: var(--text-xs);
  margin-bottom: 14px;
  color: var(--primary-color);
  width: fit-content;
}

.hero h1 {
  font-size: var(--text-xl);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 14px;
}

.hero p {
  max-width: 600px;
  margin: 0 0 16px;
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text-muted);
}

.hero-btn {
  min-width: 160px;
  height: var(--btn-height-md);
  border: none;
  background: var(--btn-gradient);
  color: var(--btn-text);
  font-size: var(--text-base);
  font-weight: 700;
  padding: 0 24px;
}

.stats-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: clamp(24px, 4vw, 48px) 0;
}

.stats-bar-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  flex: 1 1 150px;
}

.stat .num {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat .label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.content {
  padding: var(--section-padding) 0;
  background: var(--bg-color);
}

.section {
  margin-bottom: clamp(40px, 6vw, 80px);
}

.section:last-child {
  margin-bottom: 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(20px, 4vw, 32px);
}

.section-head.left {
  justify-content: flex-start;
}

.section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-main);
}

.see-all {
  font-size: var(--text-sm);
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.creator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.creator-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
}

.creator-card:hover {
  transform: translateY(-8px);
  border-color: rgba(241, 201, 125, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.creator-card:hover .creator-card-img {
  transform: scale(1.08);
}

.creator-card-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #1a1a1a;
}

.creator-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.creator-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.creator-card-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(14, 14, 14, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px 12px;
  border-radius: 10px;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 2;
}

.creator-card-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.creator-card-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creator-card-cat {
  font-size: 13px;
  color: #8a8a8a;
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creator-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.creator-card-btn {
  flex: 1;
  height: 38px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.creator-card-btn.primary {
  background: var(--btn-gradient);
  border: none;
  color: var(--btn-text);
}

.creator-card-btn.primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.creator-card-btn.secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.creator-card-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.how-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 32px 24px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
}

.how-number {
  width: clamp(32px, 4vw, 40px);
  height: clamp(32px, 4vw, 40px);
  border-radius: 50%;
  background: var(--btn-gradient);
  color: var(--btn-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 16px;
}

.how-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.how-text {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .topbar-inner {
    flex-direction: column;
    padding: 16px 0;
    gap: 16px;
  }

  .nav {
    margin: 0;
    width: 100%;
    justify-content: center;
    gap: 16px;
  }

  .actions {
    width: 100%;
    justify-content: center;
  }

  .hero h1 {
    font-size: var(--text-lg);
  }

  .stats-bar-inner {
    justify-content: center;
    gap: 24px;
  }

  .stat {
    flex: 1 1 120px;
  }
}

@media (max-width: 480px) {
  .nav {
    flex-wrap: wrap;
  }
  
  .hero-btn {
    width: 100%;
  }

  .how-card {
    min-height: auto;
  }
}

/* Global Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #1A1A1A;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.3);
}

.modal-body {
    padding: 0;
}

[dir="rtl"] .modal-close {
    right: auto;
    left: 20px;
}
