@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Quicksand:wght@400;700&family=Cinzel:wght@400;700&family=Lato:wght@300;400;700&family=Fredoka+One&family=Bungee&family=Almendra&family=Glass+Antiqua&family=Gruppo&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
    touch-action: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.game-container {
    width: 100vw;
    height: 100vh;
    background: none !important;
    position: relative;
    overflow: hidden;
    scroll-behavior: smooth;
}

/* Start Screen Styles */
.start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 20px;
    text-align: center;
    z-index: 1000;
}

.start-screen-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.start-screen h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    color: white;
    margin-top: 0;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.menu-buttons-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.menu-icons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 3vw, 20px);
    margin-bottom: 30px;
    flex-shrink: 0;
}

.menu-icon-btn {
    background: linear-gradient(135deg, #f0f2f5, #e0e2e5);
    border-radius: 50%;
    width: clamp(58px, 12vw, 68px) !important;
    height: clamp(58px, 12vw, 68px) !important;
    font-size: clamp(1.3rem, 4vw, 1.7rem) !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.menu-icon-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.news-icon-btn {
    color: #1DA1F2;
    border: 2px solid #1DA1F2;
}

.daily-login-icon-btn {
    color: #FFAC33;
    border: 2px solid #FFAC33;
}

.daily-challenge-icon-btn {
    color: #4CAF50;
    border: 2px solid #4CAF50;
}

.notifications-icon-btn {
    color: #FF9800;
    border: 2px solid #FF9800;
}

.profile-icon-btn {
    color: #7289DA;
    border: 2px solid #7289DA;
}

.friends-icon-btn {
    color: #4CAF50;
    border: 2px solid #4CAF50;
}

/* Energy System */
.energy-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.energy-icon {
    font-size: 1.5rem;
    color: #FFD700;
    text-shadow: 0 0 10px #FFD700;
}

.energy-bar {
    width: 200px;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.energy-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 8px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.energy-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: energyShine 2s infinite;
}

@keyframes energyShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.energy-text {
    font-size: 1rem;
    min-width: 45px;
    color: #fff !important;
    text-shadow: 0 0 4px #000, 0 0 2px #000, 1px 1px 2px #000, -1px -1px 2px #000;
    font-weight: bold;
    letter-spacing: 1px;
    text-align: center;
}

.energy-container.low-energy {
    border-color: #FF6B6B;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.energy-container.low-energy .energy-fill {
    background: linear-gradient(90deg, #FF6B6B, #FF8E8E);
}

.energy-container.low-energy .energy-icon {
    color: #FF6B6B;
    text-shadow: 0 0 10px #FF6B6B;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    flex: 1;
    justify-content: center;
}

.menu-button {
    padding: clamp(14px, 4vh, 18px) clamp(35px, 9vw, 50px);
    font-size: clamp(1.1rem, 4vw, 1.6rem);
    min-width: clamp(220px, 65vw, 280px);  /* scales width slightly wider */
    background: linear-gradient(135deg, #404040 0%, #606060 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.menu-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #505050 0%, #707070 100%);
}

.menu-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#update-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001; /* Ensure it's on top of other start screen elements */
}

#update-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #1a1a1a;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    padding: 12px 25px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

#update-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Daily Challenge Icon - Combined into .menu-icon-btn */
.daily-challenge-icon-container {
    position: relative;
}

.notifications-icon-container {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #FF4444 0%, #CC0000 100%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(255, 68, 68, 0.4);
    z-index: 2000;
    animation: notificationPulse 2s infinite;
    pointer-events: none;
}

/* Daily Challenge Screen */
.daily-challenge-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.daily-challenge-content {
    background: linear-gradient(135deg, #ffffff, #f0f2f5);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 90%;
    max-width: 400px;
    position: relative;
    border: 1px solid #ddd;
    animation: slideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.daily-challenge-content h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
}

.daily-challenge-content p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
}

.challenge-progress-container {
    background-color: #e0e0e0;
    border-radius: 10px;
    height: 20px;
    margin-bottom: 10px;
    overflow: hidden;
}

.challenge-progress-bar {
    width: 0%; /* Will be updated by JS */
    height: 100%;
    background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

#challengeProgressText {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.challenge-reward {
    font-weight: bold;
    color: #333;
}

#claimChallengeBtn {
    margin-top: 20px;
    width: 100%;
}

#claimChallengeBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#backToMenuFromChallenge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #eee;
    color: #555;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
}

/* Instructions Screen Styles */
.instructions-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 20px;
    text-align: center;
    z-index: 1000;
    color: white;
}

.instructions-screen h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.instructions-screen #backToMenuButton {
    margin: 10px 0 20px 0;
}

.instructions-content {
    max-width: 500px;
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.instructions-page {
    min-height: 200px;
}

.instructions-page h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-align: center;
}

.instructions-content p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.instructions-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.instructions-content li {
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.4;
}

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

.instructions-pagination .pagination-btn {
    background: linear-gradient(135deg, #404040 0%, #606060 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.instructions-pagination .pagination-btn:hover {
    background: linear-gradient(135deg, #505050 0%, #707070 100%);
    transform: translateY(-1px);
}

.instructions-pagination .pagination-btn:disabled {
    background: #333;
    cursor: not-allowed;
    transform: none;
}

.instructions-pagination .page-indicator {
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    min-width: 40px;
    text-align: center;
}

/* Level Transition Screen */
.level-transition {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    z-index: 1000;
    color: white;
}

.level-transition h2 {
    font-size: 3.5rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

#countdown {
    font-size: 2.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Entire screen fills viewport, column layout */
.game-screen {
  position: relative;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  z-index: 1000;
  overflow: hidden;
}

.score-container {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 20px 12px 20px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  font-size: clamp(0.9rem, 2.8vw, 1.2rem);
  font-weight: bold;
  color: white;
  height: 60px;
  box-sizing: border-box;
}

/* Score items */
.score, .level, .timer, .lives, .coins {
  text-align: center;
  flex: 1;
}

.lives {
  color: #ff6b6b;
  text-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
}

/* BELOW SCORE: everything else fills remaining space */
.game-area {
  padding-top: calc(60px + env(safe-area-inset-top, 0px));
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.game-content {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  margin-top: calc(-20px + env(safe-area-inset-top, 0px));
  box-sizing: border-box;
  overflow: auto;
  z-index: 1;
}


/* Card design in center, never stretches beyond mobile screen */
.card {
  margin: -30px auto 0 auto;
  width: 350px;
  max-width: 90vw;
  height: 550px;
  max-height: 75vh;
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border: 3px solid #e0e0e0;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  transition: transform 0.3s ease;
}

/* Corner Icons (decoration) */
.card::before,
.card::after {
  content: '';
  position: absolute;
  font-size: 1.5rem;
  z-index: 2;
  transform-origin: center;
  will-change: transform, opacity;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card::before {
  top: 10px;
  left: 10px;
}

.card::after {
  bottom: 10px;
  right: 10px;
}

/* Animation for icons */
@keyframes iconPulse {
  0%, 100% { 
    transform: scale(1); 
    opacity: 0.8; 
    filter: brightness(1);
  }
  50% { 
    transform: scale(1.1); 
    opacity: 1;
    filter: brightness(1.2);
  }
}

/* Enhanced Card Design Variations with Themed Corner Emojis */
.card-design-default {
  border: 3px solid #e0e0e0 !important;
  border-radius: 15px !important;
  background-color: white !important;
}

.card-design-default::before,
.card-design-default::after {
  content: '🃏' !important;
  animation: iconPulse 2s ease-in-out infinite !important;
}

.card-design-rounded {
  border: 6px solid #FF0000 !important;
  border-radius: 25px !important;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

.card-design-rounded::before,
.card-design-rounded::after {
  content: '🔴' !important;
  color: #FF0000 !important;
  animation: iconPulse 2s ease-in-out infinite !important;
}

/* Overlays positioned on top of game content */
.powerup-panel,
.tap-area {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.powerup-container,
.tap-button {
  pointer-events: auto;
}

/* Tap button styling */
.tap-button {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  background-color: #ff6b6b;
  color: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
}

.card-design-hexagon {
    border: 3px solid #4a90e2 !important;
    border-radius: 15px !important;
    position: relative !important;
    background: linear-gradient(135deg, #4a90e2, #357abd) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

.card-design-hexagon::before,
.card-design-hexagon::after {
    content: '⬡' !important;
    font-size: 2rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6) !important;
    position: absolute !important;
    z-index: 2 !important;
    animation: hexPulse 2s ease-in-out infinite !important;
}

/* Hexagon-specific animations */
@keyframes hexPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2) rotate(30deg);
        opacity: 1;
    }
}

/* Enhanced keyframe animations for themed corner emojis */
@keyframes iconPulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.8; 
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.1); 
        opacity: 1;
        filter: brightness(1.2);
    }
}

@keyframes diamondSparkle {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
    25% { 
        transform: scale(1.1) rotate(90deg);
        filter: brightness(1.5);
    }
    50% { 
        transform: scale(1.2) rotate(180deg);
        filter: brightness(1.8);
    }
    75% { 
        transform: scale(1.1) rotate(270deg);
        filter: brightness(1.5);
    }
}

@keyframes starTwinkle {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        opacity: 0.8;
    }
    25% { 
        transform: scale(1.2) rotate(90deg);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1) rotate(180deg);
        opacity: 0.9;
    }
    75% { 
        transform: scale(1.3) rotate(270deg);
        opacity: 1;
    }
}

@keyframes heartBeat {
    0%, 100% { 
        transform: scale(1);
    }
    25% { 
        transform: scale(1.1);
    }
    50% { 
        transform: scale(1.2);
    }
    75% { 
        transform: scale(1.1);
    }
}

@keyframes triangleRotate {
    0% { 
        transform: rotate(0deg) scale(1);
    }
    50% { 
        transform: rotate(180deg) scale(1.1);
    }
    100% { 
        transform: rotate(360deg) scale(1);
    }
}

@keyframes circlePulse {
    0%, 100% { 
        transform: scale(1);
        border-radius: 50%;
    }
    50% { 
        transform: scale(1.2);
        border-radius: 40%;
    }
}

@keyframes squareBounce {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
    }
    25% { 
        transform: scale(1.1) rotate(5deg);
    }
    50% { 
        transform: scale(1.2) rotate(0deg);
    }
    75% { 
        transform: scale(1.1) rotate(-5deg);
    }
}

@keyframes octagonSpin {
    0% { 
        transform: rotate(0deg) scale(1);
    }
    50% { 
        transform: rotate(180deg) scale(1.1);
    }
    100% { 
        transform: rotate(360deg) scale(1);
    }
}

@keyframes crossPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.3);
        opacity: 1;
    }
}

@keyframes moonGlow {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.1);
        filter: brightness(1.5);
    }
}

@keyframes flowerBloom {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
    }
    25% { 
        transform: scale(1.1) rotate(90deg);
    }
    50% { 
        transform: scale(1.2) rotate(180deg);
    }
    75% { 
        transform: scale(1.1) rotate(270deg);
    }
}

@keyframes lightningFlash {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1);
    }
    25% { 
        transform: scale(1.2);
        filter: brightness(2);
    }
    50% { 
        transform: scale(1.1);
        filter: brightness(1.5);
    }
    75% { 
        transform: scale(1.3);
        filter: brightness(2.5);
    }
}

@keyframes cloudFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-5px) scale(1.1);
        opacity: 1;
    }
}

@keyframes leafSway {
    0%, 100% { 
        transform: rotate(0deg) scale(1);
    }
    25% { 
        transform: rotate(15deg) scale(1.1);
    }
    50% { 
        transform: rotate(0deg) scale(1);
    }
    75% { 
        transform: rotate(-15deg) scale(1.1);
    }
}

@keyframes crownSparkle {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
    25% { 
        transform: scale(1.1) rotate(5deg);
        filter: brightness(1.3);
    }
    50% { 
        transform: scale(1.2) rotate(0deg);
        filter: brightness(1.6);
    }
    75% { 
        transform: scale(1.1) rotate(-5deg);
        filter: brightness(1.3);
    }
}

/* Swipe-triggered animations for corner emojis */
.card.swipe-correct::before,
.card.swipe-correct::after {
    animation: swipeCorrect 0.6s ease-out !important;
}

.card.swipe-wrong::before,
.card.swipe-wrong::after {
    animation: swipeWrong 0.6s ease-out !important;
}

@keyframes swipeCorrect {
    0% { 
        transform: scale(1);
        filter: brightness(1);
    }
    25% { 
        transform: scale(1.3);
        filter: brightness(1.5);
    }
    50% { 
        transform: scale(1.5);
        filter: brightness(2);
    }
    75% { 
        transform: scale(1.3);
        filter: brightness(1.5);
    }
    100% { 
        transform: scale(1);
        filter: brightness(1);
    }
}

@keyframes swipeWrong {
    0% { 
        transform: scale(1) rotate(0deg);
    }
    25% { 
        transform: scale(1.2) rotate(15deg);
    }
    50% { 
        transform: scale(1.4) rotate(-15deg);
    }
    75% { 
        transform: scale(1.2) rotate(10deg);
    }
    100% { 
        transform: scale(1) rotate(0deg);
    }
}

/* Special text styling for hexagon */
.card-design-hexagon .direction-text {
    color: white !important;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.4) !important;
    font-weight: bold !important;
    z-index: 2 !important;
    letter-spacing: 1px !important;
}

.card-design-diamond {
    border: 3px solid #FFD700 !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important;
}

.card-design-diamond::before,
.card-design-diamond::after {
    content: '💎' !important;
    color: #FFD700 !important;
    animation: diamondSparkle 3s ease-in-out infinite !important;
}

.card-design-star {
    border: 3px solid #FFD93D !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%) !important;
}

.card-design-star::before,
.card-design-star::after {
    content: '⭐' !important;
    color: #FFD93D !important;
    animation: starTwinkle 2s ease-in-out infinite !important;
}

.card-design-heart {
    border: 6px solid #FF0000 !important;
    border-radius: 20px !important;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%) !important;
    position: relative !important;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3) !important;
}

.card-design-heart::before,
.card-design-heart::after {
    content: '❤️' !important;
    color: #FF0000 !important;
    position: absolute !important;
    font-size: 1.5rem !important;
    z-index: 2 !important;
    animation: heartBeat 1.5s ease-in-out infinite !important;
}

.card-design-heart::before {
    top: 10px !important;
    left: 10px !important;
}

.card-design-heart::after {
    bottom: 10px !important;
    right: 10px !important;
}

.card-design-triangle {
    border: 3px solid #6C5CE7 !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%) !important;
}

.card-design-triangle::before,
.card-design-triangle::after {
    content: '🔺' !important;
    color: #6C5CE7 !important;
    animation: triangleRotate 4s linear infinite !important;
}

.card-design-circle {
    border: 3px solid #00B894 !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #00cec9 0%, #00b894 100%) !important;
}

.card-design-circle::before,
.card-design-circle::after {
    content: '🔵' !important;
    color: #00B894 !important;
    animation: circlePulse 2s ease-in-out infinite !important;
}

.card-design-square {
    border: 3px solid #2D3436 !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #636e72 0%, #2d3436 100%) !important;
}

.card-design-square::before,
.card-design-square::after {
    content: '⬜' !important;
    color: #2D3436 !important;
    animation: squareBounce 2s ease-in-out infinite !important;
}

.card-design-octagon {
    border: 3px solid #E17055 !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #fab1a0 0%, #e17055 100%) !important;
}

.card-design-octagon::before,
.card-design-octagon::after {
    content: '🛑' !important;
    color: #E17055 !important;
    animation: octagonSpin 3s linear infinite !important;
}

.card-design-cross {
    border: 3px solid #D63031 !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #ff7675 0%, #d63031 100%) !important;
}

.card-design-cross::before,
.card-design-cross::after {
    content: '➕' !important;
    color: #D63031 !important;
    animation: crossPulse 2s ease-in-out infinite !important;
}

.card-design-moon {
    border: 3px solid #74B9FF !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%) !important;
}

.card-design-moon::before,
.card-design-moon::after {
    content: '🌙' !important;
    color: #74B9FF !important;
    animation: moonGlow 3s ease-in-out infinite !important;
}

.card-design-sun {
    border: 3px solid #FDCB6E;
    border-radius: 15px;
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    background-size: 200% 200%;
    animation: sunGradient 3s ease-in-out infinite;
}

.card-design-sun::before,
.card-design-sun::after {
    content: '☀️';
    color: #FDCB6E;
    animation: sunSpin 4s linear infinite;
}

@keyframes sunSpin {
    0% { 
        transform: rotate(0deg) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: rotate(180deg) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 0.8;
    }
}

@keyframes sunGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes sunIconSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.card-design-flower {
    border: 3px solid #E84393 !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%) !important;
}

.card-design-flower::before,
.card-design-flower::after {
    content: '🌸' !important;
    color: #E84393 !important;
    animation: flowerBloom 4s ease-in-out infinite !important;
}

.card-design-lightning {
    border: 3px solid #F39C12 !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
}

.card-design-lightning::before,
.card-design-lightning::after {
    content: '⚡' !important;
    color: #F39C12 !important;
    animation: lightningFlash 1s ease-in-out infinite !important;
}

.card-design-cloud {
    border: 3px solid #95A5A6 !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%) !important;
}

.card-design-cloud::before,
.card-design-cloud::after {
    content: '☁️' !important;
    color: #95A5A6 !important;
    animation: cloudFloat 3s ease-in-out infinite !important;
}

.card-design-leaf {
    border: 3px solid #27AE60 !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
}

.card-design-leaf::before,
.card-design-leaf::after {
    content: '🍃' !important;
    color: #27AE60 !important;
    animation: leafSway 2s ease-in-out infinite !important;
}

.card-design-crown {
    border: 3px solid #F1C40F !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%) !important;
}

.card-design-crown::before,
.card-design-crown::after {
    content: '👑' !important;
    color: #F1C40F !important;
    animation: crownSparkle 3s ease-in-out infinite !important;
}

/* Enhanced card content styling for better contrast */
.card-design-rounded .direction-text,
.card-design-hexagon .direction-text,
.card-design-diamond .direction-text,
.card-design-star .direction-text,
.card-design-heart .direction-text,
.card-design-triangle .direction-text,
.card-design-circle .direction-text,
.card-design-square .direction-text,
.card-design-octagon .direction-text,
.card-design-cross .direction-text,
.card-design-moon .direction-text,
.card-design-sun .direction-text,
.card-design-flower .direction-text,
.card-design-lightning .direction-text,
.card-design-cloud .direction-text,
.card-design-leaf .direction-text,
.card-design-crown .direction-text {
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    font-weight: bold;
}

/* Special styling for dark cards */
.card-design-square .direction-text {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.card-design-cross .direction-text {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.card-content {
    text-align: center;
}

.direction-text {
    font-size: clamp(1.5rem, 8vw, 3rem);
    font-weight: bold;
    color: #000000;
    margin-bottom: clamp(5px, 2vh, 10px);
    white-space: pre-line;
    line-height: 1.2;
    text-align: center;
    min-height: clamp(1.8rem, 4vh, 3.6rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.tap-text {
    font-size: 1.5rem;
    color: #666;
}

.tap-area {
  position: fixed; /* not absolute */
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 2000; /* higher than .game-content and .score-container */
}

.tap-button {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: center;
  transition: transform 0.1s ease;
  padding: 20px 60px;
  font-size: 1.5rem;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
}

.tap-button:active {
    transform: translateX(-50%) scale(1.05);
}

.game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    z-index: 1000;
    color: white;
    text-align: center;
}

.game-over h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.game-over p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.game-over .menu-button {
    margin: 8px 0;
    min-width: 250px;
}

/* Animation classes */
.swipe-animation {
    transition: transform 0.3s ease;
}

.correct {
    background-color: #4CAF50 !important;
    color: white !important;
    animation: correctSwipe 0.6s ease;
}

.wrong {
    background-color: #f44336 !important;
    color: white !important;
    animation: wrongSwipe 0.6s ease;
}

@keyframes correctSwipe {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); background-color: #4CAF50; }
    100% { transform: scale(1); }
}

@keyframes wrongSwipe {
    0% { transform: scale(1); }
    25% { transform: scale(1.05) rotate(-2deg); }
    50% { transform: scale(1.1) rotate(2deg); }
    75% { transform: scale(1.05) rotate(-1deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Particle effects */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    display: none; /* Temporarily hide to test if this is causing the white bar */
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: particleFloat 2s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--x, 0), var(--y, -100px)) scale(0.5);
    }
}

@keyframes particleSpread {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--final-x) - var(--start-x, 0)), calc(var(--final-y) - var(--start-y, 0))) scale(0.5);
    }
}

/* Level up animation */
.level-up-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.3) 0%, transparent 70%);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 9998;
    animation: levelUpPulse 1.5s ease-out;
}

@keyframes levelUpPulse {
    0% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0; transform: scale(1.5); }
}

.level-up-text {
    color: white;
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: levelUpText 1.5s ease-out;
}

@keyframes levelUpText {
    0% { opacity: 0; transform: scale(0.5) rotate(-10deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(5deg); }
    100% { opacity: 0; transform: scale(1.5) rotate(0deg); }
}

/* Score popup animation */
.score-popup {
    position: absolute;
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.2rem;
    pointer-events: none;
    animation: scorePopup 1s ease-out forwards;
}

@keyframes scorePopup {
    0% { opacity: 0; transform: translateY(0) scale(0.5); }
    50% { opacity: 1; transform: translateY(-20px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-40px) scale(1); }
}

/* High score celebration */
.high-score-celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
    background-size: 400% 400%;
    animation: gradientShift 2s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.high-score-text {
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: highScoreText 2s ease-in-out;
}

@keyframes highScoreText {
    0% { opacity: 0; transform: scale(0.5) rotate(-10deg); }
    50% { opacity: 1; transform: scale(1.1) rotate(5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Leaderboard Screen Styles */
.leaderboard-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 20px;
    text-align: center;
    z-index: 1000;
    color: white;
}

.leaderboard-screen h2 {
    font-size: 2.5rem;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.leaderboard-content {
    background-color: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 15px;
    margin: 0 10px 20px 10px;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 400px;
    width: 100%;
    text-align: left;
    max-height: 80vh;
    overflow-y: auto;
}

#leaderboardList {
    padding-left: 20px;
    color: white;
    font-size: 1.2rem;
}

#leaderboardList li {
    margin-bottom: 8px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Shop Screen Styles */
.shop-screen, .energy-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.shop-header, .energy-header {
    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: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.shop-header h2, .energy-header h2 {
    color: white;
    margin: 0;
    font-size: 1.8rem;
}

.coin-display {
    display: flex;
    align-items: center;
    background: rgba(255, 215, 0, 0.2);
    padding: 8px 12px;
    border-radius: 20px;
    border: 2px solid gold;
    color: white;
    font-weight: bold;
    font-size: 1rem;
}

.coin-icon {
    font-size: 1.2rem;
    margin-right: 6px;
}

.shop-content, .energy-content {
    flex: 1;
    overflow-y: scroll;
    padding: 15px;
    -webkit-overflow-scrolling: touch;
}

.current-energy {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.energy-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.2rem;
}

.energy-packages {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.energy-package {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.energy-package:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.energy-package .package-icon {
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 10px;
}

.energy-package .package-info {
    flex: 1;
}

.energy-package .package-energy {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.energy-package .package-price {
    font-size: 1rem;
    color: #4CAF50;
}

.energy-package .package-value {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

.energy-package .purchase-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.energy-package .purchase-btn:hover {
    background: #45a049;
}

.energy-package .purchase-btn.popular {
    background: #2196F3;
}

.energy-package .purchase-btn.popular:hover {
    background: #1976D2;
}

@media (max-width: 768px) {
    .energy-packages {
        gap: 10px;
    }
    
    .energy-package {
        padding: 12px;
    }
    
    .energy-package .package-icon {
        font-size: 1.5rem;
    }
    
    .energy-package .package-energy {
        font-size: 1.1rem;
    }
    
    .energy-package .package-price {
        font-size: 0.9rem;
    }
    
    .energy-package .purchase-btn {
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {
    .energy-content {
        padding: 15px;
    }
    
    .energy-package {
        padding: 10px;
    }
    
    .energy-package .package-icon {
        font-size: 1.3rem;
    }
    
    .energy-package .package-energy {
        font-size: 1rem;
    }
    
    .energy-package .package-price {
        font-size: 0.8rem;
    }
    
    .energy-package .package-value {
        font-size: 0.7rem;
    }
    
    .energy-package .purchase-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

.shop-section {
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    backdrop-filter: blur(10px);
}

.shop-section h3 {
    color: white;
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    text-align: center;
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 5px;
    min-height: 160px;
}

.shop-item {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

/* Event Badge Styles */
.event-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: eventBadgePulse 2s infinite;
    z-index: 2;
}

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

.shop-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.shop-item.owned {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
}

.shop-item.equipped {
    border-color: #2196F3;
    background: rgba(33, 150, 243, 0.2);
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.5);
}

.shop-item img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 6px;
}

.shop-item-name {
    color: white;
    font-weight: bold;
    margin-bottom: 3px;
    font-size: 0.8rem;
}

.shop-item-price {
    color: gold;
    font-weight: bold;
    font-size: 0.7rem;
}

.shop-item-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.6rem;
    margin-top: 3px;
    line-height: 1.2;
}

.shop-item-button {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    margin-top: 5px;
    transition: all 0.3s ease;
    width: 100%;
}

.shop-item-button:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: scale(1.02);
}

.shop-item-button:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
}

.shop-item-button.owned {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

.shop-item-button.equipped {
    background: linear-gradient(45deg, #FF9800, #F57C00);
}

/* Sample button for music preview */
.shop-item-sample-button {
    background: linear-gradient(45deg, #9C27B0, #7B1FA2);
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    margin-top: 5px;
    transition: all 0.3s ease;
    width: 100%;
}

.shop-item-sample-button:hover {
    background: linear-gradient(45deg, #7B1FA2, #9C27B0);
    transform: scale(1.02);
}

.shop-item-sample-button:active {
    transform: scale(0.98);
}

/* Coin display in game */
.coins {
    font-size: 1.2rem;
    font-weight: bold;
    color: #f39c12;
}

/* --- THEME OVERHAUL --- */
/* This section provides a complete, unique user experience for each theme. */

/* Shared styles for themed buttons and panels */
.game-container[class*="theme-"] .menu-button,
.game-container[class*="theme-"] .menu-icon-btn,
.game-container[class*="theme-"] .shop-item,
.game-container[class*="theme-"] .category-item,
.game-container[class*="theme-"] .setting-item,
.game-container[class*="theme-"] .modal-content, /* Generic modal content */
.game-container[class*="theme-"] .daily-challenge-content,
.game-container[class*="theme-"] .game-mode-content {
    transition: all 0.4s ease; /* Smoother transitions for theme changes */
}

/* 1. Default Theme */
.theme-default {
    background: #f0f2f5;
    color: #333;
}
.theme-default .start-screen h1 { color: #333; text-shadow: none; }
.theme-default .menu-button { background: linear-gradient(135deg, #404040 0%, #606060 100%); color: white; border: none; border-radius: 20px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); }
.theme-default .menu-button:hover { background: linear-gradient(135deg, #505050 0%, #707070 100%); transform: translateY(-2px); box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4); }
.theme-default .game-screen { background-color: #f0f2f5; }
.theme-default .card { background-color: #fff; border-color: #ddd; color: #333; }
.theme-default .direction-text { color: #333; }

/* 2. Neon Theme */
.theme-neon {
    font-family: 'Orbitron', sans-serif;
    background: #0d0221;
    color: #00f6ff;
    --neon-glow: 0 0 5px #00f6ff, 0 0 10px #00f6ff, 0 0 20px #2535a9, 0 0 30px #2535a9;
}
.theme-neon .start-screen, .theme-neon .game-over, .theme-neon .leaderboard-screen, .theme-neon .instructions-screen { background: #0d0221; }
.theme-neon h1, .theme-neon h2, .theme-neon .direction-text {
    color: #fff;
    text-shadow: var(--neon-glow);
}
.theme-neon .menu-button { background: transparent; color: #00f6ff; border: 2px solid #00f6ff; box-shadow: inset 0 0 10px #00f6ff, var(--neon-glow); }
.theme-neon .menu-button:hover { background: rgba(0, 246, 255, 0.1); }
.theme-neon .card { background: rgba(13, 2, 33, 0.8); border: 2px solid #00f6ff; box-shadow: var(--neon-glow); }
.theme-neon .menu-icon-btn { background: transparent; color: #00f6ff; border-color: #00f6ff; box-shadow: var(--neon-glow); }
.theme-neon .score-container { background: rgba(255,255,255,0.05); color: #00f6ff; }
.theme-neon .lives { color: #ff00ff; }

/* 3. Nature Theme */
.theme-nature {
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(135deg, #6a8270 0%, #b8c6b3 100%);
    color: #2c3e50;
}
.theme-nature .start-screen { background: linear-gradient(135deg, #6a8270 0%, #b8c6b3 100%); }
.theme-nature h1, .theme-nature h2 { color: #fff; text-shadow: 1px 1px 3px rgba(0,0,0,0.3); }
.theme-nature .menu-button { background: #3a5a40; color: #fff; border: 2px solid #e9f5db; border-radius: 10px; }
.theme-nature .menu-button:hover { background: #588157; }
.theme-nature .card { background: #f1f8e9; border: 4px solid #8aa38a; border-radius: 20px; }
.theme-nature .direction-text { color: #3a5a40; }
.theme-nature .game-screen { background-color: #b8c6b3; }
.theme-nature .menu-icon-btn { background: #3a5a40; border-color: #e9f5db; color: #fff; }

/* 4. Ocean Theme */
.theme-ocean {
    background: linear-gradient(180deg, #0077b6 0%, #00b4d8 100%);
    color: #000000;
    animation: oceanWave 10s ease-in-out infinite;
}
.theme-ocean .start-screen { background: none; }
.theme-ocean h1, .theme-ocean h2 { color: #000000; text-shadow: 0 0 10px rgba(255,255,255,0.5); }
.theme-ocean .menu-button { background: rgba(255,255,255,0.2); border: 2px solid #000000; color: #000000; backdrop-filter: blur(5px); }
.theme-ocean .menu-button:hover { background: rgba(255,255,255,0.3); }
.theme-ocean .card { background: rgba(202, 240, 248, 0.8); border: 3px solid #90e0ef; color: #000000; }
.theme-ocean .direction-text { color: #000000; }
.theme-ocean .game-screen { background-color: #0096c7; }
.theme-ocean .menu-icon-btn { background: rgba(255,255,255,0.2); border-color: #000000; color: #000000; }

/* 5. Sunset Theme */
.theme-sunset {
    background: linear-gradient(45deg, #ff7e5f, #feb47b);
    color: #4a2c2a;
}
.theme-sunset .start-screen { background: linear-gradient(45deg, #ff7e5f, #feb47b); }
.theme-sunset h1, .theme-sunset h2 { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.theme-sunset .menu-button { background: #d36a53; color: #fff; border: none; }
.theme-sunset .card { background: #fff3e0; border: 3px solid #ffcc80; }
.theme-sunset .direction-text { color: #d36a53; }
.theme-sunset .game-screen { background-color: #feb47b; }

/* 6. Space Theme */
.theme-space {
    font-family: 'Gruppo', sans-serif;
    background: #000;
    color: #fff;
}
.theme-space .game-container {
     background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><defs><style>circle{fill:white;}</style></defs><circle cx="10" cy="10" r="1"/><circle cx="50" cy="50" r="1.5"/><circle cx="80" cy="20" r="0.5"/><circle cx="30" cy="70" r="0.8"/></svg>');
}
.theme-space .start-screen, .theme-space .game-over, .theme-space .leaderboard-screen, .theme-space .instructions-screen { background: transparent; }
.theme-space h1, .theme-space h2 { color: #3d9be9; text-shadow: 0 0 5px #3d9be9; font-weight: bold; }
.theme-space .menu-button { background: rgba(61,155,233,0.1); border: 1px solid #3d9be9; color: #3d9be9; }
.theme-space .card { background: rgba(10,20,40,0.9); border: 1px solid #3d9be9; box-shadow: 0 0 10px #3d9be9; }
.theme-space .direction-text { color: #3d9be9; text-shadow: 0 0 4px #3d9be9; }
.theme-space .menu-icon-btn { background: rgba(61,155,233,0.1); border-color: #3d9be9; color: #3d9be9; }
.theme-space .score-container { background: rgba(61,155,233,0.1); color: #3d9be9; }

.theme-space::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
}

/* 7. Candy Theme */
.theme-candy {
    font-family: 'Fredoka One', cursive;
    background: linear-gradient(120deg, #a6c0fe 0%, #f68084 100%);
    color: #fff;
}
.theme-candy .start-screen { background: none; }
.theme-candy h1, .theme-candy h2 { color: #fff; text-shadow: 2px 2px 0px rgba(0,0,0,0.1); }
.theme-candy .menu-button { background: #ff7f90; border: 3px solid #fff; box-shadow: none; border-radius: 50px; }
.theme-candy .card { background: #fff; border: 5px dashed #f68084; color: #f68084; }
.theme-candy .direction-text { color: #ff7f90; }
.theme-candy .game-screen { background-color: #a6c0fe; }

/* 8. Gold Theme */
.theme-gold {
    font-family: 'Cinzel', serif;
    background: radial-gradient(ellipse at center, #d4af37 0%,#b18c21 100%);
    color: #3e2723;
}
.theme-gold .start-screen { background: radial-gradient(ellipse at center, #d4af37 0%,#b18c21 100%); }
.theme-gold h1, .theme-gold h2 { color: #fff; text-shadow: 1px 1px 2px #000; }
.theme-gold .menu-button { background: linear-gradient(to right, #c09f30, #e8c668, #c09f30); color: #3e2723; border: 1px solid #a48118; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }
.theme-gold .card { background: #fff8e1; border: 4px solid; border-image-slice: 1; border-image-source: linear-gradient(to right, #c09f30, #e8c668, #c09f30); }
.theme-gold .direction-text { color: #8d6e63; }
.theme-gold .game-screen { background-color: #b18c21; }

/* 9. Fire Theme */
.theme-fire {
    font-family: 'Cinzel', serif;
    background: #111;
    color: #ffcc00;
}
.theme-fire .start-screen {
    background: linear-gradient(225deg, #ff4500, #ff6347, #ff4500);
    background-size: 200% 200%;
    animation: fireFlicker 2s ease-in-out infinite;
}
.theme-fire h1, .theme-fire h2, .theme-fire .direction-text { color: #ffcc00; text-shadow: 0 0 10px #ff4500, 0 0 5px #ff4500; }
.theme-fire .menu-button { background: #ff4500; color: #fff; border: 1px solid #ff8c00; }
.theme-fire .card { background: rgba(0,0,0,0.7); border: 2px solid #ff4500; box-shadow: inset 0 0 20px #ff4500; }
.theme-fire .game-screen { background: #111; }

/* 10. Ice Theme */
.theme-ice {
    font-family: 'Lato', sans-serif;
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    color: #006064;
}
.theme-ice .game-container { backdrop-filter: blur(10px) saturate(150%); } /* Frosted glass effect */
.theme-ice .start-screen { background: transparent; }
.theme-ice .menu-button, .theme-ice .card { background: rgba(255,255,255,0.5); border: 1px solid #80deea; box-shadow: 0 4px 15px rgba(0, 188, 212, 0.1); }
.theme-ice .menu-button { color: #0097a7; }
.theme-ice .card, .theme-ice .direction-text { color: #00838f; }
.theme-ice h1, .theme-ice h2 { color: #006064; text-shadow: 0 0 5px #fff; }
.theme-ice .game-screen { background: transparent; }

/* 11. Rainbow Theme */
.theme-rainbow {
    background: linear-gradient(45deg, red, orange, yellow, green, blue, indigo, violet);
    background-size: 400% 400%;
    animation: gradientShift 5s ease-in-out infinite;
    color: #fff;
}
.theme-rainbow .start-screen { background: none; }
.theme-rainbow h1, .theme-rainbow h2 { text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.theme-rainbow .menu-button { background: rgba(255,255,255,0.3); border: 1px solid rgba(255,255,255,0.5); }
.theme-rainbow .card { background: rgba(255,255,255,0.8); color: #333; }
.theme-rainbow .direction-text { color: #333; }

/* 12. Galaxy Theme */
.theme-galaxy {
    font-family: 'Orbitron', sans-serif;
    background: #1d2951;
    color: #e6e6fa;
    background-image:
        radial-gradient(circle at 60% 5%, #8a2be2 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, #4b0082 0%, transparent 50%);
}
.theme-galaxy .start-screen { background: none; }
.theme-galaxy h1, .theme-galaxy h2 { color: #9370db; text-shadow: 0 0 8px #e6e6fa; }
.theme-galaxy .menu-button { background: #483d8b; border: 1px solid #9370db; color: #e6e6fa; }
.theme-galaxy .card { background: rgba(25, 25, 112, 0.5); border: 1px solid #9370db; }
.theme-galaxy .direction-text { color: #fff; }

/* 13. Desert Theme */
.theme-desert {
    font-family: 'Almendra', serif;
    background: linear-gradient(to bottom, #f0e68c, #deb887);
    color: #8b4513;
}
.theme-desert .start-screen { background: linear-gradient(to bottom, #f0e68c, #deb887); }
.theme-desert h1, .theme-desert h2 { color: #8b4513; }
.theme-desert .menu-button { background: #cd853f; border: 2px solid #8b4513; color: #fff; }
.theme-desert .card { background: #fffaf0; border: 3px solid #d2b48c; }
.theme-desert .direction-text { color: #8b4513; }
.theme-desert .game-screen { background: #deb887; }

/* 14. Forest Theme */
.theme-forest {
    font-family: 'Quicksand', sans-serif;
    background: #004d40;
    color: #a7ffeb;
}
.theme-forest .start-screen { background: linear-gradient(#004d40, #00695c); }
.theme-forest h1, .theme-forest h2 { color: #fff; text-shadow: 1px 1px 2px #000; }
.theme-forest .menu-button { background: #00796b; border: 1px solid #4db6ac; color: #fff; }
.theme-forest .card { background: #e0f2f1; border: 3px solid #26a69a; color: #004d40; }
.theme-forest .direction-text { color: #004d40; }

/* 15. Underwater Theme */
.theme-underwater {
    background: linear-gradient(#1e3a5f, #4ac2d3);
    color: #fff;
    animation: oceanWave 12s ease-in-out infinite alternate;
}
.theme-underwater .start-screen { background: none; }
.theme-underwater .game-container::before { /* Sun rays effect */
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}
.theme-underwater h1, .theme-underwater h2 { color: #e0f7fa; text-shadow: 0 0 10px #fff; z-index: 1; }
.theme-underwater .menu-button { background: rgba(0, 105, 148, 0.7); border: 1px solid #b3e5fc; color: #fff; z-index: 1; }
.theme-underwater .card { background: rgba(128, 222, 234, 0.8); border: 2px solid #4dd0e1; color: #004d40; z-index: 1; }
.theme-underwater .direction-text { color: #004d40; }

/* 16. Volcano Theme */
.theme-volcano {
    font-family: 'Bungee', cursive;
    background: #212121;
    color: #ff3d00;
}
.theme-volcano .start-screen {
    background: #212121;
    background-image: linear-gradient(to top, #ff3d00 0%, transparent 70%);
}
.theme-volcano h1, .theme-volcano h2 { text-shadow: 0 0 10px #d50000; }
.theme-volcano .menu-button { background: #bf360c; border: 1px solid #ff6e40; color: #fff; border-radius: 2px; }
.theme-volcano .card { background: #424242; border: 3px solid #dd2c00; }
.theme-volcano .direction-text { color: #ff9e80; }

/* 17. Aurora Theme */
.theme-aurora {
    background: #000;
    color: #fff;
    overflow: hidden;
}
.theme-aurora .start-screen { background: #000; position: relative; overflow: hidden; }
.aurora-container { position: absolute; top:0; left:0; right:0; bottom:0; }
.aurora, .aurora:before, .aurora:after {
  content: ''; position: absolute; top: -50%; right: 0; bottom: 0; left: 0;
  background-image: linear-gradient(178deg, #00ffc3 0%, transparent 50%);
  border-radius: 50%;
  animation: rotate 6s infinite linear;
  opacity: 0.3;
}
.aurora:before { animation-delay: -2s; background-image: linear-gradient(178deg, #a626b3 0%, transparent 50%); }
.aurora:after { animation-delay: -4s; background-image: linear-gradient(178deg, #00a2ff 0%, transparent 50%); }
@keyframes rotate { from { transform: rotate(0deg) scale(1.4,1); } to { transform: rotate(360deg) scale(1.4,1); } }
.theme-aurora .start-screen-content { z-index: 1; position: relative; }
.theme-aurora .menu-button { background: rgba(255,255,255,0.1); border: 1px solid #fff; color: #fff; }
.theme-aurora .card { background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.5); }

/* 18. Crystal Theme */
.theme-crystal {
    font-family: 'Glass Antiqua', cursive;
    background: #f0f8ff;
    color: #4a5a6a;
}
.theme-crystal .start-screen {
    background-color: #d1e1ef;
    background-image:
      linear-gradient(30deg, #a6c0fe 12%, transparent 12.5%, transparent 87%, #a6c0fe 87.5%, #a6c0fe),
      linear-gradient(150deg, #a6c0fe 12%, transparent 12.5%, transparent 87%, #a6c0fe 87.5%, #a6c0fe),
      linear-gradient(30deg, #a6c0fe 12%, transparent 12.5%, transparent 87%, #a6c0fe 87.5%, #a6c0fe),
      linear-gradient(150deg, #a6c0fe 12%, transparent 12.5%, transparent 87%, #a6c0fe 87.5%, #a6c0fe),
      linear-gradient(60deg, #a6c0fe77 25%, transparent 25.5%, transparent 75%, #a6c0fe77 75%, #a6c0fe77),
      linear-gradient(60deg, #a6c0fe77 25%, transparent 25.5%, transparent 75%, #a6c0fe77 75%, #a6c0fe77);
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
}
.theme-crystal h1, .theme-crystal h2 { color: #2c3e50; text-shadow: 1px 1px 1px #fff; }
.theme-crystal .menu-button { background: linear-gradient(135deg, #404040 0%, #606060 100%); color: white; border: none; border-radius: 20px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); }
.theme-crystal .card { background: rgba(255,255,255,0.8); border: 1px solid #b0c4de; backdrop-filter: blur(3px); }
.theme-crystal .direction-text { color: #5a7a9a; }

/* END THEME OVERHAUL */

/* Seasonal Theme Effects */

/* Halloween Theme */
.theme-halloween {
    background: #ff6b6b;
    color: #fff;
    animation: flickerEffect 1s infinite;
}

@keyframes flickerEffect {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    51% { opacity: 1; }
    100% { opacity: 1; }
}

.theme-halloween .start-screen { background: #ff6b6b; }
.theme-halloween h1, .theme-halloween h2 { 
    color: #fff; 
    text-shadow: 0 0 10px #ff4500;
}
.theme-halloween .menu-button { 
    background: #7d3c98; 
    border: 2px solid #ff4500;
    color: #fff;
}
.theme-halloween .card { 
    background: rgba(0,0,0,0.8);
    border: 2px solid #ff4500;
    color: #fff;
}

/* Christmas Theme */
.theme-christmas {
    background: #000;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 5px white;
    animation: snowfall var(--snow-speed, 3s) linear infinite;
    pointer-events: none;
}



@keyframes snowfall {
    0% { 
        transform: translateY(-10px) translateX(0);
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) translateX(20px);
        opacity: 0.8;
    }
    100% { 
        transform: translateY(100vh) translateX(0);
        opacity: 0.5;
    }
}

.theme-christmas .start-screen { background: #000; }
.theme-christmas h1, .theme-christmas h2 { 
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
}
.theme-christmas .menu-button {
    background: rgba(255,255,255,0.2);
    border: 2px solid #fff;
    color: #fff;
}
.theme-christmas .card {
    background: rgba(255,255,255,0.9);
    border: 2px solid #fff;
    color: #000;
}

/* 4th of July Theme */
.theme-july4th {
    background: #000033;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.firework-launch {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: fireworkLaunch 1s ease-out;
    opacity: 0.8;
}

.firework-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    animation: fireworkExplode 1.5s ease-out forwards;
    opacity: 1;
}

@keyframes fireworkLaunch {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-70vh) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-70vh) scale(0.5);
        opacity: 0;
    }
}

@keyframes fireworkExplode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    50% {
        transform: 
            translate(
                calc(cos(var(--angle)) * var(--velocity) * 50px),
                calc(sin(var(--angle)) * var(--velocity) * 50px)
            )
            scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: 
            translate(
                calc(cos(var(--angle)) * var(--velocity) * 100px),
                calc(sin(var(--angle)) * var(--velocity) * 100px)
            )
            scale(0);
        opacity: 0;
    }
}

.theme-july4th .start-screen { background: #000033; }
.theme-july4th h1, .theme-july4th h2 { 
    color: #fff;
    text-shadow: 0 0 10px rgba(255,0,0,0.8), 0 0 20px rgba(0,0,255,0.8);
}
.theme-july4th .menu-button {
    background: rgba(255,255,255,0.2);
    border: 2px solid #fff;
    color: #fff;
}
.theme-july4th .card {
    background: rgba(255,255,255,0.9);
    border: 2px solid #ff0000;
    color: #000;
}

/* Scrollbar styling */
.shop-content::-webkit-scrollbar {
    width: 8px;
}

.shop-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.shop-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.shop-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.shop-items::-webkit-scrollbar {
    width: 6px;
}

.shop-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.shop-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.shop-items::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.shop-header .menu-button {
    font-size: 0.8rem;
    padding: 6px 12px;
    min-width: 60px;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 12px 0 0 0;
    gap: 10px;
}

.pagination-btn {
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 18px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.pagination-btn:disabled {
    background: #888;
    color: #ccc;
    cursor: not-allowed;
}

.page-indicator {
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    min-width: 60px;
    text-align: center;
}

/* Category Selection Page */
.shop-categories {
    text-align: center;
    padding: 15px;
}

.shop-categories h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.category-item {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 12px 15px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.2);
}

.category-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.category-name {
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
}

/* IAP Section in Shop Categories */
.iap-section {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.buy-coins-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: black;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.buy-coins-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.buy-coins-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.buy-coins-icon {
    font-size: 1.4rem;
}

.buy-coins-text {
    font-size: 1.1rem;
}

/* Style for Buy Energy button */
.buy-coins-btn:nth-child(2) {
    background: linear-gradient(135deg, #00BFFF, #1E90FF);
}

@media (max-width: 768px) {
    .buy-coins-btn {
        padding: 12px 25px;
        font-size: 1rem;
        min-width: 180px;
    }
    
    .buy-coins-icon {
        font-size: 1.2rem;
    }
    
    .buy-coins-text {
        font-size: 1rem;
    }
}

/* Audio subcategories */
.audio-subcategories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.subcategory-item {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 12px 15px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
}

.subcategory-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.2);
}

.subcategory-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.subcategory-name {
    color: white;
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
}

/* Sound effects categories */
.sound-effects-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.sfx-category-item {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sfx-category-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.2);
}

.sfx-category-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.sfx-category-name {
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    margin: 0;
}

/* Back to audio button */
.back-to-audio {
    background: linear-gradient(135deg, #404040 0%, #606060 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.back-to-audio:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #505050 0%, #707070 100%);
}

/* Back to categories button */
.back-to-categories {
    background: linear-gradient(135deg, #404040 0%, #606060 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.back-to-categories:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #505050 0%, #707070 100%);
}

/* Settings Screen Styles */
.settings-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.settings-header {
    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: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.settings-header h2 {
    color: white;
    margin: 0;
    font-size: 1.8rem;
}

/* Smaller back button for settings */
.settings-header .menu-button {
    padding: 8px 20px;
    font-size: 1rem;
    min-width: auto;
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    -webkit-overflow-scrolling: touch;
}

.settings-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

.settings-section h3 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    text-align: center;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
    margin-right: 15px;
}

.setting-name {
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.setting-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #4CAF50;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Reset Account Button */
.reset-button {
    background: linear-gradient(135deg, #ff4757 0%, #c44569 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

.reset-button:hover {
    background: linear-gradient(135deg, #ff3742 0%, #b33939 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
}

.reset-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 71, 87, 0.3);
}

/* Username Controls Styles */
.username-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#currentUsername {
    color: white;
    font-size: 1rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 80px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.3);
    outline: none;
    margin-bottom: 0;
    width: 140px;
    transition: background 0.2s, border 0.2s;
}
#currentUsername:focus {
    background: rgba(255,255,255,0.2);
    border: 1.5px solid #4CAF50;
    color: #fff;
}

#changeUsernameBtn {
    padding: 6px 12px;
    font-size: 0.8rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#changeUsernameBtn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

#changeUsernameBtn:active {
    transform: translateY(0);
}

/* About Section */
.about-info {
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.6;
}

.about-info p {
    margin: 8px 0;
}

.about-info strong {
    color: white;
}

/* Tutorial Screen Styles */
.tutorial-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    z-index: 1000;
    overflow-y: auto;
}

.tutorial-header {
    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: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.tutorial-header h2 {
    color: white;
    margin: 0;
    font-size: 1.8rem;
}

.tutorial-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
}

.tutorial-step {
    max-width: 400px;
    width: 100%;
}

.tutorial-step h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: white;
}

.tutorial-step p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.tutorial-card {
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tutorial-card:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.3);
}

.tutorial-card.correct {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4CAF50;
    animation: tutorialCorrect 0.5s ease;
}

.tutorial-card.wrong {
    background: rgba(244, 67, 54, 0.3);
    border-color: #f44336;
    animation: tutorialWrong 0.5s ease;
}

.tutorial-tap-area {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.tutorial-tap-button {
    padding: 15px 30px;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tutorial-tap-button:hover {
    background-color: #45a049;
}

.tutorial-timer {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 15px 0;
    color: #ffd700;
}

.tutorial-progress {
    margin-top: 20px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

.tutorial-complete {
    max-width: 400px;
    text-align: center;
}

.tutorial-complete h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #4CAF50;
}

.tutorial-complete p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.tutorial-complete ul {
    text-align: left;
    margin: 20px 0;
    padding-left: 20px;
}

.tutorial-complete li {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

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

@keyframes tutorialWrong {
    0% { transform: scale(1); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    background: #222;
    color: #fff;
}
.leaderboard-table th, .leaderboard-table td {
    padding: 12px;
    text-align: left;
}
.leaderboard-table th {
    background-color: white;
    color: black;
    font-weight: bold;
}
.leaderboard-table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

.small-btn {
    font-size: 0.8em;
    padding: 4px 12px;
    min-width: 60px;
    max-width: 100px;
    border-radius: 12px;
    margin-bottom: 10px;
}

#shareButton {
    margin-top: 10px;
}

/* Enhanced Visual Effects */
@keyframes backgroundPulse {
    0%, 100% { 
        background-size: 100% 100%; 
        opacity: 1; 
    }
    50% { 
        background-size: 110% 110%; 
        opacity: 0.8; 
    }
}

@keyframes backgroundWave {
    0%, 100% { 
        background-position: 0% 50%; 
    }
    50% { 
        background-position: 100% 50%; 
    }
}

@keyframes backgroundFlash {
    0% { 
        filter: brightness(1); 
    }
    50% { 
        filter: brightness(1.3); 
    }
    100% { 
        filter: brightness(1); 
    }
}

@keyframes rippleExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    100% {
        width: 1000px;
        height: 1000px;
        opacity: 0;
    }
}

/* Enhanced particle animations */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 1.5s ease-out forwards;
    z-index: 1000;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(var(--x, 0), var(--y, -100px)) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--x) * 1.5), calc(var(--y) * 1.5)) scale(0.5);
    }
}

@keyframes particleSpread {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--final-x) - var(--start-x, 0)), calc(var(--final-y) - var(--start-y, 0))) scale(0.5);
    }
}

/* Screen shake effect */
.game-container.shake {
    animation: screenShake 0.3s ease-out;
}

@keyframes screenShake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5px, -5px); }
    20% { transform: translate(5px, -5px); }
    30% { transform: translate(-5px, 5px); }
    40% { transform: translate(5px, 5px); }
    50% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, -3px); }
    70% { transform: translate(-3px, 3px); }
    80% { transform: translate(3px, 3px); }
    90% { transform: translate(-1px, -1px); }
}

/* Dynamic background animations for themes */
.theme-neon {
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
    background-size: 400% 400%;
    animation: neonShift 3s ease-in-out infinite;
}

@keyframes neonShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.theme-space {
    background: radial-gradient(circle at center, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}

.theme-space::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
}

@keyframes spaceStars {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

.theme-fire {
    background: linear-gradient(45deg, #ff4500, #ff6347, #ff4500);
    background-size: 200% 200%;
    animation: fireFlicker 2s ease-in-out infinite;
}

@keyframes fireFlicker {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.theme-ocean {
    background: linear-gradient(45deg, #006994, #0099cc, #006994);
    background-size: 300% 300%;
}

@keyframes oceanWave {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes oceanWaveFast {
    0% { 
        background-position: 0% 50%; 
        filter: brightness(1);
    }
    25% { 
        background-position: 50% 50%; 
        filter: brightness(1.2);
    }
    50% { 
        background-position: 100% 50%; 
        filter: brightness(1.1);
    }
    75% { 
        background-position: 50% 50%; 
        filter: brightness(1.3);
    }
    100% { 
        background-position: 0% 50%; 
        filter: brightness(1);
    }
}

/* Enhanced card animations */
.card.correct {
    animation: correctSwipe 0.3s ease-out;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.8);
}

.card.wrong {
    animation: wrongSwipe 0.3s ease-out;
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.8);
}

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

@keyframes wrongSwipe {
    0% { transform: scale(1); }
    25% { transform: scale(1.05) rotate(-2deg); }
    50% { transform: scale(1.1) rotate(2deg); }
    75% { transform: scale(1.05) rotate(-1deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Power-up effects */
.powerup-slow-time {
    animation: slowTime 0.5s ease-in-out;
}

@keyframes slowTime {
    0%, 100% { filter: normal; }
    50% { filter: hue-rotate(180deg) saturate(1.5); }
}

@keyframes purchaseEffect {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

@keyframes coinEarnedEffect {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5) rotate(-10deg); }
    25% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(5deg); }
    75% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8) rotate(10deg); }
}

/* Username Popup Styles */
.username-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.username-popup-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    margin: 20px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.username-popup-header h3 {
    color: white;
    text-align: center;
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.username-popup-body p {
    color: white;
    text-align: center;
    margin: 0 0 15px 0;
    font-size: 1rem;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.username-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

.username-popup-actions .menu-button {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.username-popup-actions .menu-button:first-child {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.username-popup-actions .menu-button:first-child:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.username-popup-actions .menu-button.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.username-popup-actions .menu-button.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateY(-50px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* Profile Icon Styles */
.profile-icon-container {
    position: relative;
}

/* Profile icon in settings menu */
.settings-profile-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-top: 10px;
}

.profile-icon-label {
    color: white;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.profile-icon-btn {
    color: #7289DA;
    border: 2px solid #7289DA;
}

.profile-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.profile-header h2 {
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin: 0;
}

.profile-header-buttons {
    display: flex;
    gap: 10px;
}

.stats-btn {
    background: linear-gradient(135deg, #404040 0%, #606060 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.stats-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #505050 0%, #707070 100%);
}

.profile-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.profile-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.profile-section h3 {
    color: white;
    margin: 0 0 20px 0;
    font-size: 1.4rem;
    border-bottom: 2px solid #606060;
    padding-bottom: 10px;
}

/* Profile Image Styles */
.profile-image-section {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.profile-image-container {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #606060;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Premium Profile Frame */
.profile-image-container.premium {
    border: none;
    padding: 4px;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FF8C00, #FFD700);
    background-size: 200% 200%;
    animation: premium-border 3s ease infinite;
}

.profile-image-container.premium::before {
    content: '👑';
    position: absolute;
    top: -15px;
    right: -5px;
    font-size: 24px;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

@keyframes premium-border {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.profile-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-image-container:hover .profile-image-overlay {
    opacity: 1;
}

.upload-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: white;
    transform: scale(1.05);
}

/* Profile Fields */
.profile-field {
    margin-bottom: 20px;
}

.profile-field label {
    display: block;
    color: white;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1rem;
}

.profile-field input,
.profile-field textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #404040;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.profile-field input:focus,
.profile-field textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.profile-field textarea {
    resize: vertical;
    min-height: 80px;
}

.char-count {
    text-align: right;
    color: #666;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #333;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

/* Save Button */
#saveProfileBtn {
    width: 50%;
    margin: 20px auto 0 auto;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    display: block;
}

#saveProfileBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

#saveProfileBtn:active {
    transform: translateY(0);
}

/* Profile Back Button */
#backToMenuFromProfile {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-width: 60px;
}

/* Profile Stats and Coins Sections */
.profile-section {
    margin-bottom: 20px;
}

.profile-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.profile-stat-item:last-child {
    border-bottom: none;
}

.profile-stat-label {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

.profile-stat-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #4CAF50;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.profile-stats-preview {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.profile-stats-preview h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1rem;
}

.stats-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.stat-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.stat-preview-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-preview-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-content {
        padding: 15px;
    }
    
    .profile-section {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
}

/* Stats Screen Styles */
#statsScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    z-index: 1000;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-header h2 {
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    color: white;
}

.back-btn {
    padding: 12px 24px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #404040 0%, #606060 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #505050 0%, #707070 100%);
}

.back-button {
    padding: 10px 20px;
    font-size: 1rem;
    background: linear-gradient(135deg, #404040 0%, #606060 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #505050 0%, #707070 100%);
}

.stats-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.stats-content {
    flex: 1;
    background: rgba(40, 40, 50, 0.95);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-section {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-section:last-child {
    margin-bottom: 0;
}

.stats-section h3 {
    color: #FFD700;
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    font-weight: bold;
    text-align: center;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 10px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 5px;
}

.stat-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stat-label {
    color: #E0E0E0;
    font-size: 1.1rem;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.stat-value {
    color: #00E676;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    background: rgba(0, 230, 118, 0.1);
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.collection-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.collection-item {
    color: #E0E0E0;
    font-size: 1.1rem;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.collection-item:last-child {
    border-bottom: none;
}

.collection-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

/* Stats Pagination Styles */
.stats-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-pagination .pagination-btn {
    padding: 12px 24px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #404040 0%, #606060 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.stats-pagination .pagination-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #505050 0%, #707070 100%);
}

.stats-pagination .pagination-btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.stats-pagination .page-indicator {
    font-size: 1.2rem;
    color: white;
    font-weight: bold;
    min-width: 80px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.news-icon-container {
    position: relative;
}

.news-icon-btn {
    color: #1DA1F2;
    border: 2px solid #1DA1F2;
}

.news-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    z-index: 1000;
    overflow: hidden;
    min-height: 100vh;
    max-height: 100vh;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.news-header h2 {
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.news-panel {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 20px; /* Reduced padding since pagination is outside */
    position: relative;
    z-index: 1;
    min-height: 0;
    max-height: calc(100vh - 200px); /* Ensure it doesn't take up all space */
}

.news-page {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
    display: none; /* Handled by JS */
    animation: fadeIn 0.5s;
}

.news-page.active {
    display: block;
}

.news-item {
    color: white;
}

.news-date {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 10px;
}

.news-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: white;
}

.news-section {
    margin-bottom: 20px;
}

.news-section h4 {
    color: #4CAF50;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.news-section ul, .news-section ol {
    margin-left: 20px;
}

.news-section li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-action {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(76, 175, 80, 0.3);
}

.news-action .menu-button {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: black;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    min-width: 200px;
}

.news-action .menu-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
}

.news-action .menu-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
}



/* Username validation messages */
.username-error,
.username-success {
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
    transition: all 0.3s ease;
}

.username-error {
    background-color: rgba(255, 71, 87, 0.1);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.username-success {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.username-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}
.username-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    margin: 20px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.username-modal-content h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: white;
}

.username-modal-content > p {
    margin: 0 0 25px 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.username-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.username-option {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.username-option input {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    text-align: center;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.username-option input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.username-option input:focus {
    outline: none;
    border-color: #FFD700;
    background: rgba(255, 255, 255, 0.15);
}

.username-option .menu-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    margin-bottom: 10px;
}

.username-option .menu-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.username-option .recovery-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    font-size: 14px;
    padding: 10px;
    margin-bottom: 0;
}

.username-option .recovery-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(108, 117, 125, 0.4);
}

.username-option h3 {
    margin: 0 0 15px 0;
    color: white;
    font-size: 1.2rem;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.secondary-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268) !important;
    color: white !important;
    margin-top: 10px;
}

.secondary-btn:hover {
    background: linear-gradient(135deg, #5a6268, #495057) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}



.username-error {
    background: rgba(220, 53, 69, 0.2);
    border: 2px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 8px;
    margin: 10px 0;
    color: #ff6b6b;
    font-size: 14px;
    text-align: center;
}

/* Category Header Styles */
.category-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.category-header h3 {
    color: #FFD700;
    font-size: 2rem;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.back-to-categories {
    background: linear-gradient(135deg, #404040 0%, #606060 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.back-to-categories:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #505050 0%, #707070 100%);
}

/* Powerup Panel Styles */
.powerup-panel {
    position: absolute;
    margin: 0 auto;
    padding: 10px;

    /* 🛠 Adjust width to hug content */
    width: auto;
    max-width: 300px;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;

    /* 🎨 Tone down visuals */
    background: transparent;
    border-top: none;

    z-index: 1001;
}

.powerup-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.powerup-item {
    position: relative;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    color: white;
}

.powerup-quantity {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.powerup-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

.powerup-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.powerup-item.used {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(0.9);
}

.powerup-item.used:hover {
    transform: scale(0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.powerup-item.active {
    animation: powerupPulse 1s infinite;
    border-color: #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
}

@keyframes powerupPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 30px rgba(76, 175, 80, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
    }
}

.powerup-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
    margin-bottom: 5px;
}

.powerup-item:hover .powerup-tooltip {
    opacity: 1;
}

.powerup-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* Slow time effect overlay */
.slow-time-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(100, 126, 234, 0.1);
    pointer-events: none;
    z-index: 999;
    animation: slowTimeEffect 3s ease-in-out;
    display: none; /* Temporarily hide to test if this is causing the white bar */
}

@keyframes slowTimeEffect {
    0% {
        opacity: 0;
        background: rgba(100, 126, 234, 0);
    }
    20% {
        opacity: 1;
        background: rgba(100, 126, 234, 0.2);
    }
    80% {
        opacity: 1;
        background: rgba(100, 126, 234, 0.1);
    }
    100% {
        opacity: 0;
        background: rgba(100, 126, 234, 0);
    }
}

@keyframes powerupActivation {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

@keyframes autoCompletePulse {
    0% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.05);
    }
    100% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .powerup-panel {
        top: 100px;
        max-width: 250px;
    }
    
    .powerup-item {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .powerup-container {
        gap: 8px;
        padding: 8px;
    }
}

.daily-login-icon-container {
    position: relative;
}

.daily-login-icon-btn {
    color: #FFAC33;
    border: 2px solid #FFAC33;
}

.daily-login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    z-index: 2000;
    overflow-y: auto;
}

.daily-login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.daily-login-header h2 {
    color: #4CAF50;
    font-size: 1.8rem;
    margin: 0;
}

.daily-login-content {
    flex: 1;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.login-status {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.current-streak {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.streak-label {
    font-size: 1.1rem;
    color: #666;
}

.streak-count {
    font-size: 2rem;
    font-weight: bold;
    color: #4CAF50;
}

.streak-days {
    font-size: 1.1rem;
    color: #666;
}

.next-reward {
    text-align: center;
}

.next-reward-label {
    font-size: 1rem;
    color: #666;
    display: block;
    margin-bottom: 5px;
}

.next-reward-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4CAF50;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.reward-day {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.reward-day:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.reward-day.available {
    border: 3px solid #4CAF50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.reward-day.claimed {
    border: 3px solid #4CAF50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.reward-day.locked {
    opacity: 0.6;
    background: rgba(200, 200, 200, 0.95);
}

.day-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 10px;
}

.reward-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.reward-amount {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.reward-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.claim-status {
    font-size: 0.8rem;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 10px;
    text-transform: uppercase;
}

.claim-status.available {
    background: #4CAF50;
    color: white;
}

.claim-status.claimed {
    background: #4CAF50;
    color: white;
}

.claim-status.locked {
    background: #ccc;
    color: #666;
}

.claim-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.claim-button {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    margin-bottom: 20px;
    min-width: 200px;
}

.claim-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
}

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

.claim-info {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.claim-info p {
    margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rewards-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .reward-day {
        padding: 15px;
    }
    
    .day-number {
        font-size: 1.2rem;
    }
    
    .reward-icon {
        font-size: 1.5rem;
    }
    
    .reward-amount {
        font-size: 1.1rem;
    }
    
    .claim-button {
        padding: 12px 25px;
        font-size: 1.1rem;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .rewards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .daily-login-header h2 {
        font-size: 1.5rem;
    }
    
    .streak-count {
        font-size: 1.5rem;
    }
}

.current-reward-display {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.reward-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    border: 3px solid #4CAF50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(76, 175, 80, 0.2);
}

.reward-card.claimed {
    border-color: #4CAF50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.rewards-preview {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
}

.rewards-preview h3 {
    text-align: center;
    color: #4CAF50;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: bold;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.preview-day {
    background: rgba(76, 175, 80, 0.05);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.preview-day:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.preview-day:active {
    transform: translateY(-1px);
}

.preview-day.current {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.15);
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
}

.preview-day.current:hover {
    background: rgba(76, 175, 80, 0.25);
    box-shadow: 0 8px 30px rgba(76, 175, 80, 0.4);
}

.preview-day.completed {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
    position: relative;
}

.preview-day.completed::after {
    content: '✅';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.2rem;
    color: #4CAF50;
}

.preview-day.completed:hover {
    background: rgba(76, 175, 80, 0.3);
}

.preview-day.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.preview-day.locked:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
    background: rgba(76, 175, 80, 0.05);
}

.preview-day-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 8px;
}

.preview-reward {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
}

.preview-status {
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-status.collected {
    color: #8B5CF6;
}

.preview-status.available {
    color: #4CAF50;
}

.preview-status.countdown {
    color: #FF6B6B;
    font-size: 0.7rem;
}

.claim-info {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 20px;
}

.claim-info p {
    margin: 8px 0;
}

/* Responsive adjustments for the simplified layout */
@media (max-width: 768px) {
    .preview-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .preview-day {
        padding: 15px;
    }
    
    .preview-day-number {
        font-size: 1.3rem;
    }
    
    .preview-reward {
        font-size: 0.9rem;
    }
    
    .preview-status {
        font-size: 0.7rem;
        margin-top: 3px;
    }
    
    .preview-status.countdown {
        font-size: 0.6rem;
    }
    
    .rewards-preview h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .preview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .preview-day {
        padding: 12px;
    }
    
    .preview-day-number {
        font-size: 1.2rem;
    }
    
    .preview-reward {
        font-size: 0.8rem;
    }
    
    .rewards-preview h3 {
        font-size: 1.2rem;
    }
}

.preview-reward {
    font-size: 0.8rem;
}

.preview-status {
    font-size: 0.65rem;
    margin-top: 2px;
}

.preview-status.countdown {
    font-size: 0.55rem;
}

.rewards-preview h3 {
    font-size: 1.2rem;
}

.main-logo-container {
    width: 100%;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.main-logo {
    width: 100%;
    height: clamp(60px, 15vh, 100px);
    object-fit: cover;
    display: block;
    margin-bottom: 0;
}

.tutorial-powerup-area {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.powerup-button {
    padding: 15px 30px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.powerup-button:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.4);
}

.powerup-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Game Mode Selection Popup */
.game-mode-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.game-mode-content {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 30px;
    max-width: 90%;
    width: 400px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid #3498db;
}

.game-mode-content h2 {
    color: #ecf0f1;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.game-mode-content > p {
    color: #bdc3c7;
    margin-bottom: 25px;
    font-size: 1rem;
}

.game-mode-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.game-mode-option {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #3498db;
    transition: all 0.3s ease;
    cursor: pointer;
}

.game-mode-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: #e74c3c;
}

.game-mode-option#hardcoreMode {
    border-color: #e74c3c;
}

.game-mode-option#hardcoreMode:hover {
    border-color: #f39c12;
}

.mode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.mode-header h3 {
    color: #ecf0f1;
    margin: 0;
    font-size: 1.3rem;
}

.mode-badge {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.mode-badge.hardcore {
    background: #e74c3c;
}

.mode-details {
    text-align: left;
    margin-bottom: 15px;
}

.mode-details p {
    color: #bdc3c7;
    margin: 8px 0;
    font-size: 0.9rem;
}

.mode-select-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.mode-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.mode-select-btn.hardcore {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.mode-select-btn.hardcore:hover {
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.mode-cancel-btn {
    background: transparent;
    color: #bdc3c7;
    border: 2px solid #7f8c8d;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-cancel-btn:hover {
    background: #7f8c8d;
    color: white;
}

/* Mobile responsiveness for game mode popup */
@media (max-width: 480px) {
    .game-mode-content {
        padding: 20px;
        margin: 20px;
    }
    
    .game-mode-content h2 {
        font-size: 1.5rem;
    }
    
    .mode-header h3 {
        font-size: 1.1rem;
    }
    
    .mode-details p {
        font-size: 0.85rem;
    }
}

.game-mode-indicator {
    font-size: 0.9rem;
    font-weight: bold;
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid #3498db;
    text-align: center;
    margin-top: 5px;
}

.game-mode-indicator.hardcore {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
}

/* Recovery Modal Styles */
.recovery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.recovery-modal-content {
    background: linear-gradient(135deg, #4a4a6a 0%, #3a3a5a 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    color: black;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.recovery-modal-content h3 {
    margin: 0;
    font-size: 1.5rem;
    color: black;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.recovery-modal-content p {
    margin: 0;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.8);
}

.recovery-code-display {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.2);
}

.recovery-code {
    font-family: 'Courier New', monospace;
    font-size: 1.8rem;
    font-weight: bold;
    color: #FFD700;
    letter-spacing: 3px;
    text-shadow: 0 0 5px #FFD700;
}

.copy-code-btn {
    background: rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.3);
    color: black;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 10px;
    transition: background 0.2s;
}

.copy-code-btn:hover {
    background: rgba(0,0,0,0.2);
}

.recovery-warning {
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.7);
    text-align: left;
    width: 100%;
}

.recovery-warning p {
    margin-bottom: 5px;
}

.recovery-warning ul {
    margin: 0;
    padding-left: 20px;
}

.recovery-warning li {
    margin-bottom: 5px;
}

#recoveryCodeInput {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    color: black;
    font-size: 1.5rem;
    text-align: center;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

#recoveryCodeInput::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

#recoveryCodeInput:focus {
    outline: none;
    border-color: #FFD700;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

#recoveryError {
    color: #ff6b6b;
    font-size: 0.9rem;
    min-height: 1.2em;
}

.recovery-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.recovery-buttons .menu-button {
    flex: 1; /* Make buttons share space equally */
    padding: 12px 10px;
    font-size: 1rem;
    min-width: 0; /* Override min-width from .menu-button */
}

.recovery-recover-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049) !important;
}

.recovery-recover-btn:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50) !important;
}

.recovery-cancel-btn {
    background: linear-gradient(135deg, #888, #666) !important;
}

.recovery-cancel-btn:hover {
    background: linear-gradient(135deg, #666, #888) !important;
}

.recovery-close-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f) !important;
}
.recovery-close-btn:hover {
    background: linear-gradient(135deg, #d32f2f, #f44336) !important;
}

.recovery-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.recovery-controls .small-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: black;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.recovery-controls .small-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.pin-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.pin-controls input {
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    width: 120px;
}

.pin-controls input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.pin-controls .small-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: black;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pin-controls .small-btn:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.leaderboard-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.leaderboard-filter-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    background: #e0e0e0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.leaderboard-filter-btn:hover {
    background: #d5d5d5;
    transform: translateY(-1px);
}

.leaderboard-filter-btn.active {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: black;
    border-color: transparent;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.small-btn {
    padding: 10px 15px;
    font-size: 1rem;
}

.settings-pagination {
    padding: 20px 20px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

/* === View Profile & Stats Modals (New) === */

.view-profile-modal, .view-stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

.view-profile-content, .view-stats-content {
    background: linear-gradient(145deg, #2c2c3e, #3a3a52);
    border-radius: 20px;
    padding: 20px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    color: black;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Modal Headers */
.profile-modal-header, .stats-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.back-profile-btn, .back-stats-btn {
    background: linear-gradient(135deg, #404040 0%, #606060 100%);
    color: black;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.back-profile-btn:hover, .back-stats-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #505050 0%, #707070 100%);
}

.close-profile-btn, .close-stats-btn {
    background: none;
    border: none;
    color: black;
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 5px;
}

.close-profile-btn:hover, .close-stats-btn:hover {
    opacity: 1;
}

.profile-image-view {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #00a2ff;
    margin-bottom: 20px;
    object-fit: cover;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    text-align: left;
}

.info-item {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
}

.info-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 5px;
}

.info-value {
    font-size: 1rem;
    font-weight: bold;
}

.profile-bio-view {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    text-align: left;
    max-height: 100px;
    overflow-y: auto;
}

.profile-bio-view p {
    margin: 0;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.9);
}

.profile-actions {
    margin-top: 10px;
}

/* Stats Modal Specifics */
.stats-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    width: 100%;
}

.stat-item-view {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00a2ff;
}


/* Loading Indicator and Error Popup */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 30000;
}

.spinner {
    border: 8px solid rgba(0, 0, 0, 0.2);
    border-top: 8px solid #00a2ff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

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

.error-popup {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e74c3c;
    color: black;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 40000;
    animation: slideInUp 0.3s ease-out;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.error-popup.fade-out {
    opacity: 0;
}

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

/* Mobile Responsiveness for Modals */
@media (max-width: 768px) {
    .view-profile-content, .view-stats-content {
        width: 95%;
        padding: 15px;
        max-height: 90vh;
        margin: 10px 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .profile-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stats-preview-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stats-grid-view {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .profile-image-view {
        width: 80px;
        height: 80px;
        margin-bottom: 15px;
    }
    
    .back-profile-btn, .back-stats-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .view-profile-content h3, .view-stats-content h3 {
        font-size: 1.3rem;
        margin: 10px 0;
    }
    
    .profile-modal-header, .stats-modal-header {
        position: sticky;
        top: 0;
        background: linear-gradient(145deg, #2c2c3e, #3a3a52);
        z-index: 10;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
    
    .profile-actions {
        position: sticky;
        bottom: 0;
        background: linear-gradient(145deg, #2c2c3e, #3a3a52);
        padding: 15px 0 0 0;
        margin-top: 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 480px) {
    .view-profile-content, .view-stats-content {
        width: 98%;
        padding: 12px;
        border-radius: 15px;
    }
    
    .profile-modal-header, .stats-modal-header {
        margin-bottom: 15px;
        padding-bottom: 8px;
    }
    
    .profile-bio-view {
        padding: 10px;
        max-height: 80px;
    }
    
    .stat-item-view {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
}

/* Mobile Styles for Stats Screen */
@media (max-width: 768px) {
    #statsScreen {
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile browsers */
    }
    
    .stats-header {
        padding: 15px;
        flex-shrink: 0;
    }
    
    .stats-header h2 {
        font-size: 1.8rem;
    }
    
    .back-btn {
        padding: 8px 16px;
        font-size: 1rem;
    }
    
    .stats-container {
        padding: 15px;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .stats-content {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .stats-section {
        margin-bottom: 20px;
        padding: 15px;
    }
    
    .stats-section h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .stat-item {
        padding: 12px 8px;
        margin-bottom: 3px;
    }
    
    .stat-label {
        font-size: 1rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
        padding: 3px 8px;
    }
    
    .collection-stats {
        padding: 12px;
        gap: 8px;
    }
    
    .collection-item {
        font-size: 1rem;
        padding: 8px 10px;
    }
    
    .stats-pagination {
        padding: 15px;
        gap: 15px;
        flex-shrink: 0;
    }
    
    .stats-pagination .pagination-btn {
        padding: 10px 20px;
        font-size: 1rem;
        min-width: 80px;
    }
    
    .stats-pagination .page-indicator {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    /* Additional mobile optimizations for stats screen */
    #statsScreen {
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .stats-header {
        padding: 10px;
        flex-shrink: 0;
    }
    
    .stats-header h2 {
        font-size: 1.5rem;
    }
    
    .back-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .stats-container {
        padding: 10px;
        padding-bottom: 100px; /* Extra space for pagination */
        overflow-y: visible;
        max-height: none;
    }
    
    .stats-content {
        padding: 10px;
        min-height: auto;
    }
    
    .stats-section {
        padding: 15px;
        margin-bottom: 20px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .stats-section h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
        color: #000000;
        font-weight: bold;
    }
    
    .stat-item {
        padding: 12px 8px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .stat-item:last-child {
        border-bottom: none;
    }
    
    .stat-label {
        font-size: 1rem;
        opacity: 0.8;
        color: #000000;
    }
    
    .stat-value {
        font-size: 1.4rem;
        padding: 4px 8px;
        align-self: flex-start;
        font-weight: bold;
        color: #000000;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }
    
    .collection-stats {
        padding: 15px 0;
        gap: 12px;
    }
    
    .collection-item {
        font-size: 1rem;
        padding: 10px 12px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 6px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #000000;
    }
    
    .stats-pagination {
        padding: 15px 10px;
        gap: 15px;
        margin-top: 20px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 8px;
        position: relative;
        flex-shrink: 0;
    }
    
    .stats-pagination .pagination-btn {
        padding: 10px 18px;
        font-size: 1rem;
        min-width: 80px;
        font-weight: bold;
    }
    
    .stats-pagination .page-indicator {
        font-size: 1.1rem;
        font-weight: bold;
        color: #000000;
    }
}

/* Modern Stats Page Styling */
.stats-page-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.stats-page-header h2 {
    color: #000000;
    font-size: 2rem;
    margin: 0 0 8px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-weight: bold;
}

.stats-page-header p {
    color: #000000;
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}

/* Achievement Cards for High Scores */
.stats-card-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.achievement-card {
    display: flex;
    align-items: center;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.5);
}

.achievement-icon {
    font-size: 3rem;
    margin-right: 20px;
    animation: achievementFloat 2s ease-in-out infinite;
}

@keyframes achievementFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.achievement-content {
    flex: 1;
}

.achievement-label {
    color: #000000;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.achievement-value {
    color: #000000;
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Stats Cards for Game Statistics */
.stats-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: rgba(40, 40, 50, 0.9);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stats-card:hover {
    background: rgba(50, 50, 60, 0.95);
    transform: translateX(10px);
    border-color: rgba(0, 230, 118, 0.3);
}

.stats-icon {
    font-size: 2.5rem;
    margin-right: 20px;
    opacity: 0.8;
}

.stats-content {
    flex: 1;
}

.stats-label {
    color: #000000;
    font-size: 1rem;
    margin-bottom: 5px;
}

.stats-value {
    color: #000000;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Coins Display */
.coins-display-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.large-coin-display {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 193, 7, 0.1) 100%);
    border-radius: 25px;
    border: 3px solid rgba(255, 193, 7, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: coinGlow 2s ease-in-out infinite alternate;
}

@keyframes coinGlow {
    0% { box-shadow: 0 10px 30px rgba(255, 193, 7, 0.2), 0 0 20px rgba(255, 193, 7, 0.1); }
    100% { box-shadow: 0 15px 40px rgba(255, 193, 7, 0.4), 0 0 30px rgba(255, 193, 7, 0.2); }
}

.coin-icon-large {
    font-size: 5rem;
    margin-bottom: 15px;
    animation: coinRotate 3s linear infinite;
}

@keyframes coinRotate {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
}

.coin-amount-large {
    color: #000000;
    font-size: 3.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
}

.coin-label {
    color: #000000;
    font-size: 1.3rem;
    font-weight: 500;
}

/* Collection Cards */
.collection-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.collection-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: rgba(40, 40, 50, 0.9);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.collection-card:hover {
    background: rgba(50, 50, 60, 0.95);
    transform: translateX(5px);
    border-color: rgba(138, 43, 226, 0.3);
}

.collection-icon {
    font-size: 2.5rem;
    margin-right: 20px;
}

.collection-info {
    flex: 1;
}

.collection-label {
    color: #000000;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.collection-progress {
    margin-bottom: 10px;
}

.collection-count {
    color: #000000;
    font-size: 1.8rem;
    font-weight: bold;
}

.collection-total {
    color: #000000;
    font-size: 1.2rem;
}

.collection-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.collection-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #9C27B0, #E1BEE7);
    transition: width 0.5s ease;
    border-radius: 4px;
}

/* Compact Stats Grid for User Stats Modal */
.compact-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.compact-stat-card {
    background: rgba(40, 40, 50, 0.95);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.compact-stat-card:hover {
    background: rgba(50, 50, 60, 0.95);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.compact-stat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.compact-stat-value {
    color: #000000;
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.compact-stat-label {
    color: #000000;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Mobile Responsive Design for New Stats */
@media (max-width: 768px) {
    .stats-page-header h2 {
        font-size: 1.7rem;
    }
    
    .achievement-card {
        padding: 20px;
    }
    
    .achievement-icon {
        font-size: 2.5rem;
        margin-right: 15px;
    }
    
    .achievement-value {
        font-size: 2rem;
    }
    
    .coin-icon-large {
        font-size: 4rem;
    }
    
    .coin-amount-large {
        font-size: 2.8rem;
    }
    
    .compact-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .stats-page-header {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .stats-page-header h2 {
        font-size: 1.5rem;
    }
    
    .achievement-card {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }
    
    .achievement-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .stats-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .stats-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .collection-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .collection-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .compact-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .compact-stat-card {
        padding: 12px;
    }
    
    .compact-stat-icon {
        font-size: 1.8rem;
    }
    
    .compact-stat-value {
        font-size: 1.4rem;
    }
}

/* Mini Progress Bars for Collection Stats */
.collection-mini-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 5px;
}

.collection-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, #9C27B0, #E1BEE7);
    transition: width 0.5s ease;
    border-radius: 2px;
}

/* Friends Screen Styles */
.friends-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    color: white;
}

.friends-screen .screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.friends-screen .screen-header h2 {
    font-size: 1.8rem;
    margin: 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.friends-screen .back-button {
    background: linear-gradient(135deg, #404040 0%, #606060 100%);
    color: black;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.friends-screen .back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #505050 0%, #707070 100%);
}

.friends-list-screen .back-button,
.friend-requests-screen .back-button,
.challenges-screen .back-button,
.received-challenges-screen .back-button,
.sent-challenges-screen .back-button,
.past-challenges-screen .back-button {
    background: linear-gradient(135deg, #404040 0%, #606060 100%) !important;
    color: black !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 10px 20px !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
}

.friends-list-screen .back-button:hover,
.friend-requests-screen .back-button:hover,
.challenges-screen .back-button:hover,
.received-challenges-screen .back-button:hover,
.sent-challenges-screen .back-button:hover,
.past-challenges-screen .back-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4) !important;
    background: linear-gradient(135deg, #505050 0%, #707070 100%) !important;
}

.friends-menu-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    justify-content: center;
}

.friends-menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
}

.friends-menu-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: black;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.friends-menu-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.friends-menu-btn .menu-icon {
    font-size: 1.5rem;
    margin-right: 15px;
}

.friends-menu-btn .menu-text {
    flex: 1;
    text-align: left;
}

.friends-menu-btn .menu-arrow {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease;
}

.friends-menu-btn:hover .menu-arrow {
    transform: translateX(5px);
    color: rgba(255, 255, 255, 0.9);
}

.friends-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 20px 20px;
    overflow: hidden;
}

/* Friends Content */
.friends-content {
    flex: 1;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
}

/* Individual Friend Screens - FORCE DARK THEME UPDATE */
.friends-list-screen,
.friend-requests-screen,
.challenges-screen,
.received-challenges-screen,
.sent-challenges-screen,
.past-challenges-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    color: black !important;
    display: none;
    flex-direction: column;
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.friends-list-screen .screen-header,
.friend-requests-screen .screen-header,
.challenges-screen .screen-header,
.received-challenges-screen .screen-header,
.sent-challenges-screen .screen-header,
.past-challenges-screen .screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.friends-list-screen h2,
.friend-requests-screen h2,
.challenges-screen h2,
.received-challenges-screen h2,
.sent-challenges-screen h2,
.past-challenges-screen h2 {
    font-size: 1.8rem;
    margin: 0;
    color: black;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.tab-content h3 {
    margin: 0 0 15px 0;
    color: #4CAF50;
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 2px solid rgba(76, 175, 80, 0.3);
    padding-bottom: 8px;
}

/* Friends List */
.friends-list, .requests-list, .challenges-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.friend-card, .request-card, .challenge-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 22px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.friend-card:hover, .request-card:hover, .challenge-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(76, 175, 80, 0.5);
}

.friend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.friend-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.friend-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: black;
}

.friend-score {
    font-size: 1.1rem;
    font-weight: 600;
    color: #FFD700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.friend-level {
    font-weight: 600;
    color: #4CAF50;
}

.friend-online {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.friend-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 8px;
}

.friend-action-btn, .accept-btn, .decline-btn, .challenge-action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 80px;
}

.challenge-btn, .accept-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: black;
}

.challenge-btn:hover, .accept-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-1px);
}

.view-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: black;
}

.view-btn:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-1px);
}

.remove-btn, .decline-btn {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: black;
}

.remove-btn:hover, .decline-btn:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    transform: translateY(-1px);
}

/* Request Cards */
.request-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.request-user {
    font-size: 1.1rem;
    font-weight: 600;
    color: black;
}

.request-time {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.request-status {
    color: #FFC107;
    font-weight: 500;
}

.request-actions {
    display: flex;
    gap: 10px;
}

.request-card.sent {
    border-color: rgba(255, 193, 7, 0.3);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
}

/* Challenge Cards */
.challenge-card {
    border-left: 4px solid #FF9800;
}

/* Past Challenge Cards */
.past-challenge-card {
    border-left: 4px solid #9b59b6;
}

.challenge-status.won {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: black;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85em;
}

.challenge-status.lost {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: black;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85em;
}

.challenge-status.draw {
    background: linear-gradient(135deg, #95a5a6, #bdc3c7);
    color: black;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85em;
}

.challenge-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.challenge-type {
    font-size: 1.1rem;
    font-weight: 600;
    color: #FF9800;
}

.challenge-target {
    color: rgba(255, 255, 255, 0.8);
}

.challenge-expiry {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.challenge-actions {
    display: flex;
    gap: 10px;
}

.challenge-action-btn.accept {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: black;
}

.challenge-action-btn.decline {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: black;
}

.challenge-action-btn.play {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: black;
}

/* Empty States */
.no-friends, .no-requests, .no-challenges {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

/* Challenge Notification Badge */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
    z-index: 10;
    animation: notificationPulse 2s infinite;
    pointer-events: none;
}

/* Menu Button Badge */
.menu-button-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: black;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
    z-index: 5;
    animation: notificationPulse 2s infinite;
}

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

/* Ensure notifications screen appears on top */
.notifications-screen {
    z-index: 1000 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Challenge Notification Popup */
.challenge-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.challenge-notification-content {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: black;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 300px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.challenge-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.challenge-text {
    flex: 1;
}

.challenge-text strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.challenge-text p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.challenge-notification-btn {
    background: rgba(255, 255, 255, 0.2);
    color: black;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.challenge-notification-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Challenge Result Modal */
.challenge-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2500;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.challenge-result-content {
    background: linear-gradient(135deg, #2c2c2c 0%, #404040 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
    animation: slideInUp 0.3s ease-out;
}

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

.challenge-result-content.won {
    border-color: #4CAF50;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.challenge-result-content.lost {
    border-color: #f44336;
    box-shadow: 0 20px 60px rgba(244, 67, 54, 0.2);
}

.challenge-result-content.tie {
    border-color: #FF9800;
    box-shadow: 0 20px 60px rgba(255, 152, 0, 0.2);
}

.challenge-result-header {
    margin-bottom: 25px;
}

.challenge-result-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.challenge-result-header h3 {
    color: black;
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

.challenge-result-content.won h3 {
    color: #4CAF50;
}

.challenge-result-content.lost h3 {
    color: #f44336;
}

.challenge-result-content.tie h3 {
    color: #FF9800;
}

.challenge-scores {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-item {
    flex: 1;
    text-align: center;
}

.score-item.winner {
    color: #4CAF50;
    font-weight: bold;
}

.score-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-value {
    display: block;
    color: black;
    font-size: 20px;
    font-weight: bold;
}

.score-vs {
    color: rgba(255, 255, 255, 0.5);
    font-weight: bold;
    font-size: 14px;
    margin: 0 15px;
}

.challenge-reward {
    margin: 20px 0;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.challenge-reward.coins-earned {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.challenge-reward.no-coins {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
}

.reward-text {
    color: black;
    font-weight: bold;
    font-size: 16px;
}

.no-reward-text {
    color: black;
    font-weight: bold;
    font-size: 14px;
    opacity: 0.9;
}

.challenge-result-ok {
    margin-top: 20px;
    padding: 12px 30px;
    font-size: 16px;
    min-width: 120px;
}

/* Pagination for Friends */
.friends-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.friends-pagination .pagination-btn {
    background: linear-gradient(135deg, #404040 0%, #606060 100%);
    color: black;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 80px;
}

.friends-pagination .pagination-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #505050 0%, #707070 100%);
    transform: translateY(-1px);
}

.friends-pagination .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.friends-pagination .page-indicator {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Modals */
.friend-modal, .challenge-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.friend-modal-content, .challenge-modal-content {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
}

.friend-modal-content h3, .challenge-modal-content h3 {
    margin: 0 0 20px 0;
    color: black;
    font-size: 1.5rem;
    text-align: center;
}

.friend-modal-content input, .challenge-modal-content input, .challenge-modal-content select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: black;
    font-size: 1rem;
    margin-bottom: 15px;
}

.friend-modal-content input::placeholder, .challenge-modal-content input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.friend-modal-content input:focus, .challenge-modal-content input:focus, .challenge-modal-content select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.modal-actions .menu-button {
    flex: 1;
    margin: 0;
}

/* Success/Error Messages */
.success-message, .error-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, 0);
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 16px;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideInDown 0.3s ease-out;
}

.success-message {
    background: #4CAF50;
    color: black;
}

.error-message {
    background: #f44336;
    color: black;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .friends-screen .screen-header {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
    }
    
    .friends-screen .screen-header h2 {
        font-size: 1.5rem;
    }
    
    .friends-container {
        padding: 0 15px 15px;
    }
    
    .friends-tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .tab-button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .friend-card, .request-card, .challenge-card {
        padding: 15px;
    }
    
    .friend-actions {
        flex-direction: column;
    }
    
    .friend-action-btn {
        flex: none;
        width: 100%;
    }
    
    .request-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .request-actions {
        width: 100%;
    }
    
    .accept-btn, .decline-btn {
        flex: 1;
    }
    
    .settings-pagination {
        position: sticky;
        bottom: 0;
        background: rgba(30, 30, 30, 0.95);
        z-index: 100;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
    }
}

@media (max-width: 480px) {
    .friends-screen .screen-header {
        padding: 10px;
    }
    
    .friends-container {
        padding: 0 10px 10px;
    }
    
    .friends-content {
        padding: 15px;
    }
    
    .friend-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .friend-modal-content, .challenge-modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .friends-pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .friends-pagination .pagination-btn {
        width: 100%;
    }
}

/* Loading indicator styles */
.loading-indicator {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: black;
    font-style: italic;
}

.no-friends {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: black;
    background: #f5f5f5;
    border-radius: 10px;
    margin: 10px 0;
}

/* Challenge card status styles */
.challenge-scores {
    font-weight: bold;
    color: black;
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 5px;
    margin: 5px 0;
    display: block;
}

.challenge-result {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    margin: 5px 0;
    display: block;
}

.challenge-result:contains("WON") {
    background: #d4edda;
    color: black;
}

.challenge-result:contains("lost") {
    background: #f8d7da;
    color: black;
}

.challenge-result:contains("TIE") {
    background: #fff3cd;
    color: black;
}

.challenge-progress, .challenge-waiting {
    color: black;
    font-style: italic;
    font-size: 0.9em;
}

.challenge-status {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

.pending {
    color: #fd7e14;
}

.completed {
    color: #28a745;
}

.declined {
    color: #dc3545;
}

/* Admin Panel Styles */
.admin-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: black;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    overflow-y: auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
}

/* Events Tab Styles */
.admin-events-controls {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 25px;
    margin: 20px auto;
    backdrop-filter: blur(10px);
    max-width: 600px;
}

.admin-events-controls h3 {
    color: black;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    font-size: 1.4em;
    text-align: center;
}

.events-section {
    margin: 20px 0;
}

.events-section h4 {
    color: black;
    font-size: 1.2em;
    margin-bottom: 15px;
    text-align: center;
}

.event-theme-toggles {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-theme-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.event-theme-item:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.event-theme-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-theme-icon {
    font-size: 24px;
}

.event-theme-name {
    font-size: 16px;
    font-weight: 500;
    color: black;
}

/* Toggle Switch Styles */
.event-theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.event-theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.event-theme-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.2);
    transition: .4s;
    border-radius: 34px;
}

.event-theme-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .event-theme-slider {
    background-color: #4CAF50;
}

input:focus + .event-theme-slider {
    box-shadow: 0 0 1px #4CAF50;
}

input:checked + .event-theme-slider:before {
    transform: translateX(26px);
}

.admin-header {
    position: relative;
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.admin-header h2 {
    font-size: 2rem;
    margin: 0;
    color: black;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.admin-back-btn {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #404040 0%, #606060 100%);
    border: none;
    color: black;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.admin-back-btn:hover {
    background: linear-gradient(135deg, #505050 0%, #707070 100%);
    transform: translateY(-50%) translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

.admin-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

.admin-nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 25px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.admin-nav-btn {
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: black;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 50px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-nav-btn.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.admin-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.admin-search-section {
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.admin-search-section input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    color: black;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.admin-search-section input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.admin-search-section input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.admin-action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.admin-action-buttons button {
    padding: 10px 16px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: black;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.admin-action-buttons button:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

/* System Stats Styles */
.system-stats {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.system-stats h3 {
    color: black;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.system-stats p {
    color: black;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    margin-bottom: 8px;
    font-size: 1.05em;
    line-height: 1.5;
}

.system-stats strong {
    color: black;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.admin-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 0 10px;
}

.admin-controls input,
.admin-controls button {
    padding: 10px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
}

.admin-controls input {
    background: rgba(255, 255, 255, 0.1);
    color: black;
    flex: 1;
    min-width: 200px;
    backdrop-filter: blur(10px);
}

.admin-controls input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.admin-controls input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.admin-controls button {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: black;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.admin-controls button:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.admin-list {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 15px;
    max-height: 65vh;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.admin-user-item {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-user-item:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.admin-user-info {
    flex: 1;
}

.admin-user-name {
    font-weight: 700;
    font-size: 1.15em;
    margin-bottom: 6px;
    color: black;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.admin-user-stats {
    font-size: 0.9em;
    color: black;
    line-height: 1.4;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.admin-user-actions {
    display: flex;
    gap: 10px;
}

.admin-user-actions button {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.edit-user-btn {
    background: #4CAF50;
    color: black;
}

.edit-user-btn:hover {
    background: #45a049;
}

.delete-user-btn {
    background: #f44336;
    color: black;
}

.delete-user-btn:hover {
    background: #da190b;
}

.admin-system-stats {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.admin-system-stats h3 {
    margin-bottom: 15px;
}

.admin-bulk-actions {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 25px;
    margin: 20px auto;
    backdrop-filter: blur(10px);
    max-width: 600px;
}

.admin-bulk-actions h3 {
    color: black;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    font-size: 1.4em;
    text-align: center;
}

.bulk-action-item {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bulk-action-item label {
    color: black;
    font-weight: 600;
    font-size: 1.1em;
    text-align: center;
}

.bulk-action-item input,
.bulk-action-item textarea {
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: black;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.bulk-action-item textarea {
    min-height: 120px;
    resize: vertical;
}

.bulk-action-item input:focus,
.bulk-action-item textarea:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    outline: none;
}

.bulk-action-item button {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: black;
    border: none;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin: 10px auto;
    display: block;
    width: fit-content;
    min-width: 200px;
}

.bulk-action-item button:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

@media (max-width: 768px) {
    .admin-bulk-actions {
        padding: 20px;
        margin: 15px;
    }

    .admin-bulk-actions h3 {
        font-size: 1.2em;
    }

    .bulk-action-item {
        margin: 15px 0;
        gap: 12px;
    }

    .bulk-action-item input,
    .bulk-action-item textarea {
        padding: 12px;
        font-size: 14px;
    }

    .bulk-action-item button {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 160px;
    }
}

.bulk-action-item textarea {
    min-height: 80px;
    resize: vertical;
}

.bulk-action-item input:focus,
.bulk-action-item textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.18);
}

.bulk-action-item button {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: black;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.bulk-action-item button:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Admin Modal */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1100;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.admin-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: black;
    padding: 25px;
    border-radius: 15px;
    width: 100%;
    max-width: 450px;
    margin: 20px auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.edit-form-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 15px 0 20px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.edit-form-pagination button {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: black;
    border: 2px solid rgba(255, 255, 255, 0.2);
        padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.edit-form-pagination button:hover:not(:disabled) {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.edit-form-pagination button:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.edit-form-pagination span {
    font-weight: 600;
    font-size: 14px;
    color: black;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.user-edit-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 0;
}

.edit-page {
    display: none;
    flex-direction: column;
    gap: 16px;
    min-height: 200px;
}

.edit-page.active {
    display: flex;
}

/* System page pagination styles */
.system-pages-container {
    position: relative;
    min-height: 300px;
}

.system-page {
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    display: none !important;
    margin-top: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.system-page.active {
    display: block !important;
    opacity: 1;
    position: relative;
}

.user-edit-form label {
    font-weight: 600;
    margin-bottom: 6px;
    color: black;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.user-edit-form input {
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: black;
    font-size: 15px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.user-edit-form input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.18);
}

.user-edit-form input:read-only {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    opacity: 0.8;
    cursor: not-allowed;
}

.admin-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.admin-modal-actions button {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 110px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.admin-modal-actions button:first-child {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: black;
    border-color: rgba(255, 255, 255, 0.2);
}

.admin-modal-actions button:first-child:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.admin-modal-actions button:nth-child(2) {
    background: linear-gradient(45deg, #f44336, #d32f2f);
    color: black;
    border-color: rgba(255, 255, 255, 0.2);
}

.admin-modal-actions button:nth-child(2):hover {
    background: linear-gradient(45deg, #d32f2f, #f44336);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.admin-modal-actions button:last-child {
    background: linear-gradient(45deg, #757575, #616161);
    color: black;
    border-color: rgba(255, 255, 255, 0.2);
}

.admin-modal-actions button:last-child:hover {
    background: linear-gradient(45deg, #616161, #757575);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(117, 117, 117, 0.4);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: black;
    font-size: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Admin Pagination Styles */
.admin-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.admin-pagination button {
    background: #4CAF50;
    color: black;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    min-width: 100px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.admin-pagination button:hover:not(:disabled),
.admin-pagination button:active:not(:disabled) {
    background: #45a049;
    transform: translateY(-1px);
}

.admin-pagination button:disabled {
    background: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.5);
    cursor: not-allowed;
    transform: none;
}

.admin-pagination span {
    font-weight: bold;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}

/* Recovery Code Specific Styles */
.recovery-code-item {
    background: rgba(255,255,255,0.1);
    margin: 8px 0;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
    border-left: 3px solid transparent;
}

.recovery-code-item:hover {
    background: rgba(255,255,255,0.2);
    border-left-color: #FF9800;
}

.recovery-code-info {
    flex: 1;
}

.recovery-code-user {
    font-weight: bold;
    font-size: 1.1em;
    color: #FF9800;
    margin-bottom: 3px;
}

.recovery-code-details {
    font-size: 0.85em;
    opacity: 0.8;
    font-family: monospace;
}

.recovery-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    margin-left: 8px;
}

.recovery-status.unused {
    background: #4CAF50;
    color: black;
}

.recovery-status.used {
    background: #f44336;
    color: black;
}

/* IAP (In-App Purchase) Screen Styles */
.iap-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
}

.iap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.iap-header h2 {
    font-size: 1.4rem;
    margin: 0;
    color: black;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.iap-header .menu-button {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-width: auto;
}

.iap-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.current-coins {
    text-align: center;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 15px;
    backdrop-filter: blur(10px);
}

.coins-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
}

.coin-icon {
    font-size: 1.2rem;
}

.coin-amount {
    font-size: 1.2rem;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.current-coins p {
    color: black;
    margin: 0;
        font-size: 0.9rem;
    font-weight: 600;
    display: inline;
    margin-right: 6px;
}

.iap-packages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.iap-package {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.iap-package:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.package-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.package-info {
    flex: 1;
}

.package-coins {
    font-size: 1.2rem;
    font-weight: bold;
    color: black;
    margin-bottom: 3px;
}

.package-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 3px;
}

.package-value {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.purchase-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    border-radius: 8px;
    padding: 12px;
    color: black;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    flex-shrink: 0;
}

.purchase-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
}

.purchase-btn.popular {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.purchase-btn.popular:hover {
    background: linear-gradient(135deg, #F7931E 0%, #FF6B35 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.purchase-btn.best-value {
    background: linear-gradient(135deg, #8E44AD 0%, #9B59B6 100%);
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.3);
}

.purchase-btn.best-value:hover {
    background: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%);
    box-shadow: 0 6px 20px rgba(142, 68, 173, 0.4);
}

.iap-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.iap-info p {
    color: black;
    margin: 0 0 15px 0;
    font-size: 1.1rem;
}

.iap-info ul {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 20px 0;
    padding-left: 20px;
}

.iap-info li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.iap-disclaimer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    margin-top: 15px;
}

/* Premium Screen uses the same styles as IAP screen */

.iap-disclaimer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0;
    text-align: center;
}

@media (max-width: 768px) {
    .iap-packages {
        gap: 10px;
    }
    
    .iap-package {
        padding: 12px;
        gap: 12px;
    }
    
    .package-icon {
        font-size: 1.8rem;
    }
    
    .package-coins {
        font-size: 1.1rem;
    }
    
    .package-price {
        font-size: 1.2rem;
    }
    
    .purchase-btn {
        width: 55px;
        height: 55px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .iap-content {
        padding: 15px;
    }
    
    .iap-package {
        padding: 10px;
        gap: 10px;
    }
    
    .package-icon {
        font-size: 1.5rem;
    }
    
    .package-coins {
        font-size: 1rem;
    }
    
    .package-price {
        font-size: 1.1rem;
    }
    
    .package-value {
        font-size: 0.75rem;
    }
    
    .purchase-btn {
        width: 50px;
        height: 50px;
        font-size: 0.75rem;
    }
}

.reset-recovery-btn {
    background: #FF9800;
    color: black;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
    white-space: nowrap;
}

.reset-recovery-btn:hover {
    background: #F57C00;
    transform: translateY(-1px);
}

/* Mobile Responsive for Admin Panel */
@media (max-width: 768px) {
    .admin-header {
        padding: 15px 20px;
    }
    
    .admin-header h2 {
        font-size: 1.6rem;
    }
    
    .admin-back-btn {
        left: 15px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .admin-content {
        padding: 20px;
        font-size: 14px;
    }
    
    .admin-nav-grid {
        max-width: 100%;
        gap: 8px;
        grid-template-columns: repeat(5, 1fr);
    }
    
    .admin-nav-btn {
        padding: 8px 6px;
        font-size: 16px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .admin-search-section {
        max-width: 100%;
        margin-bottom: 15px;
    }
    
    .admin-action-buttons {
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .admin-action-buttons button {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .admin-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .admin-controls input {
        min-width: 100%;
    }
    
    .admin-user-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 10px;
    }
    
    .admin-user-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 6px;
    }

    .admin-user-actions button {
        font-size: 11px;
        padding: 5px 8px;
    }

    .admin-user-stats {
        font-size: 0.8em;
    }

    .admin-pagination {
        gap: 10px;
        padding: 8px;
    }

    .admin-pagination button {
        padding: 6px 12px;
        font-size: 12px;
    }

    .admin-pagination span {
        font-size: 12px;
    }

    .admin-list {
        max-height: 300px;
        padding: 8px;
    }
    
    /* Increase height for recovery codes list specifically */
    #adminRecoveryList.admin-list {
        max-height: 400px;
        min-height: 300px;
    }
    
    .admin-modal-actions {
        flex-direction: column;
    }
    
    .admin-modal-actions button {
        width: 100%;
    }

    .recovery-code-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .recovery-code-details {
        font-size: 0.8em;
    }

    .admin-user-item .admin-user-actions {
        align-self: stretch;
    }
    
    /* Mobile Admin Modal Styles */
    .admin-modal {
        padding: 15px;
        align-items: flex-start;
    }
    
    .admin-modal-content {
        padding: 20px;
        margin: 10px auto;
        max-width: 95%;
    }
    
    .admin-modal-content h3 {
        font-size: 1.3em;
        margin-bottom: 15px;
        text-align: center;
        color: black;
    }
    
    .user-edit-form {
        gap: 14px;
    }
    
    .user-edit-form input {
        padding: 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .admin-modal-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }
    
    .admin-modal-actions button {
        flex: none;
        width: 100%;
        padding: 16px;
        font-size: 15px;
        min-width: auto;
    }
    
    /* Mobile Edit Form Pagination */
    .edit-form-pagination {
        padding: 8px;
        margin: 10px 0 15px 0;
    }
    
    .edit-form-pagination button {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .edit-form-pagination span {
        font-size: 13px;
    }
    
    .edit-page {
        min-height: 180px;
    }
}

/* Touch-friendly design for mobile */
@media (max-width: 768px) {
  /* Energy system mobile adjustments */
  .energy-container {
    padding: 8px 12px;
    gap: 8px;
    margin-bottom: 15px;
  }
  
  .energy-bar {
    width: 150px;
    height: 16px;
  }
  
  .energy-icon {
    font-size: 1.3rem;
  }
  
  .energy-text {
    font-size: 0.8rem;
    min-width: 40px;
  }

  /* Bigger touch area for buttons */
  .menu-button,
  .menu-icon-btn {
    min-height: 48px;
    min-width: 48px;
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  }

  /* Add invisible padding around buttons for easier tapping */
  .menu-button::before,
  .menu-icon-btn::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
  }

  /* Score bar on the START SCREEN (menu) */
  .menu-score {
    width: 100%;
    margin-bottom: 20px;
    flex-shrink: 0;
  }

  /* Logo adjustments */
  .main-logo {
    height: clamp(50px, 12vh, 80px);
  }

  .start-screen-content {
    padding-top: 2vh;
  }

  /* Menu icon and button layout */
  .menu-icons {
    gap: clamp(8px, 2vw, 15px);
    margin-bottom: 2vh;
  }

  .menu-icon-btn {
    width: clamp(35px, 10vw, 45px);
    height: clamp(35px, 10vw, 45px);
    font-size: clamp(1rem, 3vw, 1.5rem);
  }

  .menu-buttons {
    gap: clamp(6px, 1.5vh, 8px);
    margin-bottom: 3vh;
  }

  .menu-button {
    padding: clamp(8px, 2vh, 12px) clamp(20px, 6vw, 30px);
    font-size: clamp(0.8rem, 3vw, 1.2rem);
    min-width: clamp(150px, 50vw, 200px);
  }
}

/* Additional mobile adjustments for very small screens */
@media (max-width: 480px) {
  .energy-container {
    padding: 6px 10px;
    gap: 6px;
    margin-bottom: 12px;
  }
  
  .energy-bar {
    width: 120px;
    height: 14px;
  }
  
  .energy-icon {
    font-size: 1.1rem;
  }
  
  .energy-text {
    font-size: 0.7rem;
    min-width: 35px;
  }
}

/* Notifications Screen */
.notifications-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    color: black;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.notifications-header h2 {
    font-size: 1.8rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.notifications-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 100px);
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.notification-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: default;
    margin-bottom: 15px;
    -webkit-tap-highlight-color: transparent;
}

.gift-notification {
    cursor: pointer !important;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%) !important;
    border: 1px solid rgba(255, 215, 0, 0.3) !important;
    transform-origin: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gift-notification:hover {
    transform: scale(1.02) translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.1) 100%) !important;
    border-color: rgba(255, 215, 0, 0.4) !important;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
}

.gift-notification:active {
    transform: scale(0.98);
}

.gift-header {
    margin-bottom: 15px;
}

.gift-header h3 {
    font-size: 1.3rem !important;
    color: #FFD700 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0 !important;
}

.gift-body {
    text-align: center;
    padding: 15px 0;
}

.gift-message {
    font-size: 1.2rem;
    color: #FFD700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
    padding: 10px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gift-notification:hover .gift-message {
    background: rgba(255, 215, 0, 0.15);
    transform: translateY(-2px);
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

.notification-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.notification-card.priority-high {
    border-left: 4px solid #FF6B6B;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
}

.notification-card.priority-medium {
    border-left: 4px solid #4ECDC4;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1) 0%, rgba(78, 205, 196, 0.05) 100%);
}

.notification-card.priority-low {
    border-left: 4px solid #95E1D3;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.notification-header h3 {
    font-size: 1.2rem;
    margin: 0;
    color: black;
    font-weight: 600;
}

.notification-time {
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 400;
}

.notification-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.notification-body p {
    margin: 0;
    color: rgba(0, 0, 0, 0.9);
    line-height: 1.5;
    font-size: 1rem;
}

.notification-coins {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.notification-action-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: black;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.notification-action-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.notification-action-btn:active {
    transform: translateY(0);
}

.no-notifications {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: rgba(0, 0, 0, 0.7);
}

.no-notifications h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: rgba(0, 0, 0, 0.8);
}

.no-notifications p {
    font-size: 1.1rem;
    max-width: 400px;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .notifications-header {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .notifications-header h2 {
        font-size: 1.5rem;
    }
    
    .notifications-content {
        padding: 15px;
    }
    
    .notification-card {
        padding: 15px;
    }
    
    .notification-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .notification-header h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .notifications-header h2 {
        font-size: 1.3rem;
    }
    
    .notification-card {
        padding: 12px;
    }
    
    .notification-header h3 {
        font-size: 1rem;
    }
    
    .notification-body p {
        font-size: 0.9rem;
    }
    
    .notification-coins {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
    
    .notification-action-btn {
        font-size: 0.8rem;
        padding: 10px 20px;
    }
    
    .no-notifications h3 {
        font-size: 1.5rem;
    }
    
    .no-notifications p {
        font-size: 1rem;
    }
    
    .gift-header h3 {
        font-size: 1.1rem !important;
    }
    
    .gift-coins {
        font-size: 1.5rem;
    }
    
    .gift-hint {
        font-size: 0.8rem;
    }
}

/* Tournament Management Styles */
.admin-tournament-controls {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-bottom: 20px;
}

.admin-tournament-controls h3 {
    color: black;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
}

.tournament-status {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.tournament-status h4 {
    color: black;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.tournament-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.tournament-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: black;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.tournament-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.tournament-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.tournament-standings {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.tournament-standings h4 {
    color: black;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.tournament-standings-list {
    max-height: 200px;
    overflow-y: auto;
}

.standings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: black;
}

.standings-item:first-child {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    font-weight: bold;
}

.standings-item:nth-child(2) {
    background: linear-gradient(135deg, #C0C0C0 0%, #A0A0A0 100%);
    color: #000;
    font-weight: bold;
}

.standings-item:nth-child(3) {
    background: linear-gradient(135deg, #CD7F32 0%, #B8860B 100%);
    color: #000;
    font-weight: bold;
}

.standings-rank {
    font-weight: bold;
    min-width: 30px;
}

.standings-username {
    flex: 1;
    margin: 0 10px;
}

.standings-score {
    font-weight: bold;
    color: #4CAF50;
}

.tournament-history {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
}

.tournament-history h4 {
    color: black;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.tournament-history-list {
    max-height: 150px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: black;
    font-size: 0.9rem;
}

.history-type {
    font-weight: bold;
    color: #4CAF50;
}

.history-participants {
    color: #FFC107;
}

.history-date {
    color: #9E9E9E;
    font-size: 0.8rem;
}

/* Mobile Responsive for Tournament Management */
@media (max-width: 768px) {
    .admin-tournament-controls {
        padding: 15px;
    }
    
    .admin-tournament-controls h3 {
        font-size: 1.3rem;
    }
    
    .tournament-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .tournament-btn {
        padding: 15px 20px;
        font-size: 1.1rem;
    }
    
    .standings-item {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .history-item {
        padding: 10px;
        font-size: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .admin-tournament-controls {
        padding: 10px;
    }
    
    .tournament-status,
    .tournament-standings,
    .tournament-history {
        padding: 10px;
    }
    
    .tournament-btn {
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    .standings-item {
        padding: 8px;
        font-size: 0.8rem;
    }
    
    .history-item {
        padding: 8px;
        font-size: 0.75rem;
    }
}

/* Tournament Pagination Styles */
.tournament-pages-container {
    position: relative;
    width: 100%;
}

.tournament-page {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tournament-page.active {
    display: block;
    opacity: 1;
}

.admin-tournament-standings {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.admin-tournament-standings h3 {
    color: black;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    font-size: 1.3em;
    text-align: center;
}

.standings-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.standings-pagination button {
    padding: 8px 16px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: black;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.standings-pagination button:hover:not(:disabled) {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.standings-pagination button:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(0, 0, 0, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.standings-pagination span {
    color: rgba(0, 0, 0, 0.9);
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.standings-display {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.standings-display .standings-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin: 0;
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.standings-display .standings-rank {
    font-size: 2em;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    display: block;
    margin-bottom: 10px;
}

.standings-display .standings-username {
    font-size: 1.5em;
    font-weight: bold;
    color: black;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: block;
    margin-bottom: 10px;
}

.standings-display .standings-score {
    font-size: 1.2em;
    color: #4CAF50;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: block;
}