/**
 * Creator Discovery - Frontend Styles
 * YouTube-style layout
 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #0f172a;
  color: #f8fafc;
  min-height: 100vh;
  line-height: 1.6;
}

/* Top Bar */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  padding: 0;
}

.top-bar-content {
  max-width: 100%;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-bar-left {
  flex-shrink: 0;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
  text-decoration: none;
  transition: color 0.2s ease;
}

.logo:hover {
  color: #cbd5e1;
}

.top-bar-center {
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 10px 16px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 24px;
  color: #f8fafc;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.search-input::placeholder {
  color: #64748b;
}

.top-bar-right {
  flex-shrink: 0;
}

/* App Layout */
.app-layout {
  display: flex;
  max-width: 100%;
  margin: 0 auto;
}

/* Sidebar */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #1e293b;
  border-right: 1px solid #334155;
  height: calc(100vh - 60px);
  overflow-y: auto;
  position: sticky;
  top: 60px;
}

.sidebar-nav {
  padding: 16px 0;
}

.sidebar-item {
  display: block;
  padding: 10px 24px;
  color: #cbd5e1;
  text-decoration: none;
  transition: background 0.2s ease;
  cursor: pointer;
}

.sidebar-item:hover {
  background: #334155;
}

.sidebar-item.active {
  background: #334155;
  color: #f8fafc;
  font-weight: 500;
}

.sidebar-section {
  margin-top: 16px;
}

.sidebar-section-title {
  padding: 8px 24px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 24px;
  min-height: calc(100vh - 60px);
}

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

.creator-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.creator-card:hover {
  border-color: #475569;
  transform: translateY(-2px);
}

.creator-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.creator-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #334155;
  flex-shrink: 0;
}

.creator-name {
  font-size: 1.1rem;
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-followers {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 8px;
}

.creator-description {
  color: #cbd5e1;
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.creator-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.creator-actions {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #334155;
  color: #f8fafc;
}

.btn-secondary:hover {
  background: #475569;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #94a3b8;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: #cbd5e1;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
}

.modal-content {
  position: relative;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 1.5rem;
  color: #e2e8f0;
}

.modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

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

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

.form-group input {
  width: 100%;
  padding: 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #f8fafc;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #3b82f6;
}

.form-group small {
  display: block;
  margin-top: 6px;
  color: #94a3b8;
  font-size: 0.85rem;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.submit-message {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.submit-message.success {
  background: #1e3a1e;
  border: 1px solid #22c55e;
  color: #86efac;
}

.submit-message.error {
  background: #3a1e1e;
  border: 1px solid #ef4444;
  color: #fca5a5;
}

.submit-message.info {
  background: #1e293b;
  border: 1px solid #64748b;
  color: #cbd5e1;
}

/* Responsive */
@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid #334155;
  }

  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: 8px 0;
  }

  .sidebar-item {
    white-space: nowrap;
    padding: 8px 16px;
  }

  .sidebar-section {
    margin-top: 0;
  }

  .sidebar-section-title {
    display: none;
  }

  .creators-grid {
    grid-template-columns: 1fr;
  }

  .top-bar-content {
    flex-wrap: wrap;
  }

  .top-bar-center {
    order: 3;
    width: 100%;
    margin-top: 8px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }
}
