/* Import Aladin Font */
@import url('https://fonts.googleapis.com/css2?family=Aladin&display=swap');

/* Caribbean Pirates Game Styles */
.caribbean-pirates-game {
    font-family: 'Orbitron', monospace;
    background: url('../games_assets/gbg.webp') center center / cover no-repeat fixed;
    min-height: 100vh;
    overflow: hidden;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Background overlay */
.cp-background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 0, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 0, 0, 0.2) 0%, transparent 50%);
    z-index: -1;
}

/* Main game container - smaller and perfectly centered */
.cp-game-container {
    width: 90%;
    max-width: 1200px;
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 1.2vw, 20px);
    position: relative;
    box-sizing: border-box;
    gap: clamp(3px, 0.5vw, 8px);
    margin: 0 auto;
}

/* Game header - perfectly aligned and compact */
.cp-game-header {
    text-align: center;
    margin-bottom: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(3px, 0.5vw, 6px);
    width: 100%;
    max-width: 100%;
}

/* Pirate Ship - Smaller and positioned better */
.cp-pirate-ship {
    position: fixed;
    bottom: clamp(20px, 3vw, 40px);
    left: clamp(20px, 3vw, 40px);
    width: clamp(150px, 15vw, 250px);
    height: auto;
    opacity: 1;
    z-index: 15;
    max-width: 100%;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8)) 
            drop-shadow(0 0 30px rgba(255, 255, 255, 0.6))
            drop-shadow(0 0 45px rgba(255, 255, 255, 0.4));
}

.cp-pirate-ship:hover {
    opacity: 1;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 1)) 
            drop-shadow(0 0 40px rgba(255, 255, 255, 0.8))
            drop-shadow(0 0 60px rgba(255, 255, 255, 0.6));
}

/* Right side logo - moved higher to avoid blocking game symbols */
.cp-game-logo-right {
    position: absolute;
    top: clamp(5px, 1vw, 15px);
    right: clamp(15px, 2vw, 30px);
    width: 120px;
    height: auto;
    opacity: 1;
    z-index: 20;
    transition: all 0.3s ease;
    max-width: 100%;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8)) 
            drop-shadow(0 0 30px rgba(255, 255, 255, 0.6))
            drop-shadow(0 0 45px rgba(255, 255, 255, 0.4));
}

.cp-game-logo-right:hover {
    opacity: 1;
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 1)) 
            drop-shadow(0 0 40px rgba(255, 255, 255, 0.8))
            drop-shadow(0 0 60px rgba(255, 255, 255, 0.6));
}

.cp-header-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(8px, 1.5vw, 12px);
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

.cp-credits-display, .cp-win-status-display {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: clamp(6px, 0.8vw, 10px);
    padding: clamp(4px, 0.8vw, 8px) clamp(8px, 1.2vw, 15px);
    display: inline-flex;
    align-items: center;
    backdrop-filter: blur(8px);
    max-width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.cp-credits-label, .cp-win-status-label {
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    color: #00aed9;
    margin-right: clamp(8px, 1.5vw, 15px);
    font-weight: bold;
}

.cp-credits-amount, .cp-win-status-amount {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    color: #007795;
    font-weight: bold;
}

/* Main game area - perfectly aligned and compact */
.cp-main-game-area {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0;
    z-index: 15;
    position: relative;
    max-width: 100%;
}

/* Slot machine - perfectly centered */
.cp-slot-machine {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.cp-slot-grid {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.6vw, 8px);
    padding: clamp(12px, 1.8vw, 20px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: clamp(10px, 1.2vw, 16px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
}

.cp-slot-row {
    display: flex;
    gap: clamp(4px, 0.6vw, 8px);
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.cp-slot-box {
    width: clamp(80px, 8vw, 150px);
    height: clamp(80px, 8vw, 150px);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: clamp(8px, 1vw, 15px);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-sizing: border-box;
}

.cp-slot-box:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.2);
}

.cp-symbol-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-symbol {
    width: clamp(60px, 6vw, 120px);
    height: clamp(60px, 6vw, 120px);
    object-fit: contain;
    filter: brightness(1.1) contrast(1.1);
    transition: all 0.3s ease;
    max-width: 100%;
    max-height: 100%;
}

.cp-slot-box.spinning .cp-symbol {
    animation: cpSymbolSpin 0.1s linear infinite;
}

.cp-slot-box.stopping .cp-symbol {
    animation: cpSymbolStop 0.5s ease-out;
}

@keyframes cpSymbolSpin {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.05); }
    50% { transform: rotate(180deg) scale(1.1); }
    75% { transform: rotate(270deg) scale(1.05); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes cpSymbolStop {
    0% { 
        transform: rotate(0deg) scale(1.1);
        filter: blur(1px) brightness(1.2);
    }
    100% { 
        transform: rotate(0deg) scale(1);
        filter: blur(0px) brightness(1.1);
    }
}

/* Win lines */
.cp-win-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffff00, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.cp-win-line.active {
    opacity: 1;
    animation: cpWinLinePulse 1s ease-in-out infinite;
}

.cp-win-line.top {
    top: 120px;
}

.cp-win-line.middle {
    top: 200px;
}

.cp-win-line.bottom {
    top: 280px;
}

@keyframes cpWinLinePulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Controls Below Console - perfectly centered */
.cp-controls-below-console {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 1.2vw, 12px);
    margin-top: clamp(2px, 0.5vw, 6px);
    flex-wrap: wrap;
    width: 100%;
    position: relative;
    z-index: 5;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

/* Betting section */
.cp-betting-section {
    display: flex;
    align-items: center;
    gap: clamp(3px, 0.8vw, 8px);
    padding: clamp(3px, 0.8vw, 8px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: clamp(4px, 0.8vw, 8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    box-sizing: border-box;
}

.cp-bet-label {
    font-size: 1.4rem;
    color: #ffffff;
    font-weight: bold;
    letter-spacing: 1px;
}

.cp-bet-options {
    display: flex;
    gap: clamp(2px, 0.6vw, 4px);
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.cp-bet-button {
    padding: clamp(2px, 0.6vw, 6px) clamp(6px, 1vw, 12px);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: clamp(3px, 0.5vw, 6px);
    color: #1a1a1a;
    font-size: clamp(0.6rem, 1vw, 0.9rem);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-bet-button:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.2);
}

.cp-bet-button.active {
    border-color: #ffff00;
    color: #ffff00;
    background: linear-gradient(135deg, rgba(255, 255, 0, 0.2), rgba(255, 255, 0, 0.3));
    text-shadow: 0 0 15px #ffff00;
    box-shadow: 
        0 0 30px rgba(255, 255, 0, 0.8),
        0 6px 12px rgba(0, 0, 0, 0.6);
    transform: scale(1.05);
}

.cp-bet-button.custom {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.3), rgba(255, 0, 255, 0.4));
    border-color: #ff00ff;
    color: #ff00ff;
    text-shadow: 0 0 8px #ff00ff;
}

.cp-bet-button.custom:hover {
    border-color: #ffff00;
    color: #ffff00;
    text-shadow: 0 0 15px #ffff00;
}

.cp-current-bet {
    display: flex;
    align-items: center;
    gap: clamp(3px, 0.6vw, 6px);
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    color: #ffffff;
    font-weight: bold;
}

.cp-bet-amount {
    font-weight: bold;
    color: #ffff00;
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
}

/* Spin button */
.cp-spin-button {
    position: relative;
    background: linear-gradient(145deg, #ffffff, #ffff00);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: clamp(12px, 2vw, 20px);
    padding: clamp(8px, 1.5vw, 14px) clamp(16px, 3vw, 30px);
    font-family: 'Orbitron', monospace;
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 700;
    color: #000000;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: clamp(0.5px, 0.1vw, 1.5px);
    transition: all 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-spin-button:hover {
    transform: translateY(-2px);
}

.cp-spin-button:active {
    transform: translateY(0);
}

.cp-spin-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* How to Play Button */
.cp-how-to-play-button {
    background: linear-gradient(145deg, #3396D3, #2A7BB8);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: clamp(8px, 1.2vw, 12px);
    padding: clamp(8px, 1.5vw, 14px) clamp(12px, 2vw, 20px);
    font-size: clamp(0.7rem, 1.2vw, 1rem);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: clamp(80px, 12vw, 120px);
}

.cp-how-to-play-button:hover {
    background: linear-gradient(145deg, #2A7BB8, #1E5A8A);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 150, 211, 0.4);
}

.cp-how-to-play-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(51, 150, 211, 0.3);
}

/* How to Play Modal */
.cp-how-to-play-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.cp-how-to-play-content {
    background: linear-gradient(135deg, rgba(51, 150, 211, 0.95), rgba(42, 123, 184, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: clamp(8px, 1.2vw, 12px);
    padding: clamp(12px, 2vw, 18px);
    max-width: clamp(350px, 70vw, 500px);
    max-height: 75vh;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
}

.cp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(8px, 1.2vw, 12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: clamp(6px, 1vw, 10px);
}

.cp-modal-header h2 {
    color: #ffffff;
    font-size: clamp(1rem, 2vw, 1.4rem);
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cp-close-button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: clamp(24px, 3vw, 32px);
    height: clamp(24px, 3vw, 32px);
    color: #ffffff;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-close-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.cp-rules-section h3 {
    color: #ffffff;
    font-size: clamp(0.8rem, 1.5vw, 1.1rem);
    margin: clamp(8px, 1.2vw, 12px) 0 clamp(4px, 0.8vw, 8px) 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cp-rules-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    margin-bottom: clamp(8px, 1.2vw, 12px);
    line-height: 1.3;
}

.cp-win-rules {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1vw, 10px);
    margin-bottom: clamp(12px, 2vw, 16px);
}

.cp-rule-item {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.2vw, 12px);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: clamp(6px, 0.8vw, 8px);
    padding: clamp(6px, 1vw, 10px);
    backdrop-filter: blur(3px);
}

.cp-rule-image {
    display: flex;
    gap: clamp(2px, 0.5vw, 4px);
    align-items: center;
    flex-shrink: 0;
}

.cp-rule-image img {
    width: clamp(20px, 3vw, 30px);
    height: clamp(20px, 3vw, 30px);
    border-radius: clamp(3px, 0.4vw, 4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cp-any-symbol {
    width: clamp(20px, 3vw, 30px);
    height: clamp(20px, 3vw, 30px);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: clamp(3px, 0.4vw, 4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: clamp(0.6rem, 1vw, 0.8rem);
    font-weight: bold;
}

.cp-rule-text h4 {
    color: #ffffff;
    font-size: clamp(0.7rem, 1.2vw, 1rem);
    margin: 0 0 clamp(2px, 0.5vw, 4px) 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cp-rule-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(0.6rem, 1vw, 0.8rem);
    margin: 0;
    line-height: 1.2;
}

.cp-gameplay-tips {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: clamp(6px, 0.8vw, 8px);
    padding: clamp(8px, 1.2vw, 12px);
    backdrop-filter: blur(3px);
}

.cp-gameplay-tips ul {
    margin: 0;
    padding-left: clamp(12px, 1.5vw, 16px);
}

.cp-gameplay-tips li {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(0.6rem, 1vw, 0.8rem);
    margin-bottom: clamp(3px, 0.6vw, 5px);
    line-height: 1.3;
}

.cp-gameplay-tips li:last-child {
    margin-bottom: 0;
}

/* Custom bet modal */
.cp-custom-bet-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.cp-custom-bet-content {
    background: linear-gradient(135deg, rgba(51, 150, 211, 0.3), rgba(30, 100, 180, 0.4), rgba(20, 80, 150, 0.5));
    border: 4px solid #ffffff;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 
        0 0 40px rgba(255, 255, 255, 0.6),
        inset 0 0 25px rgba(51, 150, 211, 0.2),
        0 16px 32px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
}

.cp-custom-bet-content h3 {
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ffffff;
}

.cp-custom-bet-content input {
    width: 200px;
    padding: 10px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffffff;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    text-align: center;
    box-shadow: 
        0 0 10px rgba(255, 255, 255, 0.3),
        inset 0 0 5px rgba(255, 255, 255, 0.1);
}

.cp-custom-bet-content input:focus {
    outline: none;
    border-color: #ffff00;
    box-shadow: 
        0 0 15px rgba(255, 255, 0, 0.5),
        inset 0 0 5px rgba(255, 255, 0, 0.2);
}

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

.cp-modal-buttons button {
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(51, 150, 211, 0.3), rgba(30, 100, 180, 0.4), rgba(20, 80, 150, 0.5));
    border: 3px solid #ffffff;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px #ffffff;
    box-shadow: 
        0 0 15px rgba(255, 255, 255, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.4);
}

.cp-modal-buttons button:hover {
    border-color: #ffff00;
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
    box-shadow: 
        0 0 15px rgba(255, 255, 0, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.6);
}

/* Game over overlay */
.cp-game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.cp-game-over-content {
    background: linear-gradient(135deg, rgba(51, 150, 211, 0.3), rgba(30, 100, 180, 0.4), rgba(20, 80, 150, 0.5));
    border: 4px solid #ff0000;
    border-radius: 25px;
    padding: 50px;
    text-align: center;
    box-shadow: 
        0 0 50px rgba(255, 0, 0, 0.8),
        inset 0 0 25px rgba(51, 150, 211, 0.2),
        0 16px 32px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    filter: drop-shadow(0 0 25px rgba(255, 0, 0, 0.7));
}

.cp-game-over-content h2 {
    color: #ff0000;
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px #ff0000;
}

.cp-game-over-content p {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 0 0 10px #ffffff;
}

.cp-restart-button {
    padding: 15px 30px;
    background: linear-gradient(145deg, #ff0000, #ff8800);
    border: none;
    border-radius: 25px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 25px rgba(255, 0, 0, 0.6),
        inset 0 0 10px rgba(255, 255, 255, 0.2),
        0 6px 12px rgba(0, 0, 0, 0.6);
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.5));
}

.cp-restart-button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 0 35px rgba(255, 0, 0, 0.8),
        inset 0 0 10px rgba(255, 255, 255, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.8);
    filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.7));
}

/* Winning box styles */
.cp-slot-box.winning {
    border-color: #ffff00 !important;
    background: linear-gradient(135deg, rgba(255, 255, 0, 0.3), rgba(255, 255, 0, 0.4)) !important;
    box-shadow: 
        0 0 25px rgba(255, 255, 0, 0.8),
        inset 0 0 10px rgba(255, 255, 0, 0.3),
        0 6px 12px rgba(0, 0, 0, 0.6) !important;
    animation: cpWinningBoxPulse 1s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255, 255, 0, 0.7)) !important;
    transform: scale(1.05);
}

.cp-slot-box.winning .cp-symbol {
    filter: brightness(1.4) contrast(1.3) drop-shadow(0 0 12px #ffff00);
}

@keyframes cpWinningBoxPulse {
    0% { 
        transform: scale(1.05);
        box-shadow: 
            0 0 25px rgba(255, 255, 0, 0.8),
            inset 0 0 10px rgba(255, 255, 0, 0.3),
            0 6px 12px rgba(0, 0, 0, 0.6);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 
            0 0 35px rgba(255, 255, 0, 1),
            inset 0 0 15px rgba(255, 255, 0, 0.4),
            0 8px 16px rgba(0, 0, 0, 0.8);
    }
    100% { 
        transform: scale(1.05);
        box-shadow: 
            0 0 25px rgba(255, 255, 0, 0.8),
            inset 0 0 10px rgba(255, 255, 0, 0.3),
            0 6px 12px rgba(0, 0, 0, 0.6);
    }
}

/* Professional Winning Effects */
.cp-winning-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2000;
    overflow: hidden;
}

.cp-confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ff6b6b;
    animation: cpConfettiFall 4s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    border-radius: 1px;
    opacity: 0.9;
}

.cp-confetti:nth-child(2n) {
    background: #4ecdc4;
    animation-delay: 0.2s;
}

.cp-confetti:nth-child(3n) {
    background: #45b7d1;
    animation-delay: 0.4s;
}

.cp-confetti:nth-child(4n) {
    background: #96ceb4;
    animation-delay: 0.6s;
}

.cp-confetti:nth-child(5n) {
    background: #feca57;
    animation-delay: 0.8s;
}

.cp-confetti:nth-child(6n) {
    background: #ff9ff3;
    animation-delay: 1s;
}

@keyframes cpConfettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg) scale(1);
        opacity: 0.9;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg) scale(0.8);
        opacity: 0;
    }
}

.cp-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffff00;
    border-radius: 50%;
    animation: cpParticleFloat 3s ease-out infinite;
    opacity: 0.8;
}

.cp-particle:nth-child(2n) {
    background: #ff6b6b;
    animation-delay: 0.3s;
}

.cp-particle:nth-child(3n) {
    background: #4ecdc4;
    animation-delay: 0.6s;
}

.cp-particle:nth-child(4n) {
    background: #45b7d1;
    animation-delay: 0.9s;
}

@keyframes cpParticleFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-30px) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(-60px) scale(0);
        opacity: 0;
    }
}

.cp-screen-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    z-index: 1999;
    animation: cpScreenFlash 0.6s ease-out;
    pointer-events: none;
}

@keyframes cpScreenFlash {
    0% {
        opacity: 0;
        transform: scale(1);
    }
    30% {
        opacity: 1;
        transform: scale(1.02);
    }
    70% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1);
    }
}

.cp-win-celebration {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Aladin', cursive;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: bold;
    color: #ffff00;
    text-shadow: 
        0 0 20px rgba(255, 255, 0, 0.8),
        0 0 40px rgba(255, 255, 0, 0.6),
        0 0 60px rgba(255, 255, 0, 0.4),
        2px 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2001;
    animation: cpWinCelebration 3s ease-out;
    pointer-events: none;
    text-align: center;
    letter-spacing: 1px;
}

@keyframes cpWinCelebration {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
    15% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
    25% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    75% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

.cp-mega-win-effects {
    animation: cpMegaWinShake 0.8s ease-in-out;
}

@keyframes cpMegaWinShake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-8px); }
    20% { transform: translateX(8px); }
    30% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    50% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
    70% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
    90% { transform: translateX(-1px); }
}

.cp-golden-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1998;
    overflow: hidden;
}

.cp-golden-drop {
    position: absolute;
    width: 2px;
    height: 15px;
    background: linear-gradient(180deg, #ffd700, #ffed4e);
    border-radius: 1px;
    animation: cpGoldenRain 3s linear infinite;
    opacity: 0.8;
}

@keyframes cpGoldenRain {
    0% {
        transform: translateY(-100vh);
        opacity: 0.8;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Smooth fade-in effect for effects container */
.cp-winning-effects {
    animation: cpFadeInEffects 0.3s ease-out;
}

@keyframes cpFadeInEffects {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Celebration effects */
@keyframes cpCelebrationShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .cp-game-container {
        width: 95%;
        max-width: 100%;
        padding: 10px;
    }
    
    .cp-slot-box {
        width: clamp(50px, 12vw, 80px);
        height: clamp(50px, 12vw, 80px);
    }
    
    .cp-symbol {
        width: clamp(40px, 10vw, 70px);
        height: clamp(40px, 10vw, 70px);
    }
    
    .cp-win-line.top {
        top: 80px;
    }
    
    .cp-win-line.middle {
        top: 140px;
    }
    
    .cp-win-line.bottom {
        top: 200px;
    }
    
    .cp-controls-below-console {
        flex-direction: column;
        gap: 15px;
    }
    
    .cp-betting-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .cp-pirate-ship {
        width: clamp(100px, 20vw, 150px);
        bottom: 10px;
        left: 10px;
    }
    
    .cp-game-logo-right {
        width: clamp(120px, 25vw, 200px);
        top: 5px;
        right: 10px;
    }
}
