/* Game Chooser Specific Styles */

/* Game Theme Background */
.game-theme {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #fd79a8 100%);
}

.game-theme .shape {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe, #fd79a8);
}

/* Floating Games */
.floating-games {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-games .game-emoji {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.3;
    animation: gameFloat 18s infinite ease-in-out;
}

.floating-games .game-emoji:nth-child(1) {
    top: 20%;
    left: 12%;
    animation-delay: 0s;
    animation-duration: 20s;
}

.floating-games .game-emoji:nth-child(2) {
    top: 65%;
    right: 18%;
    animation-delay: -3s;
    animation-duration: 23s;
}

.floating-games .game-emoji:nth-child(3) {
    bottom: 35%;
    left: 25%;
    animation-delay: -6s;
    animation-duration: 17s;
}

.floating-games .game-emoji:nth-child(4) {
    top: 45%;
    right: 8%;
    animation-delay: -9s;
    animation-duration: 25s;
}

.floating-games .game-emoji:nth-child(5) {
    bottom: 20%;
    left: 55%;
    animation-delay: -12s;
    animation-duration: 19s;
}

.floating-games .game-emoji:nth-child(6) {
    top: 80%;
    right: 40%;
    animation-delay: -15s;
    animation-duration: 22s;
}

@keyframes gameFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    20% {
        transform: translate(25px, -15px) rotate(72deg) scale(1.1);
    }
    40% {
        transform: translate(-10px, 20px) rotate(144deg) scale(0.9);
    }
    60% {
        transform: translate(20px, 10px) rotate(216deg) scale(1.05);
    }
    80% {
        transform: translate(-15px, -25px) rotate(288deg) scale(0.95);
    }
}

/* Game Spinner Styles */
.game-spinner {
    background: conic-gradient(
        from 0deg,
        #6c5ce7 0deg 45deg,
        #a29bfe 45deg 90deg,
        #fd79a8 90deg 135deg,
        #fdcb6e 135deg 180deg,
        #00b894 180deg 225deg,
        #0984e3 225deg 270deg,
        #e17055 270deg 315deg,
        #6c5ce7 315deg 360deg
    );
    box-shadow: 
        0 0 40px rgba(108, 92, 231, 0.5),
        0 0 80px rgba(162, 155, 254, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.1);
}

.game-title {
    color: #fff;
    text-shadow: 
        0 0 10px #6c5ce7,
        0 0 20px #6c5ce7,
        0 0 30px #a29bfe,
        3px 3px 6px rgba(0, 0, 0, 0.3);
}

.game-title .title-text {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe, #fd79a8);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

.game-pointer .pointer-triangle {
    border-top-color: #6c5ce7;
    animation: gamePointerGlow 2s ease-in-out infinite alternate;
}

@keyframes gamePointerGlow {
    from {
        filter: drop-shadow(0 0 5px #6c5ce7);
    }
    to {
        filter: drop-shadow(0 0 20px #6c5ce7) drop-shadow(0 0 30px #a29bfe);
    }
}

.game-center .center-circle {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    box-shadow: 
        0 0 30px rgba(108, 92, 231, 0.6),
        inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.game-center .center-text {
    font-size: 1.5rem;
}

/* Game Input Styles */
.game-input {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid transparent;
    box-shadow: 
        0 10px 30px rgba(108, 92, 231, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.game-input:focus {
    box-shadow: 
        0 20px 40px rgba(108, 92, 231, 0.3),
        0 0 20px #6c5ce7,
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-color: #6c5ce7;
}

.game-decoration {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe, #fd79a8, #fdcb6e);
    background-size: 400% 400%;
    animation: gradientRotate 3s ease-in-out infinite;
}

/* Game Button */
.game-button {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    box-shadow: 
        0 10px 30px rgba(108, 92, 231, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.game-button:hover {
    box-shadow: 
        0 20px 40px rgba(108, 92, 231, 0.5),
        0 0 30px #6c5ce7;
}

.game-button .sparkle {
    color: #fdcb6e;
}

/* Game Result Card */
.game-result {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(108, 92, 231, 0.3);
    box-shadow: 
        0 20px 60px rgba(108, 92, 231, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.game-result::before {
    background: linear-gradient(45deg, transparent, rgba(108, 92, 231, 0.1), transparent);
}

/* Game Genres Section */
.game-genres {
    margin: 4rem 1rem 2rem;
    animation: fadeInUp 1s ease-out 2s both;
}

.genres-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: #fff;
    margin-bottom: 2rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'Fredoka One', cursive;
}

.genres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.genre-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.genre-card:hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 20px 40px rgba(108, 92, 231, 0.3);
}

.genre-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.2), transparent);
    transition: left 0.5s ease;
}

.genre-card:hover::before {
    left: 100%;
}

.genre-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: genreIconPulse 2.5s ease-in-out infinite;
}

.genre-card:nth-child(1) .genre-icon { animation-delay: 0s; }
.genre-card:nth-child(2) .genre-icon { animation-delay: 0.4s; }
.genre-card:nth-child(3) .genre-icon { animation-delay: 0.8s; }
.genre-card:nth-child(4) .genre-icon { animation-delay: 1.2s; }

@keyframes genreIconPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        filter: brightness(1.2);
    }
}

.genre-name {
    color: #fff;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.genre-mood {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    font-style: italic;
}

/* Game-specific animations */
@keyframes gameGlitch {
    0%, 100% {
        transform: scale(1);
        filter: hue-rotate(0deg);
    }
    10% {
        transform: scale(1.02) skew(1deg);
        filter: hue-rotate(90deg);
    }
    20% {
        transform: scale(0.98) skew(-1deg);
        filter: hue-rotate(180deg);
    }
    30% {
        transform: scale(1.01) skew(0.5deg);
        filter: hue-rotate(270deg);
    }
    40% {
        transform: scale(0.99) skew(-0.5deg);
        filter: hue-rotate(360deg);
    }
}

.game-spinner.spinning {
    animation: spinWheel 4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards, gameGlitch 0.3s ease-in-out 3.7s;
}

/* Pixelated effect for retro gaming feel */
.genre-card:nth-child(2):hover {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Achievement popup style */
.achievement-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 700;
    z-index: 10000;
    animation: achievementSlide 3s ease-in-out forwards;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes achievementSlide {
    0% { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    20%, 80% { 
        transform: translateX(0); 
        opacity: 1; 
    }
    100% { 
        transform: translateX(100%); 
        opacity: 0; 
    }
}

/* Responsive Game Styles */
@media (max-width: 768px) {
    .genres-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .genre-card {
        padding: 1.5rem 1rem;
    }
    
    .genre-icon {
        font-size: 2.5rem;
    }
    
    .genre-name {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .genres-grid {
        grid-template-columns: 1fr;
    }
    
    .genre-card {
        padding: 1.2rem 0.8rem;
    }
}
