/* Base Styles and Variables */
:root {
  --primary-color: #7209b7;
  --primary-hover: #6008a0;
  --secondary-color: #560bad;
  --accent-color: #f72585;
  --success-color: #4cc9f0;
  --warning-color: #f9c74f;
  --danger-color: #f94144;
  --text-primary: #f8f9fa;
  --text-secondary: #ced4da;
  --text-light: #adb5bd;
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --bg-sidebar: #0a0a0a;
  --bg-card: #1e1e1e;
  --border-color: #333333;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.5;
}

/* Layout */
.container {
  display: flex;
  min-height: 100vh;
}

.top-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  display: flex;
  flex-direction: column;
  width: 280px;
  height: calc(100vh - 60px);
  background-color: var(--bg-secondary);
  transition: transform 0.3s ease;
  z-index: 999;
}

.mobile-open {
  transform: translateX(0);
}

.logo-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-content i {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.logo-content h1 {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* Menu Toggle Button */
.menu-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.menu-toggle i{
  margin-right: none;
}
.menu-toggle:hover {
  color: var(--accent-color);
}

nav {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

nav ul {
  list-style: none;
  padding: 1rem 0;
  flex-grow: 1;
}

nav li {
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  margin-bottom: 0.25rem;
}

nav li:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

nav li.active {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: var(--accent-color);
}

nav li i {
  font-size: 1.25rem;
  margin-right: 0.75rem;
  width: 1.5rem;
  text-align: center;
}

.footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: var(--text-light);
  text-align: center;
  margin-top: auto;
}

/* Content Area */
.content {
  margin-top: 70px;
  flex: 1;
  margin-left: 280px;
  padding: 1.5rem;
  background-color: var(--bg-primary);
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

/* Page Styles */
.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.header-icon {
  width: 3rem;
  height: 3rem;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}

.header-icon i {
  font-size: 1.5rem;
}

.header-text h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.header-text p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.card h3 i {
  margin-right: 0.5rem;
  color: var(--accent-color);
}

.results-card {
  background-color: var(--bg-secondary);
}

/* Input Elements */
.input-container {
  margin-bottom: 1rem;
}

textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  transition: var(--transition);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(114, 9, 183, 0.3);
}

textarea[readonly] {
  background-color: rgba(0, 0, 0, 0.2);
  cursor: default;
}

input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  transition: var(--transition);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(114, 9, 183, 0.3);
}

select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

/* Buttons */
.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn {
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border: none;
}

.btn i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

.btn.primary {
  background-color: var(--primary-color);
  color: white;
}

.btn.primary:hover {
  background-color: var(--primary-hover);
}

.btn.secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

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

.btn.icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
}

.btn.icon-btn i {
  margin-right: 0;
}

/* Stats Banner */
.stats-banner {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  flex: 1;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.stat-item i {
  font-size: 1.5rem;
  margin-right: 1rem;
  color: var(--accent-color);
}

.stat-info h4 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

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

/* Stats Container */
.stats-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-box {
  flex: 1;
  background-color: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.stat-box i {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.stat-box h4 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

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

/* Results Container */
.results-container {
  margin-bottom: 1.5rem;
}

.result-box {
  margin-bottom: 1rem;
}

.output-container {
  margin-top: 1rem;
}

.output-container button {
  margin-top: 0.5rem;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

.badge.success {
  background-color: rgba(76, 201, 240, 0.2);
  color: #4cc9f0;
}

.badge.danger {
  background-color: rgba(249, 65, 68, 0.2);
  color: #f94144;
}

/* Table Styles */
.results-table {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 1.5rem;
}

.table-header {
  display: flex;
  background-color: var(--bg-secondary);
  font-weight: 600;
  font-size: 0.875rem;
}

.table-row {
  display: flex;
  border-top: 1px solid var(--border-color);
}

.col {
  padding: 0.75rem 1rem;
  flex: 1;
}

/* Tabs */
.results-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.tab-btn {
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.tab-btn.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Duplicates List */
.duplicates-list {
  margin-top: 1rem;
}

.duplicate-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.duplicate-item:last-child {
  border-bottom: none;
}

.item-value {
  font-weight: 500;
}

.item-count {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Search Container */
.search-container {
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.search-input {
  flex: 1;
  position: relative;
}

.search-input i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.search-input input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.filter-options {
  display: flex;
  gap: 0.75rem;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Spinner style */
#teradl_loader .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top: 4px solid #6008a0;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Optional: Make sure the loader is centered */
#teradl_loader {
  display: none;
  justify-content: center;
  margin-bottom: 20px;
}
/* Extensions Grid */
.extensions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.extension-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

.extension-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.extension-header {
  position: relative;
  padding: 1.5rem;
  background-color: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
}

.extension-icon {
  width: 3.5rem;
  height: 3.5rem;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.extension-icon i {
  font-size: 1.75rem;
}

.extension-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background-color: var(--accent-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

.extension-info {
  padding: 1.5rem;
  flex-grow: 1;
}

.extension-info h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.extension-info p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.extension-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.extension-meta i {
  color: var(--accent-color);
  margin-right: 0.25rem;
}

.extension-actions {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }
  
  .content {
    margin-left: 240px;
  }
  
  .extensions-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 240px;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .content {
    margin-left: 0;
  }

  .stats-banner, .stats-container {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .search-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .extensions-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 1rem;
  }
  
  .actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-icon {
    margin-bottom: 0.5rem;
  }
}