.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 20px;
}
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  flex-wrap: wrap;
}
h1 {
  font-size: 28px;
  font-weight: 600;
  color: var(--heading-color);
}
h2 {
  color: var(--heading-color);
  font-size: 1.5rem;
  font-weight: 600;
}
h3 {
  color: var(--heading-color);
  font-size: 1.25rem;
  font-weight: 600;
}
.site-url {
  display: inline-block;
  color: var(--text-color);
  font-size: 14px;
  text-decoration: none;
  background: var(--primary-color);
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}
.controls {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.period-selector {
  display: flex;
  gap: 5px;
  background: var(--bg-white);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.period-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-color);
  transition: all 0.2s;
}
.period-btn:hover {
  background: rgba(251, 191, 36, 0.6);
  color: #000;
}
.period-btn.active {
  background: var(--primary-color);
  color: #000;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #c8c8c8;
  transition: all 0.3s;
}
.stat-label {
  font-size: 14px;
  color: var(--heading-color);
  margin-bottom: 8px;
  font-weight: 500;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--heading-color);
  display: block;
}
.chart-card {
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #c8c8c8;
  margin-bottom: 30px;
}
.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--heading-color);
}
.chart-container {
  position: relative;
  height: 300px;
}
.table-card {
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #c8c8c8;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
  border-bottom: 2px solid var(--bg-white);
}
.data-table td {
  padding: 16px 0;
  border-bottom: 1px solid var(--bg-white);
  color: var(--text-color);
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table .url-cell {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: var(--text-color);
}
.data-table .url-cell a {
  text-decoration: none;
  color: var(--text-color);
}
.data-table .url-cell svg {
  display: none;
  margin-left: 4px;
}
.data-table .url-cell:hover svg {
  display: inline-block;
}
.data-table .count-cell {
  text-align: right;
  font-weight: 600;
  color: var(--text-color);
}
.more-btn {
  display: flex;
  margin: 0 0 0 auto;
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
}
.more-btn:hover {
  text-decoration: underline;
}
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-color);
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--bg-white);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.error {
  background: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
  padding: 10px;
  font-size: 13px;
  border-radius: 6px;
  text-align: center;
  margin: 20px 0;
}
.error h2 {
  margin-bottom: 10px;
  font-size: 20px;
}
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-color);
}
.empty-state-icon {
  font-size: 48px;
  margin-bottom: 15px;
}
.site-twitter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.site-twitter a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-color);
  font-size: 14px;
  transition: color 0.2s;
}
.site-twitter a:hover {
  color: var(--primary-color);
}
.founder-avatar-small {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.founder-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}
.founder-avatar-small span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.site-logo-large img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
}
.site-logo-large span {
  font-size: 2rem;
  color: var(--text-color);
  font-weight: 600;
}
.site-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.site-categories a {
  text-decoration: none;
}
.category-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-color);
}


/* Founder */
.founder-profile {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}
.founder-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}
.founder-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}
.x-link {
  color: var(--heading-color);
}
.x-icon {
  width: 20px;
  height: 20px;
}
.founder-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}
.stat {
  text-align: center;
}

/* Sites Grid */
.sites-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-card {
  background: var(--bg-white);
  border: 1px solid #c8c8c8;
  border-radius: 12px;
  padding: 1rem;
  transition: all 0.2s;
  text-decoration: none;
  max-width: 300px;
  width: 100%;
}
.site-card:hover {
  border-color: var(--heading-color);
  text-decoration: none;
}
.site-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Category Navigation */
.category-nav {
  padding: 2rem 0;
  overflow-x: auto;
  border-top: 1px solid var(--border-color);
}
.category-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.category-tab {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  background: var(--bg-white);
}
.category-tab:hover {
  border-color: var(--heading-color);
  background: var(--bg-color);
  text-decoration: none;
}
.category-tab.active {
  background: rgba(251, 191, 36, 0.5);
  color: #000;
  border-color: var(--primary-color);
}

/* Register */
.card {
  background: var(--bg-white);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 1rem;
  margin-bottom: 2rem;
}
.form-group {
  margin-bottom: 15px;
}
label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--heading-color);
}
.required {
  color: #ef4444;
}
input[type="text"],
input[type="url"],
textarea {
  width: 100%;
  padding: 4px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  height: 36px;
}
input[type="text"]::placeholder,
input[type="url"]::placeholder,
textarea::placeholder {
  color: #999;
}
input[type="text"]:focus,
input[type="url"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}
textarea {
  resize: vertical;
  min-height: 80px;
}
.char-counter {
  text-align: right;
  font-size: 12px;
  color: var(--text-color);
  margin-top: 5px;
}
.char-counter.warning {
  color: #f59e0b;
}
.char-counter.error {
  color: #ef4444;
}
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.category-item {
  display: flex;
  align-items: center;
}
.category-item input[type="checkbox"] {
  margin-right: 8px;
  width: 14px;
  height: 14px;
  cursor: pointer;
  border: 1px solid var(--border-color);
}
.category-item label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-color);
}
.help-text {
  font-size: 13px;
  color: var(--text-color);
  margin-top: 5px;
}
.code-box {
  padding: 15px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-family: 'Courier New', monospace;
  font-size: 13px;
  overflow-x: auto;
  margin: 15px 0;
  position: relative;
}
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}
.copy-btn:hover {
  background: var(--secondary-color);
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .period-selector {
    width: 100%;
  }
  .period-btn {
    flex: 1;
  }
  .two-column {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-value {
    font-size: 24px;
  }
  .chart-container {
    height: 250px;
  }
  .site-card {
    max-width: 100%;
  }
  
  /* Founder */
  .founder-profile {
    flex-direction: column;
    text-align: center;
  }
  .founder-stats {
    justify-content: center;
    gap: 2rem;
  }
  .site-info {
    flex-direction: column;
  }

  /* Register */
  .categories-grid {
    grid-template-columns: 1fr;
  }
}