/* ProjectList Styles */

.repository-list {
  padding: 2rem;
  height: 100%;
  overflow-y: auto;
  background: var(--primary-bg);
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1rem;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.add-project-btn {
  background: var(--primary-text);
  color: var(--primary-bg);
  border: 2px solid var(--primary-text);
  padding: 0.8rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.add-project-btn:hover {
  background: transparent;
  color: var(--primary-text);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
  transform: translateY(-2px);
}

.list-title {
  color: var(--primary-text);
  font-size: 2rem;
  font-weight: 900;
  margin: 0;
  text-shadow: 0 0 20px var(--glow-color);
}

.repo-count {
  color: var(--secondary-text);
  font-size: 1.1rem;
  font-weight: 600;
  background: var(--secondary-bg);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.list-controls {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: end;
}

.search-group {
  flex: 1;
  max-width: 400px;
}

.search-input {
  width: 100%;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  color: var(--primary-text);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-text);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.search-input::placeholder {
  color: var(--secondary-text);
  opacity: 0.6;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  color: var(--secondary-text);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-select {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  color: var(--primary-text);
  padding: 0.8rem 1.2rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  min-width: 180px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-text);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.repository-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 2rem;
}

.repository-card {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  animation: repo-card-enter 0.5s ease-out;
}

.repository-card:hover {
  border-color: var(--primary-text);
  box-shadow: 0 0 40px rgba(0, 255, 136, 0.2);
  transform: translateY(-8px);
}

.repo-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.repo-info h3 {
  color: var(--primary-text);
  font-size: 1.4rem;
  font-weight: 900;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 0 15px var(--glow-color);
}

.repo-owner {
  color: var(--secondary-text);
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0;
  opacity: 0.8;
}

.repo-status {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.activity-indicator {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px currentColor;
}

.last-activity {
  color: var(--secondary-text);
  font-size: 0.8rem;
  opacity: 0.7;
}

.repo-description {
  margin-bottom: 1.5rem;
}

.repo-description p {
  color: var(--secondary-text);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  opacity: 0.9;
}

.voting-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary-bg);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.vote-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.vote-count {
  color: var(--primary-text);
  font-size: 1.5rem;
  font-weight: 900;
  text-shadow: 0 0 10px var(--glow-color);
}

.vote-label {
  color: var(--secondary-text);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vote-btn {
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--secondary-text);
  padding: 0.8rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 25px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vote-btn:hover {
  border-color: var(--primary-text);
  color: var(--primary-text);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
  transform: translateY(-2px);
}

.vote-btn.voted {
  background: var(--primary-text);
  color: var(--primary-bg);
  border-color: var(--primary-text);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.vote-btn.voted:hover {
  background: transparent;
  color: var(--primary-text);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

.tech-stack {
  margin-bottom: 1.5rem;
}

.tech-label {
  color: var(--secondary-text);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  background: var(--primary-bg);
  border: 1px solid var(--border-color);
  color: var(--primary-text);
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.tech-tag:hover {
  border-color: var(--primary-text);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.repo-metrics {
  margin-bottom: 1.5rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--primary-bg);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.metric-item:hover {
  border-color: var(--primary-text);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}

.metric-icon {
  font-size: 1.5rem;
  min-width: 30px;
  text-align: center;
}

.metric-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.metric-value {
  color: var(--primary-text);
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 10px var(--glow-color);
}

.metric-label {
  color: var(--secondary-text);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.progress-section {
  margin-bottom: 1.5rem;
  background: var(--primary-bg);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.progress-label {
  color: var(--secondary-text);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.progress-percentage {
  font-size: 1.2rem;
  font-weight: 900;
  text-shadow: 0 0 15px currentColor;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: var(--secondary-bg);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  transition: width 0.8s ease;
  box-shadow: 0 0 15px currentColor;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: progress-shimmer 3s ease-in-out infinite;
}

.repo-actions {
  display: flex;
  gap: 0.8rem;
}

.action-btn {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--secondary-text);
  padding: 0.8rem 1rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.action-btn:hover {
  border-color: var(--primary-text);
  color: var(--primary-text);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.action-btn.primary {
  background: var(--primary-text);
  color: var(--primary-bg);
  border-color: var(--primary-text);
}

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

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--secondary-text);
}

.empty-state h3 {
  color: var(--primary-text);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px var(--glow-color);
}

.empty-state p {
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.8;
  max-width: 500px;
  margin: 0 auto;
}

/* Animations */
@keyframes repo-card-enter {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes progress-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .repository-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
  }
  
  .list-controls {
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .repository-list {
    padding: 1rem;
  }
  
  .list-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .header-left {
    width: 100%;
  }
  
  .add-project-btn {
    width: 100%;
    justify-content: center;
  }
  
  .list-controls {
    flex-direction: column;
    gap: 1rem;
  }
  
  .search-group {
    max-width: none;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .filter-select {
    width: 100%;
    min-width: auto;
  }
  
  .repository-grid {
    grid-template-columns: 1fr;
  }
  
  .repo-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .repo-status {
    text-align: left;
  }
  
  .metric-grid {
    grid-template-columns: 1fr;
  }
  
  .repo-actions {
    flex-direction: column;
  }

  .voting-section {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .vote-btn {
    width: 100%;
  }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--secondary-bg);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 40px rgba(0, 255, 136, 0.3);
  animation: modal-enter 0.3s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  color: var(--primary-text);
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0;
  text-shadow: 0 0 15px var(--glow-color);
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--secondary-text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.close-btn:hover {
  background: var(--primary-bg);
  color: var(--primary-text);
  transform: rotate(90deg);
}

.add-project-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  color: var(--primary-text);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.github-input {
  background: var(--primary-bg);
  border: 2px solid var(--border-color);
  color: var(--primary-text);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.github-input:focus {
  outline: none;
  border-color: var(--primary-text);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.github-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.github-input::placeholder {
  color: var(--secondary-text);
  opacity: 0.7;
}

.form-hint {
  color: var(--secondary-text);
  font-size: 0.9rem;
  opacity: 0.8;
  font-style: italic;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.cancel-btn, .submit-btn {
  padding: 0.8rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 120px;
}

.cancel-btn {
  background: transparent;
  border: 2px solid var(--border-color);
  color: var(--secondary-text);
}

.cancel-btn:hover {
  border-color: var(--secondary-text);
  color: var(--primary-text);
}

.cancel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.submit-btn {
  background: var(--primary-text);
  color: var(--primary-bg);
  border: 2px solid var(--primary-text);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.submit-btn:hover:not(:disabled) {
  background: transparent;
  color: var(--primary-text);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Modal Animation */
@keyframes modal-enter {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 480px) {
  .repository-card {
    padding: 1.5rem;
  }
  
  .list-title {
    font-size: 1.5rem;
  }
  
  .repo-count {
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
  }
  
  .repo-info h3 {
    font-size: 1.2rem;
  }
  
  .progress-section {
    padding: 1rem;
  }
  
  .action-btn {
    padding: 0.6rem 0.8rem;
    font-size: 0.75rem;
  }
  
  .tech-tags {
    gap: 0.3rem;
  }
  
  .tech-tag {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }
  
  .modal-content {
    padding: 1.5rem;
    margin: 0.5rem;
  }
  
  .modal-header {
    margin-bottom: 1.5rem;
  }
  
  .modal-header h3 {
    font-size: 1.3rem;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .cancel-btn, .submit-btn {
    width: 100%;
    padding: 1rem;
  }
}