/* Additional styling beyond Tailwind CSS */

/* Loading animation */
.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #3B82F6;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Dark mode styles for the loading spinner */
.dark-mode .loading-spinner,
.dark .loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #3B82F6;
}

/* 3D Thumbnails */
#thumbnail-chess,
#thumbnail-pebble,
#thumbnail-space {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

#thumbnail-chess canvas,
#thumbnail-pebble canvas,
#thumbnail-space canvas {
    width: 100% !important;
    height: 100% !important;
    transition: all 0.3s ease;
    display: block;
}

#thumbnail-chess:hover,
#thumbnail-pebble:hover,
#thumbnail-space:hover {
    transform: translateY(-5px);
}

.dark-mode #thumbnail-chess canvas,
.dark-mode #thumbnail-pebble canvas,
.dark-mode #thumbnail-space canvas,
.dark #thumbnail-chess canvas,
.dark #thumbnail-pebble canvas,
.dark #thumbnail-space canvas {
    filter: brightness(0.9);
}

.loading-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.dark .loading-placeholder {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Game card animations */
.game-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dark .game-card:hover {
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
}

/* Chess board styling */
.chess-square {
    width: 12.5%;
    height: 12.5%;
    position: relative;
    float: left;
}

.chess-square-light {
    background-color: #f0d9b5;
}

.chess-square-dark {
    background-color: #b58863;
}

.chess-piece {
    width: 100%;
    height: 100%;
    position: absolute;
    cursor: pointer;
    transition: transform 0.2s;
}

.chess-piece:hover {
    transform: scale(1.1);
}

/* Pebble game styling */
.bottle {
    width: 60px;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 5px 5px 30px 30px;
    position: relative;
    margin: 0 10px;
    overflow: hidden;
    border: 2px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.bottle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent);
    border-radius: 5px 5px 0 0;
}

.bottle.selected {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
    z-index: 10;
}

.bottle:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.pebble {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    position: absolute;
    left: 5px;
    transition: top 0.3s ease-in-out, transform 0.2s ease;
    box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.2), inset 0 5px 10px rgba(255, 255, 255, 0.3);
}

.bottle.winner {
    animation: celebrate 0.5s ease infinite alternate;
}

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

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

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.bottle-container {
    position: relative;
    display: inline-block;
    margin: 0 5px;
}

.bottle-number {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: #666;
}

.pebble-move-path {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9;
    pointer-events: none;
}

/* Level selector */
.level-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.level-btn {
    padding: 5px 15px;
    margin: 0 5px;
    border-radius: 20px;
    background-color: #e5e5e5;
    color: #333;
    font-weight: 600;
    transition: all 0.2s ease;
}

.level-btn.active {
    background-color: #3B82F6;
    color: white;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.4);
}

/* Space shooter styling */
#space-canvas {
    background-color: #000;
    cursor: crosshair;
}

.projectile {
    background-color: #ff0;
    width: 5px;
    height: 15px;
    position: absolute;
    border-radius: 50%;
}

.enemy {
    position: absolute;
    transform-origin: center;
    transition: transform 0.2s;
}

/* Game cards hover effects */
.game-card:hover .game-image {
    transform: scale(1.05);
}

.game-image {
    transition: transform 0.3s ease;
}

/* Coming soon overlay */
.coming-soon-overlay {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    font-size: 1.5rem;
    font-weight: bold;
    backdrop-filter: blur(3px);
}

/* Sound controls */
.sound-control {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 10;
}

/* Mobile styles for pebble game */
@media (max-width: 640px) {
    .bottle {
        width: 40px;
        height: 160px;
        margin: 0 5px;
    }
    
    .pebble {
        width: 30px;
        height: 30px;
    }
    
    .bottle-container {
        margin: 0 2px;
    }
    
    .bottle-number {
        font-size: 10px;
        bottom: -15px;
    }
    
    #pebble-board {
        gap: 2px !important;
    }
}

/* Ad container styling */
.ad-container {
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 8px;
    margin: 16px 0;
    text-align: center;
}

.ad-container::before {
    content: "Advertisement";
    font-size: 0.7rem;
    color: #999;
    display: block;
    margin-bottom: 4px;
}

/* Rewarded ad button */
.reward-button {
    display: inline-flex;
    align-items: center;
    background-color: #10B981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.reward-button:hover {
    background-color: #059669;
}

.reward-button svg {
    margin-right: 0.5rem;
}

/* Monetag interstitial ad styling */
.monetag-interstitial {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
} 