/* ============================================
   KrazzFM Charts - Spotify-inspired Design
   ============================================ */

/* Container */
.charts-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.charts-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 20px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 10px;
  color: white;
  border: 2px solid #64C900;
}

.charts-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.charts-subtitle {
  font-size: 1.1rem;
  margin: 0;
  opacity: 0.9;
}

.charts-period {
  font-size: 0.95rem;
  margin: 5px 0 0 0;
  opacity: 0.85;
}

/* Controls / Filter */
.charts-controls {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.charts-controls .btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.charts-controls .btn {
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.charts-controls .btn:hover {
  background-color: #64C900;
  color: white;
  border-color: #64C900;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(100, 201, 0, 0.3);
}

/* Charts List */
.charts-list {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Chart Item */
.chart-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  position: relative;
}

.chart-item:last-child {
  border-bottom: none;
}

.chart-item:hover {
  background-color: #f8f9fa;
  transform: translateX(4px);
}

.chart-item:hover .btn-vote {
  opacity: 1;
  transform: scale(1.05);
}

/* Rank (für Top Charts) */
.chart-item-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  margin-right: 20px;
  position: relative;
}

.rank-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #666;
}

.rank-medal {
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 1.2rem;
}

/* Item Info */
.chart-item-info {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.chart-item-cover {
  width: 56px;
  height: 56px;
  min-width: 56px;
  background: linear-gradient(135deg, #64C900 0%, #4a9600 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  box-shadow: 0 4px 8px rgba(100, 201, 0, 0.2);
}

.chart-item-cover i {
  color: white;
  font-size: 24px;
}

.chart-item-details {
  flex: 1;
  min-width: 0;
}

.chart-item-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-item-artist {
  font-size: 0.95rem;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-item-submitter {
  font-size: 0.85rem;
  color: #999;
  margin-top: 4px;
}

.chart-item-submitter i {
  margin-right: 4px;
}

/* Actions */
.chart-item-actions {
  margin-left: 16px;
}

.vote-form {
  margin: 0;
}

.btn-vote {
  background: linear-gradient(135deg, #64C900 0%, #4a9600 100%);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(100, 201, 0, 0.3);
  font-size: 0.95rem;
}

.btn-vote:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(100, 201, 0, 0.4);
}

.btn-vote:active {
  transform: translateY(0);
}

.btn-vote i {
  margin-right: 6px;
}

/* Votes Display */
.chart-item-votes {
  display: flex;
  align-items: center;
  margin-left: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #64C900;
  min-width: 80px;
  justify-content: flex-end;
}

.chart-item-votes i {
  margin-right: 8px;
  color: #64C900;
  font-size: 1.2rem;
}

/* Submit Button */
.charts-submit {
  text-align: center;
  margin-top: 40px;
}

.charts-submit .btn {
  padding: 14px 32px;
  font-size: 1.1rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(100, 201, 0, 0.3);
  transition: all 0.3s ease;
}

.charts-submit .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(100, 201, 0, 0.4);
}

/* Pagination */
.charts-pagination {
  margin-top: 30px;
  text-align: center;
  padding: 20px;
}

.charts-pagination .pagination {
  display: inline-flex;
  gap: 8px;
}

/* Alerts */
.alert {
  border-radius: 10px;
  margin-bottom: 20px;
  padding: 16px 20px;
  border: none;
}

.alert-info {
  background-color: #e3f2fd;
  color: #1976d2;
}

.alert-warning {
  background-color: #fff3e0;
  color: #f57c00;
}

.alert-success {
  background-color: #e8f5e9;
  color: #388e3c;
}

.alert i {
  margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .charts-container {
    padding: 10px;
  }
  
  .charts-title {
    font-size: 1.8rem;
  }
  
  .charts-header {
    padding: 20px 15px;
    margin-bottom: 20px;
  }
  
  .chart-item {
    padding: 12px 15px;
    flex-wrap: wrap;
  }
  
  .chart-item-rank {
    min-width: 40px;
    margin-right: 12px;
  }
  
  .rank-number {
    font-size: 1.2rem;
  }
  
  .chart-item-cover {
    width: 48px;
    height: 48px;
    min-width: 48px;
    margin-right: 12px;
  }
  
  .chart-item-cover i {
    font-size: 20px;
  }
  
  .chart-item-title {
    font-size: 1rem;
  }
  
  .chart-item-artist {
    font-size: 0.9rem;
  }
  
  .chart-item-actions {
    margin-left: 0;
    margin-top: 12px;
    width: 100%;
  }
  
  .btn-vote {
    width: 100%;
    padding: 12px;
  }
  
  .chart-item-votes {
    margin-left: auto;
    min-width: 60px;
  }
  
  .charts-controls .btn-group {
    width: 100%;
  }
  
  .charts-controls .btn {
    flex: 1;
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  .chart-item-title,
  .chart-item-artist {
    max-width: 180px;
  }
  
  .charts-title {
    font-size: 1.5rem;
  }
  
  .charts-controls .btn {
    font-size: 0.85rem;
    padding: 6px 12px;
  }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
  .charts-list {
    background: #1e1e1e;
  }
  
  .chart-item {
    border-bottom-color: #333;
  }
  
  .chart-item:hover {
    background-color: #2a2a2a;
  }
  
  .chart-item-title {
    color: #ffffff;
  }
  
  .chart-item-artist {
    color: #b3b3b3;
  }
  
  .rank-number {
    color: #b3b3b3;
  }
}

/* Animation beim Laden */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chart-item {
  animation: fadeInUp 0.3s ease forwards;
}

.chart-item:nth-child(1) { animation-delay: 0.05s; }
.chart-item:nth-child(2) { animation-delay: 0.1s; }
.chart-item:nth-child(3) { animation-delay: 0.15s; }
.chart-item:nth-child(4) { animation-delay: 0.2s; }
.chart-item:nth-child(5) { animation-delay: 0.25s; }

/* ============================================
   PANEL/SIDEBAR STYLES
   ============================================ */

.charts-panel-wrapper {
  padding: 0;
}

.charts-panel-list {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
}

/* Panel Item */
.chart-panel-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  position: relative;
}

.chart-panel-item:last-child {
  border-bottom: none;
}

.chart-panel-item:hover {
  background-color: #f8f9fa;
  transform: translateX(4px);
}

/* Special styling for top 3 */
.chart-panel-item.rank-gold {
  background: linear-gradient(to right, rgba(255, 215, 0, 0.05), transparent);
}

.chart-panel-item.rank-silver {
  background: linear-gradient(to right, rgba(192, 192, 192, 0.05), transparent);
}

.chart-panel-item.rank-bronze {
  background: linear-gradient(to right, rgba(205, 127, 50, 0.05), transparent);
}

/* Panel Rank */
.chart-panel-rank {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 35px;
  margin-right: 10px;
  position: relative;
}

.chart-panel-rank .rank-number {
  font-size: 1.1rem;
  font-weight: 700;
  color: #666;
  line-height: 1;
}

.chart-panel-rank .rank-medal {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 0.9rem;
}

/* Panel Cover */
.chart-panel-cover {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: linear-gradient(135deg, #64C900 0%, #4a9600 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  box-shadow: 0 2px 6px rgba(100, 201, 0, 0.2);
}

.chart-panel-cover i {
  color: white;
  font-size: 18px;
}

/* Panel Info */
.chart-panel-info {
  flex: 1;
  min-width: 0;
}

.chart-panel-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.chart-panel-artist {
  font-size: 0.8rem;
  color: #64C900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* Panel Votes */
.chart-panel-votes {
  display: flex;
  align-items: center;
  margin-left: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64C900;
  min-width: 40px;
  justify-content: flex-end;
}

.chart-panel-votes i {
  margin-right: 4px;
  color: #64C900;
  font-size: 0.9rem;
}

.chart-panel-votes span {
  font-size: 0.85rem;
}

/* Panel Actions */
.charts-panel-actions {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.charts-panel-actions .btn {
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.charts-panel-actions .btn-primary {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: 1px solid #64C900;
  color: white;
}

.charts-panel-actions .btn-primary:hover {
  background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(100, 201, 0, 0.3);
}

.charts-panel-actions .btn-success {
  background: linear-gradient(135deg, #64C900 0%, #4a9600 100%);
  border: none;
  color: white;
}

.charts-panel-actions .btn-success:hover {
  background: linear-gradient(135deg, #4a9600 0%, #64C900 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(100, 201, 0, 0.4);
}

/* Responsive für Panel */
@media (max-width: 768px) {
  .chart-panel-item {
    padding: 10px 8px;
  }
  
  .chart-panel-rank {
    min-width: 30px;
    margin-right: 8px;
  }
  
  .chart-panel-rank .rank-number {
    font-size: 1rem;
  }
  
  .chart-panel-cover {
    width: 36px;
    height: 36px;
    min-width: 36px;
    margin-right: 10px;
  }
  
  .chart-panel-cover i {
    font-size: 16px;
  }
  
  .chart-panel-title {
    font-size: 0.85rem;
  }
  
  .chart-panel-artist {
    font-size: 0.75rem;
  }
  
  .chart-panel-votes {
    min-width: 35px;
  }
}

/* Dark Mode für Panel */
@media (prefers-color-scheme: dark) {
  .charts-panel-list {
    background: #1e1e1e;
  }
  
  .chart-panel-item {
    border-bottom-color: #333;
  }
  
  .chart-panel-item:hover {
    background-color: #2a2a2a;
  }
  
  .chart-panel-title {
    color: #ffffff;
  }
  
  .chart-panel-artist {
    color: #64C900;
  }
}