/* Profile Page */
#profile-container {
  display: none;
  flex-direction: column;
  gap: 20px;
}

#profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background-color: var(--container-background);
  border-radius: 12px;
  box-shadow: 0 5px 15px var(--shadow-color);
}

#back-to-main-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#back-to-main-btn:hover {
  background-color: #f0f2f5;
  border-color: #ccc;
}

#profile-header h1 {
  margin: 0;
  font-size: 1.8rem;
}

#profile-overview {
  text-align: center;
  background-color: var(--container-background);
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 5px 15px var(--shadow-color);
}

#profile-stats {
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.stat .stat-value {
  font-size: 2rem;
  font-weight: 500;
  color: var(--primary-color);
  display: block;
}

.stat .stat-label {
  font-size: 0.9rem;
  color: var(--subtle-text-color);
}

#profile-games-list {
  position: relative;
  text-align: center;
  background-color: var(--container-background);
  padding: 30px;
  padding-bottom: 60px;
  border-radius: 12px;
  box-shadow: 0 5px 15px var(--shadow-color);
}

#profile-checkins-heading {
  text-align: center;
  margin-bottom: 20px;
}

#profile-checkins-section {
  background-color: var(--container-background);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px var(--shadow-color);
}

#checkin-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group label {
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.9rem;
}

#checkin-filters select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  background-color: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 16px 12px;
  padding-right: 2rem; /* Make space for the arrow */
}

#checkin-filters select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--glow-color);
  outline: none;
}

#games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px;
  transition: max-height 0.5s ease-out;
  overflow: hidden;
  position: relative;
}

#games-grid.collapsed {
  max-height: 400px; /* Approx 2 rows */
}

#games-grid.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to top, rgba(255,255,255,1), rgba(255,255,255,0));
    pointer-events: none; /* Allows clicking through the gradient */
}

.show-more-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

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

.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}

.game-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 450px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.game-card .game-title {
  font-size: 0.9rem;
  font-weight: 500;
}