/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f4c75 100%);
  color: #ffffff;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.spin-success {
  color: #4CAF50;
  font-weight: 600;
}

.spin-pending {
  color: #ffc107;
  font-weight: 600;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f4c75 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  z-index: 9999;
  transition: opacity 0.5s ease;
  overflow: hidden;
  padding: 60px 20px 80px 20px;
}

/* Remove all coin animations and simplify */
.falling-coins {
  display: none;
}

/* Loading Content */
.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  z-index: 2;
  position: relative;
}

.loading-logo {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
  box-shadow: 0 20px 40px rgba(255, 193, 7, 0.3);
  animation: logo-glow 2s ease-in-out infinite alternate;
  position: relative;
}

.loading-logo::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: linear-gradient(45deg, #ffc107, #ff8f00, #ffc107);
  border-radius: 29px;
  z-index: -1;
  opacity: 0.3;
  animation: rotate-border 3s linear infinite;
}

.loading-wheel {
  font-size: 50px;
  color: #ffffff;
  animation: none;
  text-shadow: none;
}

.loading-content h2 {
  font-size: 32px;
  margin-bottom: 12px;
  color: #ffffff;
  text-shadow: none;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.loading-text {
  font-size: 16px;
  color: #cccccc;
  margin-bottom: 0;
  animation: none;
  font-weight: 400;
}

/* Bottom loading indicator */
.loading-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 300px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 193, 7, 0.2);
  border-top: 3px solid #ffc107;
  border-radius: 50%;
  animation: spin-loader 1s linear infinite;
}

@keyframes logo-glow {
  0% {
    box-shadow: 0 20px 40px rgba(255, 193, 7, 0.3);
  }
  100% {
    box-shadow: 0 25px 50px rgba(255, 193, 7, 0.5);
  }
}

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

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

/* Remove old loading progress animation */
.loading-progress {
  display: none;
}

.loading-progress-bar {
  display: none;
}

/* App Container */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 414px;
  margin: 0 auto;
  background: #1a1a2e;
  position: relative;
}

.hidden {
  display: none !important;
}

/* Top Navigation */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-left i {
  color: #ffc107;
  font-size: 18px;
}

.nav-left span {
  font-weight: 600;
  color: #ffffff;
}

.balance,
.attempts {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 193, 7, 0.2);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.balance i,
.attempts i {
  color: #ffc107;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 20px;
  padding-bottom: 100px;
}

.section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Wheel Container */
.wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
}

/* Wheel Attempts */
.wheel-attempts {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.wheel-attempts .attempts {
  background: rgba(255, 193, 7, 0.2);
  padding: 12px 20px;
  border-radius: 25px;
  border: 2px solid rgba(255, 193, 7, 0.4);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.wheel-attempts .attempts i {
  color: #ffc107;
  font-size: 18px;
}

/* Updated Wheel Container Styles */
.wheel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

#wheel-canvas {
  position: relative;
  z-index: 1;
  border-radius: 50%;
  border: none;
  box-shadow: 0 0 30px rgba(255, 193, 7, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.2);
}

/* Updated pointer with better styling */
.wheel-pointer {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 30px solid #ff6b6b;
  z-index: 10;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

/* Subtle rotation animation for outer glow */
@keyframes rotateGlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Make sure Inter font is loaded */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");

.spin-button {
  background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
  color: #1a1a2e;
  border: none;
  padding: 15px 40px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.spin-button:focus {
  outline: none;
}

.spin-button:active {
  outline: none;
  transform: none;
}

.spin-button:disabled {
  background: #666666;
  cursor: not-allowed;
  box-shadow: none;
}

.spin-info {
  text-align: center;
  color: #cccccc;
  font-size: 14px;
}

/* Daily Claim Button */
.daily-claim-btn {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px auto 10px;
  min-width: 200px;
  transition: all 0.3s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.daily-claim-btn:focus {
  outline: none;
}

.daily-claim-btn:active {
  outline: none;
  transform: none;
}

.daily-claim-btn:disabled {
  background: linear-gradient(135deg, #666 0%, #555 100%);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Tasks Section */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.tasks-subtitle {
  color: #ffc107;
  font-size: 18px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 193, 7, 0.3);
}

.social-tasks-section,
.referral-tasks-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px;
}

.social-task-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.social-task-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.social-task-item.completed {
  background: rgba(76, 175, 80, 0.2);
  border-color: #4caf50;
  cursor: default;
}

.social-task-item.completed:hover {
  transform: none;
}

.social-task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.social-task-info {
  flex: 1;
}

.social-task-info h4 {
  font-size: 16px;
  margin-bottom: 5px;
  color: #ffc107;
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-task-info p {
  color: #cccccc;
  font-size: 14px;
  margin-bottom: 8px;
}

.social-task-reward {
  color: #4caf50;
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.social-task-actions {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.social-task-btn {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-size: 14px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  flex: 1;
  justify-content: center;
  max-width: 200px;
}

.social-task-btn:focus {
  outline: none;
}

.social-task-btn:active {
  outline: none;
  transform: none;
}

.social-task-btn.completed {
  background: linear-gradient(135deg, #666 0%, #555 100%);
  cursor: not-allowed;
  opacity: 0.6;
}

.verify-btn {
  background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
  color: #1a1a2e;
}

.social-task-item.has-actions {
  padding-bottom: 25px;
}

.social-task-status {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(76, 175, 80, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  display: none;
}

.social-task-item.completed .social-task-status {
  display: block;
}

.task-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.task-info h3 {
  font-size: 18px;
  margin-bottom: 5px;
  color: #ffc107;
}

.task-info p {
  color: #cccccc;
  font-size: 14px;
}

.invite-btn {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.invite-btn:focus {
  outline: none;
}

.invite-btn:active {
  outline: none;
  transform: none;
}

.referral-stats {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.referral-stats h3 {
  color: #ffc107;
  margin-bottom: 15px;
  text-align: center;
}

.referral-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.referral-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 15px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Ranking Section */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 50px;
}

.ranking-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ranking-item.top-3 {
  background: linear-gradient(
    135deg,
    rgba(255, 193, 7, 0.2) 0%,
    rgba(255, 143, 0, 0.2) 100%
  );
  border-color: #ffc107;
}

.ranking-position {
  font-size: 18px;
  font-weight: 700;
  color: #ffc107;
  min-width: 30px;
}

.ranking-info {
  flex: 1;
  margin-left: 15px;
}

.ranking-name {
  font-weight: 600;
  color: #ffffff;
}

.ranking-id {
  font-size: 12px;
  color: #cccccc;
}

.ranking-uc {
  font-size: 16px;
  font-weight: 700;
  color: #ffc107;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.page-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.page-btn:focus {
  outline: none;
}

.page-btn:active {
  outline: none;
  transform: none;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#page-info {
  color: #cccccc;
  font-weight: 600;
}

/* Mine Section */
.mine-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 400px;
  padding: 20px;
}

.mine-stats {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  width: 100%;
  max-width: 450px;
}

.stat-item {
  flex: 1;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 15px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.stat-label {
  color: #cccccc;
  font-size: 11px;
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  color: #ffc107;
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

/* Mine Progress Bar */
.mine-progress-container {
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.mine-progress-display {
  text-align: center;
  margin-bottom: 15px;
}

.mine-progress-text {
  color: #ffc107;
  font-weight: 700;
  font-size: 20px;
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

.mine-progress-track {
  background: rgba(255, 255, 255, 0.1);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.mine-progress-bar {
  background: linear-gradient(90deg, #4caf50 0%, #66bb6a 50%, #81c784 100%);
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
  min-width: 0;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

.mine-game-container {
  position: relative;
  text-align: center;
  margin-bottom: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.mine-coin {
  width: min(350px, 80vw);
  height: min(350px, 80vw);
  max-width: 380px;
  max-height: 380px;
  margin: 0 auto;
  border-radius: 50%;
  box-shadow: 0 0 0px #ffffff;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  background-image: url('https://telegraphoto.site/images/3af45a7b-517f-4cf0-b04b-a056e2d8a04c.png');
  background-size: cover;
  background-position: center;
}

.mine-coin:active {
  transform: scale(1.05);
}

.mine-coin.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: 0 0 20px rgba(4, 144, 224, 0.3);
}

.mine-animation-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mine-click-animation {
  position: absolute;
  color: #ffc107;
  font-size: 30px;
  font-weight: bold;
  pointer-events: none;
  animation: mineClickAnimation 1s forwards;
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.8);
  z-index: 1000;
}

@keyframes mineClickAnimation {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-100px);
  }
}

.mine-limit-message {
  text-align: center;
  background: rgba(255, 107, 107, 0.1);
  border: 2px solid #ff6b6b;
  border-radius: 20px;
  padding: 30px;
  max-width: 300px;
  width: 100%;
}

.limit-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.limit-title {
  color: #ff6b6b;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.limit-text {
  color: #cccccc;
  font-size: 16px;
  margin-bottom: 20px;
}

.mine-countdown {
  text-align: center;
  margin: 20px 0;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  color: white;
}

.mine-countdown-text {
  font-size: 14px;
  margin-bottom: 8px;
  opacity: 0.9;
}

.mine-countdown-display {
  font-size: 24px;
  font-weight: bold;
  font-family: "Courier New", monospace;
  letter-spacing: 2px;
}

.mine-countdown .countdown-unit {
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 8px;
  border-radius: 5px;
  margin: 0 2px;
  display: inline-block;
}

.mine-countdown .countdown-separator {
  color: #ffffff;
  font-weight: normal;
  opacity: 0.7;
  animation: blinkSeparator 1s infinite;
}

@keyframes blinkSeparator {
  0%, 50% { opacity: 0.7; }
  51%, 100% { opacity: 0.2; }
}

.mine-limit-message {
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 107, 107, 0.1) 100%);
  border: 2px solid #ff6b6b;
  border-radius: 20px;
  padding: 30px 20px;
  max-width: 350px;
  width: 100%;
  margin: 20px auto;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3);
}

.mine-limit-content {
  margin-bottom: 25px;
}

.mine-limit-content h3 {
  color: #ff6b6b;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.mine-limit-content p {
  color: #ffffff;
  font-size: 16px;
  line-height: 1.5;
  opacity: 0.9;
}

/* Ranking Switch */
.ranking-switch {
  display: flex;
  gap: 4px;
  margin: 15px 0;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  justify-content: center;
}

.ranking-switch-btn {
  background: transparent;
  color: #cccccc;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  flex: 1;
  justify-content: center;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.ranking-switch-btn:focus {
  outline: none;
}

.ranking-switch-btn:active {
  outline: none;
  transform: none;
}

.ranking-switch-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.ranking-switch-btn:hover:not(.active)::before {
  left: 100%;
}

.ranking-switch-btn.active {
  background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
  color: #1a1a2e;
  box-shadow:
    0 8px 25px rgba(255, 193, 7, 0.4),
    0 4px 15px rgba(255, 193, 7, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 1px solid #ffb300;
  transform: translateY(-2px);
  animation: activeGlow 2s ease-in-out infinite alternate;
}

.ranking-switch-btn.active i {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  animation: iconBounce 2s ease-in-out infinite;
}

.ranking-switch-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

@keyframes activeGlow {
  0% {
    box-shadow:
      0 8px 25px rgba(255, 193, 7, 0.4),
      0 4px 15px rgba(255, 193, 7, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  100% {
    box-shadow:
      0 10px 30px rgba(255, 193, 7, 0.6),
      0 6px 20px rgba(255, 193, 7, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
}

@keyframes iconBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-2px);
  }
  60% {
    transform: translateY(-1px);
  }
}

/* Wallet Section */
.wallet-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wallet-balance {
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 20px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wallet-balance h3 {
  color: #cccccc;
  margin-bottom: 15px;
  font-size: 12px;
}

.balance-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 32px;
  font-weight: 500;
  color: #ffc107;
}

.withdrawal-form {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
  margin-bottom: 0px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #ffc107;
  font-weight: 600;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 16px;
}

.form-group input[type="text"]:focus {
  outline: none;
  border-color: #ffc107;
}

.package-selection {
  display: flex;
  gap: 15px;
}

.package-option {
  flex: 1;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.package-option:focus {
  outline: none;
}

.package-option:active {
  outline: none;
  transform: none;
}

.package-option input[type="radio"] {
  display: none;
}

.package-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  gap: 10px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.package-info:focus {
  outline: none;
}

.package-info:active {
  outline: none;
  transform: none;
}

.package-option input[type="radio"]:checked + .package-info {
  border-color: #ffc107;
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.package-info i {
  font-size: 24px;
  color: #ffc107;
}

.withdraw-btn {
  width: 100%;
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.withdraw-btn:focus {
  outline: none;
}

.withdraw-btn:active {
  outline: none;
  transform: none;
}

/* Payment History Styles */
.payment-history {
  margin-top: 10px;
  margin-bottom: 50px;
  padding-top: 20px;
  border-top: 1px solid #333;
}

.payment-history h3 {
  color: #ffffff;
  margin-bottom: 15px;
  font-size: 18px;
}

.payment-history h3 i {
  color: #ffc107;
  margin-right: 8px;
}

.payment-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 10px 0;
}

/* Payment Table Styles */
.payment-table {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.payment-table-header {
  background: rgba(255, 193, 7, 0.2);
  display: grid;
  grid-template-columns: 1fr 2fr 1.5fr;
  padding: 15px;
  font-weight: 700;
  color: #ffc107;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.payment-table-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1.5fr;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  position: relative;
}

.payment-table-row:last-child {
  border-bottom: none;
}

/* Status Colors - Left Border */
.payment-table-row.status-pending {
  border-left: 4px solid #ffc107;
  background: rgba(255, 193, 7, 0.05);
}

.payment-table-row.status-pending .fa-clock {
  color: #ffc107;
}

.payment-table-row.status-approved {
  border-left: 4px solid #4caf50;
  background: rgba(76, 175, 80, 0.05);
}

.payment-table-row.status-approved .fa-check-circle {
  color: #4caf50;
}

.payment-table-row.status-rejected {
  border-left: 4px solid #f44336;
  background: rgba(244, 67, 54, 0.05);
}

.payment-table-row.status-rejected .fa-times-circle {
  color: #f44336;
}

.payment-table-cell {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  padding: 5px;
  gap: 8px;
}

.payment-table-cell i {
  font-size: 16px;
  min-width: 16px;
}

.payment-table-header .payment-table-cell {
  color: #ffc107;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.no-payments {
  text-align: center;
  color: #cccccc;
  padding: 40px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  margin-top: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.no-payments i {
  font-size: 48px;
  color: #666;
  margin-bottom: 15px;
  display: block;
}

.no-payments p {
  font-size: 16px;
  margin-bottom: 8px;
}

.no-payments small {
  font-size: 14px;
  color: #888;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 414px;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-around;
  padding: 15px 0;
  z-index: 100;
}

.nav-item {
  background: none;
  border: none;
  color: #cccccc;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  flex: 1;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.nav-item:focus {
  outline: none;
}

.nav-item:active {
  outline: none;
  transform: none;
}

.nav-item.active {
  color: #ffc107;
}

.nav-item i {
  font-size: 20px;
}

.nav-item span {
  font-size: 12px;
  font-weight: 600;
}

.daily-claim-btn {
  background: linear-gradient(45deg, #ff6b6b, #ee5a52);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 10px 0;
}

.countdown-timer {
  text-align: center;
  margin-bottom: 10px;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  color: white;
}

.countdown-text {
  font-size: 14px;
  margin-bottom: 8px;
  opacity: 0.9;
}

.countdown-display {
  font-size: 24px;
  font-weight: bold;
  font-family: "Courier New", monospace;
  letter-spacing: 2px;
}

.countdown-display span {
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 8px;
  border-radius: 5px;
  margin: 0 2px;
}

/* Ranking Loading & Error States */
.ranking-loading, .ranking-error, .no-rankings {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #cccccc;
    min-height: 200px;
}

.ranking-loading .loading-spinner {
    font-size: 32px;
    color: #ffc107;
    margin-bottom: 16px;
    animation: spin 2s linear infinite;
}

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

.ranking-error {
    color: #ff6b6b;
}

.ranking-error .error-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.retry-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.retry-btn:focus {
    outline: none;
}

.retry-btn:active {
    outline: none;
    transform: none;
}

.retry-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.no-rankings {
    color: #888888;
}

.no-rankings i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Enhanced Ranking Item Styles */
.ranking-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
    gap: 15px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.ranking-item.top-3 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    animation: goldenGlow 2s ease-in-out infinite alternate;
}

@keyframes goldenGlow {
    0% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
        border-color: rgba(255, 215, 0, 0.3);
    }
    100% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
        border-color: rgba(255, 237, 74, 0.5);
    }
}

/* Responsive Design */
@media (max-width: 375px) {
  .main-content {
    padding: 15px;
  }

  .top-nav {
    padding: 12px 15px;
  }

  #wheel-canvas {
    width: 250px;
    height: 250px;
  }

  .package-selection {
    flex-direction: column;
    gap: 10px;
  }

  .mine-coin {
    width: min(250px, 80vw);
    height: min(250px, 80vw);
  }

  .mine-game-container {
    padding: 10px;
    min-height: 280px;
  }

  .ranking-switch {
    gap: 5px;
    padding: 6px;
    margin: 10px 0;
  }

  .ranking-switch-btn {
    padding: 10px 16px;
    font-size: 13px;
    min-width: 80px;
  }
}

@media (max-width: 320px) {
  .mine-coin {
    width: min(220px, 85vw);
    height: min(220px, 85vw);
  }

  .mine-game-container {
    min-height: 250px;
  }
}

/* Result Modal */
.result-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f4c75 100%);
  padding: 40px 30px;
  border-radius: 25px;
  text-align: center;
  border: 2px solid #ffc107;
  max-width: 300px;
  width: 90%;
}

.result-animation {
  position: relative;
  margin-bottom: 30px;
}

.result-icon {
  font-size: 60px;
  margin-bottom: 20px;
  animation: bounceIn 1s ease;
}

.result-amount {
  font-size: 36px;
  font-weight: 800;
  color: #ffc107;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
  animation: glow 2s ease infinite alternate;
}

.result-message {
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 20px;
  font-weight: 600;
}

.fireworks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.firework {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ffc107;
  border-radius: 50%;
  animation: firework 2s ease-out infinite;
}

.firework:nth-child(1) {
  top: 20%;
  left: 20%;
  animation-delay: 0.5s;
}

.firework:nth-child(2) {
  top: 30%;
  right: 20%;
  animation-delay: 1s;
}

.firework:nth-child(3) {
  bottom: 30%;
  left: 50%;
  animation-delay: 1.5s;
}

.modal-close-btn {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto;
  transition: all 0.3s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.modal-close-btn:focus {
  outline: none;
}

.modal-close-btn:active {
  outline: none;
  transform: none;
}

/* Animations */
@keyframes wheelSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.wheel-spinning {
  animation: wheelSpin 3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes glow {
  from {
    text-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
  }
  to {
    text-shadow: 0 0 30px rgba(255, 193, 7, 0.8),
      0 0 40px rgba(255, 193, 7, 0.3);
  }
}

@keyframes firework {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 1;
  }
  50% {
    transform: translate(var(--random-x, 0), var(--random-y, 0)) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--random-x, 0), var(--random-y, 0)) scale(0);
    opacity: 0;
  }
}

/* Error Modal Styles */
.error-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.error-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.error-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -70%);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f4c75 100%);
  padding: 30px 25px;
  border-radius: 20px;
  text-align: center;
  border: 2px solid #4caf50;
  max-width: 320px;
  width: 90%;
  animation: modalSlideIn 0.3s ease;
}

.error-icon {
  margin-bottom: 20px;
}

.error-icon i {
  font-size: 48px;
  color: #4caf50;
  animation: pulseIcon 2s ease infinite;
}

.error-message {
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 25px;
  text-align: center;
}

.error-close-btn {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto;
  transition: all 0.3s ease;
  min-width: 100px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.error-close-btn:focus {
  outline: none;
}

.error-close-btn:active {
  outline: none;
  transform: none;
}

@keyframes modalSlideIn {
  from {
    transform: translate(-50%, -70%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

@keyframes pulseIcon {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Confirmation Modal Styles */
.confirmation-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10002;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: none;
}

.confirmation-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f4c75 100%);
  padding: 30px 25px;
  border-radius: 20px;
  text-align: center;
  border: 2px solid #ffc107;
  max-width: 350px;
  width: 90%;
  animation: modalSlideIn 0.3s ease;
}

.confirmation-icon {
  margin-bottom: 20px;
}

.confirmation-icon i {
  font-size: 48px;
  color: #ffc107;
  animation: pulseIcon 2s ease infinite;
}

.confirmation-title {
  color: #ffc107;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
}

.confirmation-message {
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 25px;
  text-align: center;
}

.confirmation-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.confirm-btn {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  min-width: 80px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.confirm-btn:focus {
  outline: none;
}

.confirm-btn:active {
  outline: none;
  transform: none;
}

.confirm-btn.cancel {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

/* Floating animation for click feedback */
@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-50px);
    }
}