/* Game Page Styles */

/* Hero section for game page */
.cd-game-hero {
    background: linear-gradient(135deg, var(--cd-space-blue), var(--cd-space-purple));
    padding: 9rem 0 5rem;
    text-align: center;
    color: var(--cd-light);
    position: relative;
    overflow: hidden;
}

.cd-game-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z'/%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
}

.cd-game-hero h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    color: var(--cd-star-yellow);
    text-shadow: 0 0 15px rgba(255, 209, 102, 0.4);
}

.cd-game-hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Slot Game Styles */
.cd-slot-game {
    padding: 5rem 0;
    background-color: var(--cd-light);
    position: relative;
}

.cd-slot-game::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(91, 84, 32, 0.1), transparent 70%),
    radial-gradient(ellipse at bottom, rgba(26, 43, 71, 0.1), transparent 70%);
    pointer-events: none;
}

.cd-game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.cd-slot-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    background: linear-gradient(135deg, var(--cd-space-blue), var(--cd-space-purple));
    border-radius: 8px;
    padding: 20px;
    box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.1),
            0 10px 30px rgba(0, 0, 0, 0.2),
            inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.cd-slot-reels {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.cd-reel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    overflow: hidden;
    height: 300px;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
}

.cd-symbol {
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cd-symbol img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
    transition: all 0.3s ease;
}

.cd-symbol.winning {
    animation: pulseWin 1s infinite alternate;
}

@keyframes pulseWin {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    100% {
        transform: scale(1.1);
        filter: brightness(1.5);
    }
}

.cd-win-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, transparent, var(--cd-star-yellow), transparent);
    transform: translateY(-50%);
    opacity: 0;
    z-index: 10;
    box-shadow: 0 0 10px var(--cd-star-yellow), 0 0 20px var(--cd-star-yellow);
    transition: opacity 0.3s ease;
}

.cd-win-line.visible {
    opacity: 1;
    animation: pulseLine 2s infinite;
}

@keyframes pulseLine {
    0%, 100% {
        opacity: 0.7;
        height: 5px;
    }
    50% {
        opacity: 1;
        height: 8px;
    }
}

.cd-win-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: var(--cd-star-yellow);
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 20;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cd-win-text.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: winTextGlow 2s infinite alternate;
}

@keyframes winTextGlow {
    0% {
        text-shadow: 0 0 10px rgba(255, 209, 102, 0.8);
    }
    100% {
        text-shadow: 0 0 30px rgba(255, 209, 102, 1);
    }
}

.cd-game-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    padding: 1rem 0;
}

.cd-balance-container, .cd-bet-container, .cd-result-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(26, 43, 71, 0.05);
    border-radius: 8px;
    min-width: 150px;
}

.cd-balance-label, .cd-bet-label {
    font-size: 0.9rem;
    color: var(--cd-gray);
    margin-bottom: 0.5rem;
}

.cd-balance, .cd-bet-amount, .cd-win-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cd-primary-dark);
}

.cd-win-amount {
    color: var(--cd-accent);
}

.cd-win-amount.winning {
    animation: winAmountPulse 1s infinite alternate;
}

@keyframes winAmountPulse {
    0% {
        color: var(--cd-accent);
        transform: scale(1);
    }
    100% {
        color: var(--cd-star-yellow);
        transform: scale(1.1);
    }
}

.cd-bet-container {
    flex-direction: row;
    gap: 1rem;
    align-items: center;
}

.cd-bet-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cd-bet-button {
    background: linear-gradient(135deg, var(--cd-primary-dark), var(--cd-primary));
    color: white;
    border: none;
    border-radius: 5px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cd-bet-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cd-bet-button:active {
    transform: translateY(0);
}

.cd-spin-button {
    background: linear-gradient(135deg, var(--cd-accent), var(--cd-star-yellow));
    color: var(--cd-dark);
    border: none;
    border-radius: 50px;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.cd-spin-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

.cd-spin-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cd-spin-button:hover::before {
    left: 100%;
}

.cd-spin-button:active {
    transform: translateY(-1px);
}

.cd-spin-button:disabled {
    background: linear-gradient(135deg, #aaa, #ccc);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cd-game-info {
    margin-top: 3rem;
}

.cd-info-card {
    background: linear-gradient(135deg, rgba(91, 84, 32, 0.05), rgba(164, 116, 27, 0.05));
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.cd-info-card h3 {
    color: var(--cd-primary-dark);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.cd-info-card h3::after {
    content: "";
    position: absolute;
    width: 50px;
    height: 2px;
    background: var(--cd-primary);
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.cd-combinations {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.cd-combination-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.cd-combination-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.cd-combination-item span {
    font-size: 0.9rem;
    color: var(--cd-gray);
}

/* Disclaimer Section for game page */
.disclaimer-section {
    background-color: rgba(91, 84, 32, 0.08);
    padding: 4rem 0;
}

/* Spinning animation */
@keyframes spinReel {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-300px);
    }
}

.spinning {
    animation: spinReel 0.5s linear infinite;
}

/* Responsive styles */
@media (max-width: 768px) {
    .cd-game-hero h2 {
        font-size: 2.5rem;
    }

    .cd-game-hero p {
        font-size: 1.1rem;
    }

    .cd-slot-container {
        padding: 15px;
    }

    .cd-reel {
        height: 250px;
    }

    .cd-symbol {
        height: 83.33px;
    }

    .cd-game-controls {
        flex-direction: column;
    }

    .cd-bet-container {
        width: 100%;
        justify-content: space-between;
    }

    .cd-spin-button {
        width: 100%;
    }

    .cd-win-text {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .cd-game-hero h2 {
        font-size: 2rem;
    }

    .cd-reel {
        height: 180px;
    }

    .cd-symbol {
        height: 60px;
    }

    .cd-game-wrapper {
        padding: 1rem;
    }

    .cd-combinations {
        gap: 1rem;
    }

    .cd-combination-item img {
        width: 40px;
        height: 40px;
    }
}