/* Roguelite Meta UI Styling */

/* Overlay Container */
.rogue-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 5, 5, 0.95);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffcccc;
    font-family: 'Courier New', monospace;
    backdrop-filter: blur(5px);
}

.rogue-panel {
    width: 90%;
    max-width: 1200px;
    height: 90%;
    display: flex;
    flex-direction: column;
    /* Stranger Things Vibe */
    border: 2px solid #ff3333;
    box-shadow: 0 0 20px #ff0000;
    background: linear-gradient(135deg, #0f0505 0%, #1a0a0a 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.rogue-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(transparent 0px,
            transparent 2px,
            rgba(255, 0, 0, 0.05) 3px,
            rgba(255, 0, 0, 0.05) 4px);
    pointer-events: none;
}

/* Header */
.rogue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #800000;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.rogue-title {
    font-size: 2.5rem;
    color: #ff0000;
    text-transform: uppercase;
    text-shadow: 0 0 10px #ff0000;
    letter-spacing: 2px;
}

.ember-display {
    font-size: 1.5rem;
    color: #ffaa00;
    text-shadow: 0 0 10px #ff6600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ember-icon {
    width: 30px;
    height: 30px;
    background-color: #ffaa00;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from {
        transform: scale(1);
        opacity: 0.8;
    }

    to {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Tabs */
.rogue-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.rogue-tab-btn {
    background: #330000;
    color: #ffcccc;
    border: 1px solid #800000;
    padding: 10px 20px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    text-transform: uppercase;
}

.rogue-tab-btn:hover {
    background: #550000;
    box-shadow: 0 0 10px #ff0000;
}

.rogue-tab-btn.active {
    background: #800000;
    color: #fff;
    border-color: #ff0000;
    box-shadow: 0 0 15px #ff0000 inset;
}

/* Content Area */
.rogue-content {
    flex: 1;
    overflow-y: auto;
    display: none;
    padding-right: 10px;
}

.rogue-content.active {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Scrollbar */
.rogue-content::-webkit-scrollbar {
    width: 8px;
}

.rogue-content::-webkit-scrollbar-track {
    background: #111;
}

.rogue-content::-webkit-scrollbar-thumb {
    background: #500;
    border-radius: 4px;
}

/* Item Cards (Upgrades/Classes/Mods) */
.rogue-card {
    background: rgba(30, 10, 10, 0.8);
    border: 1px solid #600;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.rogue-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.2);
    border-color: #f00;
}

.rogue-card.locked {
    filter: grayscale(0.8);
    opacity: 0.7;
}

.card-title {
    font-size: 1.2rem;
    color: #f00;
    font-weight: bold;
}

.card-desc {
    font-size: 0.9rem;
    color: #ddd;
    flex-grow: 1;
}

.card-stats {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 5px;
}

.prob-bar {
    height: 4px;
    background: #300;
    margin-top: 5px;
    border-radius: 2px;
    overflow: hidden;
}

.prob-fill {
    height: 100%;
    background: #f00;
    width: 0%;
    transition: width 0.3s;
}

.card-cost {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ffaa00;
    font-weight: bold;
}

.buy-btn {
    width: 100%;
    padding: 10px;
    background: #600;
    color: white;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 10px;
    transition: background 0.2s;
}

.buy-btn:hover {
    background: #900;
}

.buy-btn:disabled {
    background: #333;
    cursor: not-allowed;
    color: #888;
}

/* Run Modifiers */
.mod-card {
    cursor: pointer;
    border: 1px dashed #600;
}

.mod-card.selected {
    border: 2px solid #ffaa00;
    background: rgba(50, 20, 0, 0.3);
}

/* Start Button */
.start-run-btn {
    margin-top: 20px;
    padding: 20px;
    font-size: 2rem;
    background: #800;
    color: white;
    border: 2px solid #f00;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    text-shadow: 0 0 10px black;
    transition: all 0.3s;
    align-self: center;
    width: 100%;
}

.start-run-btn:hover {
    background: #f00;
    box-shadow: 0 0 30px #f00;
    transform: scale(1.02);
}

.back-home {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-home:hover {
    color: #fff;
}