/* Add these header styles at the top of the file */
.app-header {
    background: linear-gradient(135deg, #2C3E50 0%, #3498DB 100%);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: translateY(-1px);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.logo-text {
    background: linear-gradient(135deg, #FFF 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #FF6B6B, #4ECDC4);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link.active:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Add responsive styles */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .nav-menu {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

:root {
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --secondary-color: #6c757d;
  --secondary-hover: #5a6268;
  --background-color: #f8f9fa;
  --border-color: #dee2e6;
  --text-color: #212529;
  --panel-background: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  /* padding-top: 80px; */
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

.subtitle {
  color: var(--secondary-color);
  margin-top: 0.5rem;
}

section {
  background: var(--panel-background);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

/* Input Styles */
.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.url-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.input-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.input-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Button Styles */
.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline;
  align-items: center;
  gap: 0.5rem;
}

.primary {
  background: var(--primary-color);
  color: white;
}

.primary:hover {
  background: var(--primary-hover);
}

.secondary {
  background: var(--secondary-color);
  color: white;
}

.secondary:hover {
  background: var(--secondary-hover);
}

.text-button {
  background: none;
  color: var(--secondary-color);
  padding: 0.5rem;
}

.text-button:hover {
  color: var(--secondary-hover);
}

.icon-button {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--secondary-color);
}

#scrape-all {
  background: var(--secondary-color);
  color: white;
}

#scrape-all:hover {
  background: var(--secondary-hover);
}

/* Log Panel */
.log-content {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1rem;
  height: 200px;
  overflow-y: auto;
  font-family: monospace;
}

.log-entry {
  padding: 0.25rem 0;
}

.log-entry.error {
  color: #dc3545;
}

/* Results Panel */
.results-controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem;
}

/* Theme Cards */
.theme-card {
  background: var(--panel-background);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  width: 100%;
}

.theme-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.theme-card-inner {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 140px;
}

.theme-preview {
  position: relative;
  height: 100%;
  min-height: 140px;
}

.theme-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.theme-preview:hover img {
  transform: scale(1.05);
}

.no-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
  color: var(--secondary-color);
  font-size: 0.9rem;
}

.theme-info {
  padding: 0.75rem 1rem;
  gap: 0.5rem;
  display: flex;
  flex-direction: column;
}

.theme-header {
  margin-bottom: 0.5rem;
}

.theme-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.theme-description {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.theme-meta {
  display: flex;
  gap: 0.75rem;
  margin: 0.25rem 0;
}

.meta-item {
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
}

.theme-tags {
  margin: 0.25rem 0;
}

.tag {
  padding: 0.15rem 0.5rem;
  font-size: 0.8rem;
}

.theme-downloads {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  margin-top: auto;
}

.download-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 4px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  border: none;
  flex: 1;
  justify-content: center;
  min-width: 100px;
  transition: all 0.2s ease;
}

.download-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.download-btn.mobileconfig {
  background: var(--primary-color);
  color: white;
}

.download-btn.pack {
  background: var(--secondary-color);
  color: white;
}

.download-btn.copy {
  background: var(--background-color);
  color: var(--secondary-color);
  border: 1px solid var(--border-color);
}

.download-btn.copy:hover {
  background: var(--border-color);
}

.download-btn.copy.success {
  background: #28a745;
  color: white;
  border: none;
  cursor: default;
}

.download-btn.copy:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
  .theme-card-inner {
    grid-template-columns: 120px 1fr;
    min-height: 120px;
  }
  
  .theme-preview {
    min-height: 120px;
  }
  
  .theme-downloads {
    flex-wrap: wrap;
  }
  
  .actions {
    flex-direction: column;
  }
}

/* Saved URLs */
.saved-urls-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.saved-url {
  background: var(--background-color);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.saved-url button {
  padding: 0.25rem;
}

.url-status {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.85rem;
}

.url-status.pending {
  background: var(--background-color);
  color: var(--secondary-color);
}

.url-status.processing {
  background: #fff3cd;
  color: #856404;
}

.url-status.completed {
  background: #d4edda;
  color: #155724;
}

.url-status.error {
  background: #f8d7da;
  color: #721c24;
}

.url-actions {
  display: flex;
  gap: 0.5rem;
}

/* Pipeline Items Section */
.pipeline-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pipeline-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: var(--background-color);
  border-radius: 4px;
  transition: all 0.2s ease;
  min-height: 48px;
}

.pipeline-item:hover {
  background: var(--border-color);
}

.pipeline-item .url-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.pipeline-item .url-title {
  font-weight: 500;
}

.pipeline-item .url-host {
  font-size: 0.85rem;
  color: var(--secondary-color);
}

.pipeline-item .status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  min-width: 100px;
  text-align: center;
}

.pipeline-item .item-actions {
  display: flex;
  gap: 0.5rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pagination button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--panel-background);
  cursor: pointer;
}

.pagination button:hover:not(:disabled) {
  background: var(--background-color);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination .current-page {
  padding: 0.5rem 1rem;
  font-weight: 500;
}

.loading {
  padding: 2rem;
  text-align: center;
  color: var(--secondary-color);
}

.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--secondary-color);
  background: var(--background-color);
  border-radius: 4px;
}

.error-state {
  padding: 2rem;
  text-align: center;
  color: #dc3545;
  background: #f8d7da;
  border-radius: 4px;
}

/* Header Styles */
.main-header {
  background: linear-gradient(135deg, #2C3E50 0%, #3498DB 100%);
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
} 