/* RESULTS SCREEN */
#results-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.98);
    z-index: 4000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
}

.results-title {
    font-size: 3rem;
    color: var(--error);
    text-shadow: 0 0 20px rgba(255, 51, 102, 0.6);
    margin-bottom: 30px;
    letter-spacing: 4px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--error);
    padding-bottom: 10px;
    width: 80%;
    text-align: center;
}

.results-stats-row {
    display: flex;
    gap: 40px;
    margin-bottom: 10px;
    width: 80%;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 8px;
    border: 1px solid #333;
}

.res-stat { text-align: center; }
.res-label { font-size: 0.8rem; color: #888; margin-bottom: 5px; }
.res-val { font-size: 1.8rem; font-weight: bold; color: #fff; font-family: 'Courier New', monospace; }

.results-content-wrapper {
    display: flex;
    width: 90%;
    height: 50%;
    gap: 40px;
}

.results-col {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.res-section-title {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 15px;
    text-transform: uppercase;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

/* Item Grid (Small squares) */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 10px;
    overflow-y: auto;
    padding-right: 5px;
}

.res-item-card {
    width: 64px;
    height: 64px;
    background: #222;
    border: 1px solid #444;
    border-radius: 4px;
    position: relative;
    background-size: cover;
    background-position: center;
}
.res-item-count {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 0.8rem;
    padding: 1px 4px;
    border-radius: 2px;
    font-family: 'Courier New', monospace;
    border: 1px solid #666;
}

/* Achievement List */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 5px;
}

.res-ach-card {
    display: flex;
    align-items: center;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid var(--success);
    padding: 10px;
    border-radius: 4px;
    gap: 15px;
}

.res-ach-icon {
    width: 50px;
    height: 50px;
    background: #000;
    border: 1px solid #444;
}

.res-ach-info { display: flex; flex-direction: column; justify-content: center; }
.res-ach-name { color: var(--success); font-weight: bold; font-size: 1rem; }
.res-ach-unlock { color: #888; font-size: 0.8rem; margin-top: 2px; }

#results-return-btn {
    margin-top: auto;
    background: var(--error);
    border-color: #ff6b6b;
    color: #000;
    font-weight: bold;
}
#results-return-btn:hover {
    background: #ff0000;
    color: #fff;
}

#unlock-summary-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 10, 0.98);
    z-index: 4500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.4s ease-out;
}

.summary-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: var(--success);
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
    margin-bottom: 20px;
    letter-spacing: 4px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--success);
    padding-bottom: 10px;
}

#unlock-scroller {
    display: flex;
    gap: 30px;
    padding: 40px;
    width: 100%;
    max-width: 1300px;
    overflow-x: auto;
    overflow-y: visible; /* Allow hover effects to pop out */
    min-height: 450px; /* Space for cards + hover lift */
    align-items: center;
    justify-content: center; /* Center if few items, flex-start if many */
}

/* Force flex-start if content overflows (handled by JS usually, but this helps) */
#unlock-scroller:not(:empty) {
    justify-content: center;
}

/* Scale up cards slightly for the "New Unlock" presentation */
#unlock-scroller .unlock-card {
    width: 220px;
    height: 320px;
    flex-shrink: 0;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform: scale(0.5);
}

#unlock-scroller .theme-card {
    width: 220px;
    height: 320px;
    flex-shrink: 0;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform: scale(0.5);
    justify-content: center;
}

#unlock-scroller .ach-block {
    width: 220px;
    height: 320px;
    flex-shrink: 0;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform: scale(0.5);
    background: linear-gradient(135deg, #15051a 0%, #0f0f16 100%);
    border-color: #bd00ff;
    justify-content: center; /* Center vertically */
    gap: 15px;
}

#unlock-scroller .ach-block .ach-block-icon {
    font-size: 4rem; /* Larger icon */
    color: #bd00ff;
    text-shadow: 0 0 20px rgba(189, 0, 255, 0.5);
    margin-bottom: 20px;
}

#unlock-scroller .ach-block .ach-block-title {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 10px;
}

#unlock-scroller .ach-block .ach-block-desc {
    font-size: 0.9rem;
    color: #ccc;
    padding: 0 10px;
}

/* Hover effects */
#unlock-scroller > div:hover {
    transform: translateY(-15px) scale(1.05) !important;
    z-index: 10;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

@keyframes popIn {
    to { opacity: 1; transform: scale(1); }
}

#summary-confirm-btn {
    margin-top: 10px;
    max-width: 300px;
}