/* 데스크탑 전용 고정 레이아웃 CSS + 수상 뱃지 + 마우스 옆 툴팁 + 정렬 강조 */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background-color: #f4f4f4;
  font-family: 'Noto Sans KR', sans-serif;
  color: #333;
}

header {
  background-color: #2C3E50;
  color: white;
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  font-family: 'Sunflower', sans-serif;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1001;
}

aside {
  background-color: #34495E;
  width: 100%;
  position: fixed;
  top: 80px;
  left: 0;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px;
  z-index: 1000;
}

.menu {
  background-color: #2C3E50;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-right: 10px;
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 16px;
}
.menu:hover, .selected {
  background-color: #ECF0F1;
  color: #2C3E50;
}

section {
  padding: 160px 20px 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 20px;
}

.card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  width: 300px;
  aspect-ratio: 3 / 4.2;
  padding: 20px;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  border: 3px solid transparent;
}
.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.name {
  font-size: 22px;
  font-weight: bold;
  margin: 10px 0;
  font-family: 'Sunflower', sans-serif;
}

.platform, .maker {
  font-size: 14px;
  color: #666;
  margin: 4px 0;
}

.cafe, .download {
  margin-top: 10px;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  color: white;
  background-color: #2980B9;
  transition: background-color 0.3s ease;
}

.download {
  background-color: #E67E22;
}
.download:hover, .cafe:hover {
  background-color: #1ABC9C;
}

footer {
  padding: 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

aside ul {
  display: flex;
  flex-direction: row;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 수상 뱃지 + 테두리 색 + JS 툴팁 제거용 */
.card::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  font-size: 30px;
}

.card.rank-first {
  border-color: gold;
}
.card.rank-first::before {
  content: '🥇';
}

.card.rank-second {
  border-color: silver;
}
.card.rank-second::before {
  content: '🥈';
}

.card.rank-third {
  border-color: #cd7f32;
}
.card.rank-third::before {
  content: '🥉';
}

.card.rank-special {
  border-color: #4caf50;
}
.card.rank-special::before {
  content: '🎖️';
}

.card.rank-external {
  border-color: #2196f3;
}
.card.rank-external::before {
  content: '🌟';
}

#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 8px solid #f3f3f3;
  border-top: 8px solid #2C3E50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  header {
    font-size: 24px;
    padding: 15px 0;
  }
  aside {
    top: 60px; /* Adjusted for new header height */
  }
  section {
    padding-top: 124px; /* Adjusted for new header and aside height */
  }
  .card {
    width: 150px;
    padding: 10px;
    border-radius: 10px;
  }
  .card .cafe, .card .download {
    font-size: 10px;
    padding: 5px 8px;
    margin-top: 5px;
    border-radius: 4px;
  }
  .card .name {
    font-size: 14px;
    margin: 5px 0;
  }
  .card .platform, .card .maker {
    font-size: 10px;
    margin: 2px 0;
  }
  .card img {
    height: 90px;
    margin-bottom: 8px;
    border-radius: 5px;
  }
}
