/* style.css */

/* General Wrapper Styling */
.cop-wrapper { 
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; 
    color: #333; /* Default text color */
    padding: 20px; /* Add some padding around the whole grid */
    max-width: 1200px; /* Constrain max width for better readability on very wide screens */
    margin: 0 auto; /* Center the wrapper */
}

/* Case Grid */
.cop-case-grid { 
    display: grid; 
    /* MODIFIED: More fluid columns, minimum 280px, up to 1fr for responsiveness */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 2rem; 
    padding: 1rem 0; /* Add vertical padding around the grid itself */
}

.cop-case-card { 
    background: #ffffff; 
    border-radius: 0.75rem; /* Slightly softer corners */
    /* MODIFIED: More prominent shadow for depth, with a subtle hover effect */
    box-shadow: 0 8px 20px -6px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05); /* Outer shadow + subtle border */
    padding: 1.25rem; /* Reduced padding for a more compact look */
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    display: flex; 
    flex-direction: column; 
    text-align: center; /* Center all card content */
    overflow: hidden; /* Ensure nothing spills out of the rounded corners */
}
.cop-case-card:hover { 
    transform: translateY(-8px); /* Lift more on hover */
    box-shadow: 0 15px 35px -10px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.08); /* Darker shadow on hover */
}

.cop-case-image { 
    /* MODIFIED: Bigger image container */
    margin-bottom: 1rem; 
    height: 200px; /* Increased height */
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: linear-gradient(135deg, #f0f4f8, #e0e8f0); /* Soft gradient background for image area */
    border-radius: 0.5rem; /* Rounded corners for the image area */
    overflow: hidden; /* Keep image inside rounded corners */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05); /* Inner shadow for depth */
}
.cop-case-image img { 
    /* MODIFIED: Max width/height to fill the new container better */
    max-width: 90%; 
    max-height: 90%; 
    object-fit: contain; 
    transition: transform 0.3s ease; /* Smooth scale on hover */
}
.cop-case-card:hover .cop-case-image img {
    transform: scale(1.05); /* Slightly zoom image on hover */
}

.cop-case-title { 
    font-size: 1.4rem; /* Slightly larger title */
    font-weight: 700; 
    margin: 0 0 0.75rem; /* Adjusted margin */
    color: #2c3e50; /* Darker, more prominent title color */
    line-height: 1.3;
}

/* Possible Rewards Styling */
.cop-case-rewards-wrapper {
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem; /* Space between title and rewards */
}
.cop-rewards-title {
    font-size: 0.85rem; /* Slightly smaller, subtle title */
    font-weight: 600;
    color: #7f8c8d; /* Muted color */
    margin: 0 0 0.75rem;
    text-transform: uppercase; /* Uppercase for a modern look */
    letter-spacing: 0.5px;
}
.cop-case-rewards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem; /* Tighter gap between icons */
}
.cop-reward-icon {
    width: 40px; /* MODIFIED: Slightly larger icons */
    height: 40px; /* MODIFIED: Slightly larger icons */
    border-radius: 50%; 
    object-fit: cover;
    background: #f3f4f6;
    border: 2px solid #e0e8f0; /* Softer border */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* More subtle shadow for icons */
    transition: transform 0.2s ease;
}
.cop-reward-icon:hover {
    transform: scale(1.1); /* Pop on hover */
}


.cop-open-button { 
    width: 100%; 
    background-color: #3b82f6; 
    color: white; 
    border: none; 
    padding: 0.9rem 1rem; /* Slightly more vertical padding */
    font-size: 1.05rem; /* Slightly larger font */
    font-weight: 600; 
    border-radius: 0.6rem; /* Slightly less rounded than card */
    cursor: pointer; 
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; 
    margin-top: auto; 
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3); /* Button shadow */
}
.cop-open-button:hover { 
    background-color: #2563eb; 
    transform: translateY(-2px); /* Lift button on hover */
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4); /* Darker shadow on hover */
}
.cop-open-button .fa-star { color: #f59e0b; margin-right: 5px; } /* Space between icon and text */
.cop-open-button:disabled { 
    background-color: #9ca3af; 
    cursor: not-allowed; 
    box-shadow: none;
    transform: translateY(0);
}

/* Modal & Roulette (No significant changes here, kept previous version for consistency) */
#cop-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(17, 24, 39, 0.9); z-index: 10000; display: none; align-items: center; justify-content: center; padding: 1rem; box-sizing: border-box;
}
#cop-modal-content {
    display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; max-width: 1200px; max-height: 500px; background: #1f2937; border-radius: 1rem; padding: 2rem; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
#cop-roulette-wrapper {
    width: 100%; max-width: 1000px; height: 180px; border: none; border-radius: 0.5rem; background: transparent; overflow: hidden; position: relative; margin-bottom: 2rem; display: flex; justify-content: center;
}
#cop-roulette-pointer {
    position: absolute; top: -5px; left: 50%; transform: translateX(-50%); width: 4px; height: calc(100% + 10px); background: #ef4444; border-radius: 2px; z-index: 10; box-shadow: 0 0 10px rgba(239, 68, 68, 0.7);
}
#cop-roulette {
    display: flex; height: 100%; position: absolute; left: 0; top: 0; transition: transform 7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cop-roulette-item {
    width: 180px; height: 180px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #374151; border-right: 2px solid rgba(0, 0, 0, 0.3); box-sizing: border-box; padding: 10px; transition: transform 0.2s ease;
}
.cop-roulette-item img {
    width: 100px; height: 100px; object-fit: contain; margin-bottom: 5px;
}
.cop-roulette-item span {
    color: white; font-weight: 600; font-size: 1rem; text-align: center; padding: 0 5px; line-height: 1.2;
}
#cop-modal-result {
    position: relative; background: #374151; padding: 1.5rem; border-radius: 0.75rem; box-shadow: 0 5px 15px rgba(0,0,0,0.2); text-align: center;
}
#cop-result-title {
    font-size: 1.2rem; color: #d1d5db; margin: 0 0 1rem; font-weight: 500;
}
#cop-result-prize-display {
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
#cop-result-prize-display img {
    width: 150px; height: 150px; object-fit: contain; background: #1f2937; padding: 15px; border-radius: 0.75rem; border: 1px solid #4b5563; box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}
#cop-result-prize-display span {
    font-size: 1.8rem; font-weight: 700; color: #ffffff;
}
.cop-result-description {
    font-size: 1rem; color: #9ca3af; margin-top: 0.5rem; max-width: 400px; line-height: 1.5;
}
.cop-modal-button {
    background-color: #16a34a; color: white; border: none; padding: 0.8rem 2rem; font-size: 1rem; font-weight: 600; border-radius: 0.75rem; cursor: pointer; transition: background-color 0.2s; margin-top: 1.5rem;
}
.cop-modal-button:hover { background-color: #15803d; }

/* Responsive adjustments */
@media (max-width: 900px) {
    .cop-case-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Allow slightly smaller cards on tablets */
    }
    .cop-case-image {
        height: 180px;
    }
    .cop-case-title {
        font-size: 1.3rem;
    }
    .cop-reward-icon {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 768px) {
    .cop-wrapper {
        padding: 10px;
    }
    .cop-case-grid {
        gap: 1.5rem;
    }
    .cop-case-card {
        padding: 1rem;
    }
    .cop-case-image {
        height: 160px;
        margin-bottom: 0.75rem;
    }
    .cop-case-title {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    .cop-rewards-title {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    .cop-reward-icon {
        width: 32px;
        height: 32px;
    }
    .cop-open-button {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }

    /* Modal smaller adjustments for small tablets/large phones */
    #cop-modal-content {
        padding: 1.5rem;
    }
    #cop-roulette-wrapper {
        height: 150px;
    }
    .cop-roulette-item {
        width: 150px;
        height: 150px;
    }
    .cop-roulette-item img {
        width: 80px;
        height: 80px;
    }
    .cop-roulette-item span {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) { /* Even smaller screens */
    .cop-case-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
        gap: 1rem;
    }
    .cop-case-card {
        padding: 0.75rem;
    }
    .cop-case-image {
        height: 140px;
    }
    .cop-case-title {
        font-size: 1.1rem;
    }
    .cop-reward-icon {
        width: 28px;
        height: 28px;
    }
    .cop-open-button {
        font-size: 0.9rem;
        padding: 0.7rem 0.8rem;
    }

    /* Modal adjustments for mobile phones */
    #cop-modal-content {
        padding: 1rem;
        max-height: 95%; /* Take more vertical space */
        max-width: 95%;
    }
    #cop-roulette-wrapper {
        height: 110px; /* Make the whole spinner smaller */
        margin-bottom: 1rem;
    }
    .cop-roulette-item {
        width: 110px; /* Make items smaller to see more on screen */
        height: 110px;
        padding: 8px;
    }
    .cop-roulette-item img {
        width: 60px; /* Adjust image size inside items */
        height: 60px;
    }
    .cop-roulette-item span {
        font-size: 0.75rem; /* Smaller font for item names */
    }
    #cop-result-prize-display img {
        width: 100px;
        height: 100px;
    }
    #cop-result-prize-display span {
        font-size: 1.3rem;
    }
    .cop-result-description {
        font-size: 0.9rem;
    }
    .cop-modal-button {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
}