.termgame-container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
  color: white;
  padding: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}

.header .subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

.month-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  position: relative;
  z-index: 2;
}

.month-selector button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.month-selector button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.current-month {
  font-size: 1.2rem;
  font-weight: 600;
}

.countdown-timer {
  margin-top: 15px;
  background: rgba(255, 255, 255, 0.15);
  padding: 12px 20px;
  border-radius: 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.countdown-timer i {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.ranking-list {
  padding: 0;
}

.rank-item {
  display: flex;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #eee;
  transition: all 0.3s ease;
  position: relative;
}

.rank-item:hover {
  background: var(--light-red);
  transform: translateX(5px);
}

.rank-item.top-3 {
  background: linear-gradient(135deg, #fff9e6, #fff4d6);
  border-left: 5px solid var(--accent-gold);
}

.rank-item.current-user {
  background: linear-gradient(135deg, var(--light-red), #ffe6e9);
  border-left: 5px solid var(--primary-red);
  box-shadow: 0 5px 15px rgba(212, 0, 26, 0.2);
}

.rank-number {
  font-size: 1.5rem;
  font-weight: 700;
  width: 60px;
  text-align: center;
  position: relative;
}

.rank-1 {
  color: #ffd700;
}
.rank-2 {
  color: #c0c0c0;
}
.rank-3 {
  color: #cd7f32;
}

.trophy {
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 0.8rem;
}

.user-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: 20px;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
}

.user-details h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 5px;
}

.user-id {
  font-size: 0.9rem;
  color: #666;
}

.amount {
  text-align: right;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--success-green);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.currency {
  font-size: 0.9rem;
  color: #888;
  margin-top: 2px;
}

.rewards {
  margin-top: 5px;
  display: flex;
  gap: 5px;
}

.reward-badge {
  background: var(--accent-gold);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.current-user-status {
  background: white;
  padding: 25px 30px;
  border-top: 3px solid var(--primary-red);
  text-align: center;
}

.current-user-status h3 {
  color: var(--primary-red);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.user-rank-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--light-red);
  padding: 15px 20px;
  border-radius: 10px;
  margin-top: 10px;
}

.empty-state {
  text-align: center;
  padding: 50px;
  color: #666;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #ccc;
}

/* Reward History Section */
.reward-history-section {
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  border-top: 2px solid #e9ecef;
  position: relative;
}

.reward-history-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-red), var(--accent-gold), var(--primary-red));
}

.reward-history-section h3 {
  color: var(--primary-red);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.reward-history-section h3 i {
  font-size: 1.2rem;
  color: var(--accent-gold);
}

.reward-history-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.reward-history-item {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.reward-history-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-gold);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.reward-history-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-red);
}

.reward-history-item:hover::before {
  transform: scaleY(1);
}

.reward-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.reward-rank {
  background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.reward-rank::before {
  content: "🏆";
  font-size: 0.8rem;
}

.reward-date {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 500;
}

.reward-item-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reward-info h4 {
  color: var(--dark-gray);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.reward-type {
  background: #e3f2fd;
  color: #1976d2;
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

.reward-status {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-processing {
  background: #cce5ff;
  color: #0066cc;
  border: 1px solid #99d6ff;
}

.status-completed {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-cancelled {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Empty State for Reward History */
.reward-history-content .empty-state {
  background: white;
  border: 2px dashed #e9ecef;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  color: #6c757d;
}

.reward-history-content .empty-state i {
  font-size: 3rem;
  color: var(--accent-gold);
  margin-bottom: 15px;
}

.reward-history-content .empty-state h4 {
  color: var(--dark-gray);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
  overflow: hidden;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
  color: white;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.close {
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modal-body {
  padding: 25px;
}

.reward-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.reward-detail-item:last-child {
  border-bottom: none;
}

.reward-detail-label {
  font-weight: 600;
  color: var(--dark-gray);
  flex: 1;
}

.reward-detail-value {
  flex: 1;
  text-align: right;
  color: #666;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .termgame-container {
    margin: 10px;
    border-radius: 15px;
  }

  .header {
    padding: 20px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .rank-item {
    padding: 15px 20px;
  }

  .user-info {
    margin-left: 10px;
    gap: 10px;
  }

  .avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .amount {
    font-size: 1.1rem;
  }

  .reward-history-section {
    padding: 20px !important;
  }

  .reward-history-item {
    padding: 15px;
  }

  .reward-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .reward-item-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
  }

  .modal-header {
    padding: 15px 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .reward-detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .reward-detail-value {
    text-align: left;
  }
}