/* Stage Select Overlay */
#stage-select-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: 2000;
    color: white;
}

.overlay-content {
    background: #111;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    border: 2px solid #333;
    max-width: 800px;
    width: 90%;
    box-shadow: 0 0 50px rgba(0, 242, 96, 0.2);
}

.overlay-content h2 {
    font-size: 40px;
    margin-bottom: 30px;
    background: linear-gradient(to right, #00f260, #0575e6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    max-height: 50vh;
    overflow-y: auto;
    padding: 10px;
}

.stage-btn {
    background: #222;
    border: 2px solid #444;
    color: white;
    padding: 20px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s;
    position: relative;
    font-family: 'Courier New', Courier, monospace;
}

.stage-btn:hover:not(:disabled) {
    background: #0575e6;
    border-color: #00f260;
    transform: scale(1.1);
    box-shadow: 0 0 15px #0575e6;
}

.stage-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #111;
    border-color: #333;
}

.stage-btn .lock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    opacity: 0.7;
}

/* Shop Overlay */
#shop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    color: white;
}

.shop-header {
    font-size: 24px;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.shop-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.shop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #222;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #444;
}

.item-info {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
}

.item-icon {
    font-size: 30px;
}

.item-details h4 {
    margin: 0;
    font-size: 18px;
    color: #00f260;
}

.item-details p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #aaa;
}

.buy-btn {
    background: #f1c40f;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.buy-btn:hover:not(:disabled) {
    background: #f39c12;
    transform: scale(1.05);
}

.buy-btn:disabled {
    background: #555;
    cursor: not-allowed;
    color: #888;
}

.close-btn-overlay {
    background: transparent;
    border: 1px solid #aaa;
    color: #aaa;
    padding: 10px 30px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    transition: 0.3s;
}

.close-btn-overlay:hover {
    border-color: white;
    color: white;
    background: rgba(255, 255, 255, 0.1);
}