@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;600;700&display=swap');

/* CSS Variables for Theming */
:root[data-theme="dark"] {
  --bg-color: #2a2a72;
  --card-bg: #4c2885;
  --input-bg: #4c2885;
  --text-color: #fff;
  --text-secondary: #eee;
  --text-muted: #bbb;
  --accent-color: #b794f6;
  --border-color: #2a2a72;
  --shadow: rgba(0, 0, 0, 0.3);
  --gradient-start: #4c2885;
  --gradient-end: #2a2a72;
}

:root[data-theme="light"] {
  --bg-color: #f5f7fa;
  --card-bg: #ffffff;
  --input-bg: #f0f3f7;
  --text-color: #2c3e50;
  --text-secondary: #34495e;
  --text-muted: #7f8c8d;
  --accent-color: #6c5ce7;
  --border-color: #e1e8ed;
  --shadow: rgba(149, 157, 165, 0.2);
  --gradient-start: #6c5ce7;
  --gradient-end: #a29bfe;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Poppins', sans-serif;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navbar */
.navbar {
  background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
  padding: 1rem 0;
  box-shadow: 0 2px 20px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.github-icon {
  color: #fff;
  transition: transform 0.3s ease, color 0.3s ease;
}

.github-icon:hover {
  transform: rotate(360deg);
  color: rgba(255, 255, 255, 0.8);
}

.brand-text {
  background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

.navbar-menu li a {
  color: #fff;
  text-decoration: none;
  font-weight: 400;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  display: block;
}

.navbar-menu li a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  transition: width 0.3s ease;
}

.navbar-menu li a:hover::before,
.navbar-menu li a.active::before {
  width: 80%;
}

.navbar-menu li a:hover,
.navbar-menu li a.active {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Theme Toggle */
.theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.theme-toggle svg {
  stroke-width: 2;
}

.sun-icon, .moon-icon {
  display: block;
}

/* Content Wrapper */
.content-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
  min-height: calc(100vh - 100px);
}

/* Sections */
.section {
  display: none;
  animation: fadeIn 0.5s ease;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header h2 {
  font-size: 2rem;
  margin: 0;
  color: var(--text-color);
}

/* Search Container */
.search-container {
  max-width: 700px;
  margin: 0 auto 2rem;
}

.user-form {
  width: 100%;
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.user-form input[type="text"] {
  flex: 1;
  background-color: var(--input-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-color);
  padding: 1rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  box-shadow: 0 2px 10px var(--shadow);
  transition: all 0.3s ease;
}

.user-form input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 4px 20px var(--shadow);
}

.user-form input::placeholder {
  color: var(--text-muted);
}

.filter-toggle {
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.filter-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

/* Filters */
.filters {
  display: none;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px var(--shadow);
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.filters.show {
  display: grid;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-group input {
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  padding: 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
}

.filter-group input:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* Search History */
.search-history {
  margin-top: 1rem;
}

.history-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.history-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.history-item {
  background: var(--card-bg);
  color: var(--text-color);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.history-item:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
}

/* User Card */
.card {
  max-width: 900px;
  width: 100%;
  background-color: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 5px 30px var(--shadow);
  display: flex;
  padding: 2.5rem;
  margin: 0 auto;
  position: relative;
  transition: all 0.3s ease;
}

.card.error {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem;
}

.avatar {
  border-radius: 50%;
  border: 5px solid var(--border-color);
  height: 150px;
  width: 150px;
  object-fit: cover;
}

.favorite-btn {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  color: var(--text-color);
  font-size: 1.5rem;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.favorite-btn:hover {
  transform: scale(1.1);
  border-color: var(--accent-color);
}

.favorite-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.user-info {
  color: var(--text-secondary);
  margin-left: 2rem;
  flex: 1;
}

.user-info h2 {
  margin-top: 0;
  color: var(--text-color);
  font-size: 1.8rem;
}

.user-info p {
  margin: 0.5rem 0;
  color: var(--text-secondary);
}

.user-info a {
  color: var(--accent-color);
  text-decoration: none;
}

.user-info a:hover {
  text-decoration: underline;
}

.user-info ul {
  list-style-type: none;
  display: flex;
  gap: 2rem;
  padding: 1rem 0;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.user-info ul li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 1.2rem;
  color: var(--text-color);
}

.user-info ul li strong {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Charts */
.charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.chart-wrapper {
  background: rgba(0, 0, 0, 0.1);
  padding: 1rem;
  border-radius: 12px;
}

/* Repositories */
#repos h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.repo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #ffffff !important;
  background-color: var(--accent-color);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  margin-right: 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-weight: 500;
}

.repo:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
  background-color: #8b7ac7;
}

.repo-name {
  font-weight: 600;
  color: #ffffff !important;
}

.repo-stars {
  font-size: 0.75rem;
  opacity: 1;
  color: #ffffff !important;
}

/* Trending Section */
.trending-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.trending-filters select {
  background: var(--card-bg);
  color: var(--text-color);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

.trending-filters select:focus {
  outline: none;
  border-color: var(--accent-color);
}

.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.trending-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 3px 15px var(--shadow);
  transition: all 0.3s ease;
}

.trending-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow);
}

.trending-card h3 {
  margin: 0 0 0.5rem 0;
  color: var(--text-color);
  font-size: 1.2rem;
}

.trending-card .owner {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
}

.trending-card .description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trending-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.trending-stats span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.trending-stats .language {
  background: var(--accent-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
}

/* Compare Section */
.compare-container {
  max-width: 1200px;
  margin: 0 auto;
}

.compare-input {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.compare-input input {
  flex: 1;
  min-width: 200px;
  background-color: var(--input-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-color);
  padding: 1rem;
  font-family: inherit;
  font-size: 1rem;
}

.compare-input input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.compare-input .vs {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
}

.compare-user {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 3px 15px var(--shadow);
}

.compare-user img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--border-color);
  display: block;
  margin: 0 auto 1rem;
}

.compare-user h3 {
  text-align: center;
  margin: 0 0 1.5rem 0;
  color: var(--text-color);
}

.compare-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.compare-stat {
  background: rgba(0, 0, 0, 0.1);
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.compare-stat.winner {
  background: var(--accent-color);
  color: white;
  transform: scale(1.02);
}

.compare-stat .label {
  font-weight: 600;
  font-size: 0.9rem;
}

.compare-stat .value {
  font-size: 1.2rem;
  font-weight: 700;
}

.compare-divider {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
  align-self: center;
}

/* Favorites Section */
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.favorite-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 3px 15px var(--shadow);
  transition: all 0.3s ease;
}

.favorite-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow);
}

.favorite-card img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  margin-bottom: 1rem;
}

.favorite-card h4 {
  margin: 0.5rem 0 1rem 0;
  color: var(--text-color);
}

.favorite-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-remove {
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

.btn-secondary {
  background: var(--input-bg);
  color: var(--text-color);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.btn-remove {
  background: #e74c3c;
  color: white;
}

.btn-remove:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: var(--card-bg);
  margin: 5% auto;
  padding: 2rem;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s ease;
  color: var(--text-color);
}

@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.close {
  color: var(--text-muted);
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: var(--text-color);
}

#repoDetails h2 {
  margin-top: 0;
  color: var(--text-color);
}

#repoDetails p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.repo-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat {
  background: rgba(0, 0, 0, 0.1);
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
}

/* Responsive */
@media (max-width: 1024px) {
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .compare-divider {
    transform: rotate(90deg);
    margin: 1rem 0;
  }
}

@media (max-width: 768px) {
  .navbar-container {
    padding: 0 1rem;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .brand-text {
    display: none;
  }

  .navbar-menu {
    gap: 0.5rem;
  }

  .navbar-menu li a {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .content-wrapper {
    padding: 1rem 0.5rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .card {
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
  }

  .user-info {
    margin-left: 0;
    margin-top: 1.5rem;
    text-align: center;
  }

  .user-info ul {
    justify-content: center;
  }

  .charts-container {
    grid-template-columns: 1fr;
  }

  .trending-grid {
    grid-template-columns: 1fr;
  }

  .favorites-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .compare-input {
    flex-direction: column;
    width: 100%;
  }

  .compare-input input {
    width: 100%;
  }
}

@media (max-width: 500px) {
  .navbar-menu {
    gap: 0.25rem;
  }

  .navbar-menu li a {
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
  }

  .theme-toggle {
    padding: 0.4rem;
  }

  .user-form {
    flex-direction: column;
  }

  .filter-toggle {
    width: 100%;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .avatar {
    height: 120px;
    width: 120px;
  }

  .modal-content {
    width: 95%;
    padding: 1.5rem;
  }
}

/* ===================================== */
/* EXTENDED FEATURES STYLES */
/* ===================================== */

/* Repository Search */
.repo-search-container {
  max-width: 1200px;
  margin: 0 auto;
}

.repo-search-form {
  margin-bottom: 2rem;
}

.repo-search-form input[type="text"] {
  width: 100%;
  background-color: var(--input-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-color);
  padding: 1rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.repo-search-form input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-color);
}

.repo-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.repo-filters select,
.repo-filters input[type="number"] {
  background: var(--card-bg);
  color: var(--text-color);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: inherit;
  flex: 1;
  min-width: 150px;
}

.repo-filters select:focus,
.repo-filters input[type="number"]:focus {
  outline: none;
  border-color: var(--accent-color);
}

.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.repo-result-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 3px 15px var(--shadow);
  transition: all 0.3s ease;
}

.repo-result-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow);
}

.repo-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.75rem;
}

.repo-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.repo-header a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.repo-header a:hover {
  color: var(--accent-color);
}

.fork-badge {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.repo-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0.75rem 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.language-tag {
  background: var(--accent-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.repo-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.topic-tag {
  background: rgba(0, 123, 255, 0.1);
  color: #007bff;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
}

.repo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.repo-footer .updated {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

/* Organization Styles */
.org-search-container {
  max-width: 1200px;
  margin: 0 auto;
}

.org-search-form {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.org-search-form input {
  flex: 1;
  background-color: var(--input-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-color);
  padding: 1rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
}

.org-search-form input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.org-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 5px 30px var(--shadow);
}

.org-header {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: start;
}

.org-avatar {
  width: 150px;
  height: 150px;
  border-radius: 20px;
  border: 4px solid var(--border-color);
}

.org-info {
  flex: 1;
}

.org-info h2 {
  margin: 0 0 0.5rem 0;
  color: var(--text-color);
}

.org-login {
  color: var(--text-muted);
  margin: 0;
}

.org-bio {
  color: var(--text-secondary);
  margin: 1rem 0;
  line-height: 1.6;
}

.org-stats {
  display: flex;
  gap: 2rem;
  margin: 1.5rem 0;
}

.stat-box {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.org-section {
  margin-top: 2rem;
}

.org-section h3 {
  color: var(--text-color);
  margin-bottom: 1rem;
}

.org-repos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.org-repo-card {
  background: rgba(0, 0, 0, 0.1);
  padding: 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.org-repo-card:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.org-repo-card h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

.org-repo-card a {
  color: var(--text-color);
  text-decoration: none;
}

.org-repo-card a:hover {
  color: var(--accent-color);
}

.org-repo-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.5rem 0;
  line-height: 1.4;
}

.repo-stats-mini {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

.repo-stats-mini .lang {
  background: var(--accent-color);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
}

.org-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

.member-card {
  text-align: center;
  cursor: pointer;
  padding: 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.member-card:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}

.member-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 0.5rem;
}

.member-card span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-color);
}

.org-actions {
  margin-top: 2rem;
  text-align: center;
}

/* Gist Styles */
.gist-search-container {
  max-width: 1200px;
  margin: 0 auto;
}

.gist-search-form {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.gist-search-form input {
  flex: 1;
  background-color: var(--input-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-color);
  padding: 1rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
}

.gist-search-form input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.gists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.gist-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 3px 15px var(--shadow);
  cursor: pointer;
  transition: all 0.3s ease;
}

.gist-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow);
}

.gist-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.gist-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-color);
}

.public-badge {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.private-badge {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.gist-files {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.gist-file {
  background: rgba(0, 0, 0, 0.1);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.more-files {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

.gist-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.gist-file-details {
  margin-bottom: 2rem;
}

.file-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.file-header h4 {
  margin: 0;
  color: var(--text-color);
}

.file-size {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.code-preview {
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0.5rem 0 1rem 0;
}

.code-preview code {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--text-color);
  line-height: 1.6;
}

.gist-info {
  background: rgba(0, 0, 0, 0.1);
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.gist-info p {
  margin: 0.5rem 0;
  color: var(--text-secondary);
}

/* Batch Analysis */
.batch-container {
  max-width: 1400px;
  margin: 0 auto;
}

.batch-input-area {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.batch-input-area textarea {
  flex: 1;
  min-height: 150px;
  background-color: var(--input-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-color);
  padding: 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.batch-input-area textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

.batch-summary {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 3px 15px var(--shadow);
}

.batch-summary h3 {
  margin: 0 0 1rem 0;
  color: var(--text-color);
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}

.summary-stat {
  text-align: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

.summary-stat .label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.summary-stat .value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
}

.batch-table-container {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 3px 15px var(--shadow);
  overflow-x: auto;
}

.batch-table {
  width: 100%;
  border-collapse: collapse;
}

.batch-table thead {
  background: rgba(0, 0, 0, 0.2);
}

.batch-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-color);
  border-bottom: 2px solid var(--border-color);
}

.batch-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.batch-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.05);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mini-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.star-count {
  color: #FFD700;
}

.batch-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.batch-chart-container {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 3px 15px var(--shadow);
}

/* Modal Extensions */
.modal-large {
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.loading::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* Responsive for new features */
@media (max-width: 768px) {
  .repo-grid {
    grid-template-columns: 1fr;
  }
  
  .org-header {
    flex-direction: column;
    text-align: center;
  }
  
  .org-avatar {
    width: 120px;
    height: 120px;
  }
  
  .gists-grid {
    grid-template-columns: 1fr;
  }
  
  .batch-input-area {
    flex-direction: column;
  }
  
  .batch-charts {
    grid-template-columns: 1fr;
  }
  
  .batch-table {
    font-size: 0.85rem;
  }
  
  .batch-table th,
  .batch-table td {
    padding: 0.5rem;
  }
}
