/* General body styles */
* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #2c3e50;
  color: #ecf0f1;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Container styles */
.container {
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

/* Profile Section */
.profile-section {
  display: flex;
  align-items: center;
  background-color: #34495e;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
}

.profile-image img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin-right: 20px;
}

.profile-info {
  flex-grow: 1;
}

.profile-info h1 {
  color: #1abc9c;
  font-size: 2em;
  margin: 0;
}

.profile-info h2 {
  color: #ecf0f1;
  font-size: 1.2em;
  margin: 5px 0 15px;
}

.profile-info p {
  color: #bdc3c7;
  line-height: 1.5em;
  font-size: 1em;
}

/* Row for columns */
.row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Card styles */
.card {
  background: #34495e;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Sticky Section Headers */
.card h2 {
  color: #1abc9c;
  font-size: 1.6em;
  margin-bottom: 15px;
  border-bottom: 2px solid #1abc9c;
  padding-bottom: 5px;
  position: sticky;
  top: 0;
  background-color: #34495e;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
}

/* Load More button */
.load-more-btn {
  display: inline-block;
  padding: 10px 20px;
  margin-top: 10px;
  background-color: #1abc9c;
  color: #ecf0f1;
  text-align: center;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
}

.load-more-btn:hover {
  background-color: #16a085;
  transform: scale(1.05);
}

.load-more-btn:active {
  background-color: #148f77;
  transform: scale(0.98);
}

.load-more-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.5);
}

/* Filter Container */
.filter-container {
  display: flex;
  justify-content: flex-end;
  position: relative;
  margin-bottom: 15px;
}

.filter-icon {
  background-color: #1abc9c;
  color: #ecf0f1;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  text-align: center;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
  font-size: 1.2em;
  width: 40px;
  height: 40px;
}

.filter-icon:hover {
  background-color: #16a085;
  transform: rotate(90deg);
}

.filters {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 50px;
  right: 0;
  background-color: #2c3e50;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

.filters select {
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #1abc9c;
  background-color: #34495e;
  color: #ecf0f1;
  margin-bottom: 10px;
  transition: background-color 0.3s ease;
}

.filters select:hover {
  background-color: #1abc9c;
}

.search-button {
  background-color: #1abc9c;
  color: #ecf0f1;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  border: none;
  width: 100%;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.search-button:hover {
  background-color: #16a085;
  transform: scale(1.05);
}

/* Generic card list for repos, updates, etc. */
.card-list {
  flex-grow: 1;
  overflow-y: auto;
}

/* Repository card styles */
.repository-card {
  display: flex;
  flex-direction: column;
  background-color: #2c3e50;
  border: 1px solid #444;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s forwards;
}

.repository-card:hover {
  background-color: #34495e;
  border-color: #1abc9c;
  transform: translateY(-5px);
}

.repository-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.repository-header h3 {
  margin: 0;
  color: #1abc9c;
  font-size: 1.2em;
}

.repository-header a {
  text-decoration: none;
  font-size: 0.9em;
  color: #1abc9c;
  background-color: #1abc9c1a;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.repository-header a:hover {
  background-color: #1abc9c33;
}

.repository-description p {
  color: #bdc3c7;
  font-size: 0.9em;
  line-height: 1.4;
  margin: 0;
}

.repository-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  font-size: 0.9em;
  color: #bdc3c7;
}

.repository-footer .language,
.repository-footer .stars {
  display: flex;
  align-items: center;
}

.repository-footer i {
  margin-right: 5px;
  color: #1abc9c;
}

/* Timeline container */
.timeline {
  position: relative;
  padding: 20px 0;
  margin-top: 20px;
  border-left: 2px solid #1abc9c;
}

/* Timeline item */
.timeline-item {
  position: relative;
  background-color: #34495e;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  margin-left: 20px;
  transition: background-color 0.3s ease, transform 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.timeline-item:hover {
  background-color: #1abc9c;
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.timeline-item:hover h3 {
  color: #2c3e50;
}

.timeline-item:hover p,
.timeline-item:hover .timeline-date {
  color: #34495e;
}

/* Timeline icon */
.timeline-icon {
  position: absolute;
  left: -12px;
  top: 15px;
  width: 24px;
  height: 24px;
  background-color: #1abc9c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ecf0f1;
  font-size: 12px;
  z-index: 3;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.timeline-item h3,
.timeline-item p {
  margin: 0;
  color: #ecf0f1;
  font-size: 1em;
  transition: color 0.3s ease;
}

.timeline-item p {
  color: #bdc3c7;
  margin-top: 5px;
}

.timeline-date {
  display: block;
  font-size: 0.8em;
  color: #bdc3c7;
  margin-top: 10px;
  transition: color 0.3s ease;
}

.timeline-item h3 {
  color: #1abc9c;
  font-weight: bold;
  font-size: 1.1em;
}

.timeline-content {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s forwards;
}

/* Statistics Section */
#statistics-section .card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Key Metrics styles */
.key-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  width: 100%;
  margin-bottom: 20px;
}

.metric-card {
  background-color: #2c3e50;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.metric-card i {
  font-size: 1.5em;
  color: #1abc9c;
  margin-bottom: 10px;
}

.metric-card h4 {
  margin: 0;
  font-size: 1.8em;
  color: #ecf0f1;
}

.metric-card p {
  margin: 5px 0 0;
  font-size: 0.9em;
  color: #bdc3c7;
}

#languageChart {
  max-width: 100%;
  height: auto;
  background-color: transparent;
}

/* Pub.dev Section styles */
.pub-package-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.pub-package-card {
  background-color: #2c3e50;
  border: 1px solid #444;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.pub-package-card:hover {
  background-color: #34495e;
  border-color: #1abc9c;
  transform: translateY(-5px);
}

.pub-package-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.pub-package-header h3 {
  margin: 0;
  color: #1abc9c;
  font-size: 1.2em;
}

.pub-package-header .version {
  font-size: 0.9em;
  background-color: #1abc9c1a;
  color: #1abc9c;
  padding: 3px 8px;
  border-radius: 5px;
}

.pub-package-description p {
  color: #bdc3c7;
  font-size: 0.9em;
  line-height: 1.4;
  margin: 0;
}

.pub-package-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 15px;
  text-align: center;
  font-size: 0.9em;
}

.pub-package-footer .stat {
  color: #bdc3c7;
}

.pub-package-footer .stat strong {
  display: block;
  font-size: 1.2em;
  color: #ecf0f1;
  margin-bottom: 3px;
}

.pub-package-footer .stat i {
  color: #1abc9c;
  margin-right: 5px;
}

/* Animation for fade-in effect */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === RESPONSIVENESS === */
@media (max-width: 1024px) {
  .row {
    grid-template-columns: 1fr 1fr;
  }

  .key-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .profile-section {
    flex-direction: column;
    text-align: center;
  }

  .profile-image img {
    margin-right: 0;
    margin-bottom: 15px;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .key-metrics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  .profile-section {
    padding: 15px;
  }

  .profile-info h1 {
    font-size: 1.8em;
  }

  .profile-info p {
    font-size: 0.95em;
  }

  .card {
    padding: 15px;
  }

  .card h2 {
    font-size: 1.4em;
  }

  .pub-package-footer {
    grid-template-columns: 1fr;
  }
}
