/* Layout & Containers */
#album-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.navigation-bar {
    margin: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

#player-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

/* Streak Sections */
.streak-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    max-width: 100%;
    overflow: hidden;
}

.streak-section {
    width: calc(100% - 20px);
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 15px; /* reduced horizontal padding now that arrows removed */
    border-radius: 10px;
    position: relative;
    box-sizing: border-box;
    max-width: 1400px;
}

.streak-section h2 {
    color: #333;
    margin-bottom: 15px;
}

/* Rewards Grid */
.rewards-grid {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px 0;
    margin: 0 -5px;
    justify-content: center;
    align-items: flex-start;
}

/* Keep hiding any native scrollbars if they appear */
.rewards-grid::-webkit-scrollbar { display: none; }
.rewards-grid { -ms-overflow-style: none; scrollbar-width: none; }

/* Reward Cards */
.reward-card {
    aspect-ratio: 3/4;
    flex: 0 1 calc(20% - 15px); /* try to fit ~5 per row on wide screens, will wrap */
    max-width: 180px;
    min-width: 120px;
    box-sizing: border-box;
    position: relative;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.reward-card:hover {
    transform: scale(1.03);
}

.reward-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Card States */
.reward-card.locked {
    background: #ddd;
}

.reward-card.locked::after {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
}

.reward-card.new::before {
    content: 'NEW';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f5ba0a;
    color: #fff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    z-index: 1;
    animation: pulse 2s infinite;
}

.reward-card.collected.new {
    animation: newCardGlow 2s infinite;
}

/* scroll arrows removed - styles deprecated
   Arrow UI removed because layout is now a wrapping flex grid.
   Keeping no-op comment here for history. */

/* Scroll dots removed - styles deprecated */

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes newCardGlow {
    0% { box-shadow: 0 0 5px rgba(245, 186, 10, 0.5); }
    50% { box-shadow: 0 0 20px rgba(245, 186, 10, 0.8); }
    100% { box-shadow: 0 0 5px rgba(245, 186, 10, 0.5); }
}

/* Modal styles for expanded card */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    opacity: 1;
    transition: background-color 0.3s ease;
}

.expanded-card {
    position: relative;
    width: 80vw;
    max-width: 600px;
    height: 80vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transform: scale(0.7);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.expanded-card.active {
    transform: scale(1);
    opacity: 1;
}

.expanded-card img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Update reward card to be clickable */
.reward-card.collected {
    cursor: pointer;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #album-container {
        padding: 5px;
    }

    .streak-section {
        padding: 10px 15px; /* reduced horizontal padding now that arrows removed */
        width: calc(100% - 10px);
    }

    /* On smaller screens let cards shrink and wrap to multiple rows */
    .rewards-grid {
        gap: 12px;
    }
    .reward-card {
        flex: 0 1 calc(33.333% - 12px); /* ~3 per row on small screens */
        max-width: 160px;
        min-width: 100px;
    }

    /* Arrow styles removed for responsive sizes */
}

@media (min-width: 1200px) {
    /* On very wide screens allow more cards per row but cap width */
    .reward-card {
        flex: 0 1 calc(16.666% - 15px); /* ~6 per row where space allows */
        max-width: 220px;
        min-width: 140px;
    }
}

/* Even smaller screens */
@media (max-width: 480px) {
    /* Reduce gaps and use a 2-per-row basis on very small screens to avoid wrapping artifacts */
    .rewards-grid {
        gap: 8px;
    }
    .reward-card {
        flex: 0 1 calc(50% - 8px); /* 2 per row on very small screens for consistent sizing */
        min-width: 100px;
        min-height: 140px; /* ensure even row heights when wrapping */
    }
}

/* Touch Screen Optimizations */
@media (hover: none) {
    .rewards-grid {
        padding-bottom: 20px;
    }
}

.hidden {
    display: none;
}
