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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 50%, #fbcfe8 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(236, 72, 153, 0.1);
    text-align: center;
    width: 90vw;
    height: 95vh;
    min-height: fit-content;
    max-width: 1600px;
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 3px solid rgba(244, 114, 182, 0.2);
    position: relative;
}

.reset-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #f472b6, #ec4899);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: none;
}

.reset-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(244, 114, 182, 0.3);
}

.title {
    font-size: 4rem;
    color: #ec4899;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(236, 72, 153, 0.2);
}

.slot-machine {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
    background: linear-gradient(135deg, #fdf2f8, #fce7f3);
    padding: 40px;
    border-radius: 25px;
    border: 3px solid rgba(244, 114, 182, 0.3);
    box-shadow: inset 0 4px 8px rgba(236, 72, 153, 0.1);
}

.slot-reel {
    width: 200px;
    height: 300px;
    background: white;
    border: 4px solid #ec4899;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.2);
}

.slot-window {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 100px;
    transform: translateY(-50%);
    border-top: 3px solid #ec4899;
    border-bottom: 3px solid #ec4899;
    background: rgba(236, 72, 153, 0.1);
    z-index: 2;
}

.reel-strip {
    position: absolute;
    width: 100%;
    transition: transform 0.1s ease;
}

.reel-item {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f3f4f6;
    position: relative;
}

.reel-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.reel-item.used {
    opacity: 0.3;
    filter: grayscale(100%);
}

.reel-item.used::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: #ec4899;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selected-action {
    background: linear-gradient(135deg, #ec4899, #be185d);
    color: white;
    padding: 35px;
    border-radius: 25px;
    margin: 25px 0;
    font-size: 2.2rem;
    font-weight: bold;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.2);
    transform: scale(0);
    transition: all 0.5s ease;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.fullscreen-overlay.show {
    opacity: 1;
    visibility: visible;
}

.fullscreen-content {
    text-align: center;
    color: white;
    max-width: 90vw;
    max-height: 90vh;
}

.fullscreen-image {
    max-width: 80vw;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    margin-bottom: 30px;
}

.fullscreen-title {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.close-fullscreen {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-fullscreen:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.selected-action.show {
    transform: scale(1);
    animation: bounce 0.6s ease;
}

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

.spin-button {
    background: linear-gradient(135deg, #ec4899, #be185d);
    color: white;
    border: none;
    padding: 25px 50px;
    font-size: 1.8rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.3);
    margin: 20px;
}

.spin-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(236, 72, 153, 0.4);
}

.spin-button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.celebration {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    z-index: 1000;
    pointer-events: none;
    animation: celebrate 1.5s ease-out;
}

@keyframes celebrate {
    0% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.5) rotate(0deg); 
    }
    50% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1.2) rotate(180deg); 
    }
    100% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(1) rotate(360deg); 
    }
}

.action-count {
    background: linear-gradient(135deg, #fdf2f8, #fce7f3);
    color: #831843;
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid rgba(244, 114, 182, 0.2);
}

.upload-section {
    margin-bottom: 30px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.preview-item {
    aspect-ratio: 1;
    border: 3px solid #f472b6;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: rgba(244, 114, 182, 0.05);
}

.preview-image {
    width: 80%;
    height: 60%;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 8px;
}

.preview-label {
    text-align: center;
    color: #ec4899;
    font-size: 0.9rem;
    font-weight: bold;
}

.loading-spinner {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

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

.start-game-btn {
    background: linear-gradient(135deg, #ec4899, #be185d);
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-game-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

.start-game-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(236, 72, 153, 0.3);
}

@media (max-width: 768px) {
    .slot-machine {
        flex-direction: column;
        gap: 10px;
    }
    
    .slot-reel {
        width: 150px;
        height: 200px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .selected-action {
        font-size: 1.5rem;
        padding: 20px;
    }
    
    .upload-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .fullscreen-image {
        max-width: 95vw;
        max-height: 60vh;
    }
    
    .fullscreen-title {
        font-size: 2rem;
    }
}