:root {
    --primary: #2c3e50;
    --secondary: #34495e;
    --accent: #e74c3c;
    --success: #27ae60;
    --text: #ecf0f1;
    --bg: #1a1a1a;
    --card-bg: #2d2d2d;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 20px;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.balance {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f1c40f;
}

.codes input {
    padding: 10px;
    border-radius: 5px;
    border: none;
    background: #444;
    color: white;
    margin-right: 10px;
}

.codes button {
    padding: 10px 20px;
    background: var(--accent);
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.codes button:hover {
    background: #c0392b;
}

h2 {
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    margin-top: 40px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Case Card Styles */
.case-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid #444;
    position: relative;
    overflow: hidden;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    border-color: var(--accent);
}

.case-card.limited::after {
    content: "LIMITED";
    position: absolute;
    top: 10px;
    right: -30px;
    background: #e74c3c;
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.7rem;
    font-weight: bold;
}

.case-cost {
    font-weight: bold;
    color: #f1c40f;
    margin-top: 10px;
}

/* Inventory Item Styles */
.item-card {
    background: #3d3d3d;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    border: 1px solid #555;
}

.item-value {
    color: #2ecc71;
    font-size: 0.9rem;
    margin: 10px 0;
}

.sell-btn {
    background: #e67e22;
    border: none;
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 10% auto;
    padding: 40px;
    border-radius: 15px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 30px rgba(231, 76, 60, 0.2);
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

#item-result {
    font-size: 2rem;
    font-weight: bold;
    margin: 30px 0;
    min-height: 60px;
}

#action-buttons button {
    padding: 12px 30px;
    margin: 0 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

#action-buttons button:first-child { background: var(--success); color: white; }
#action-buttons button:last-child { background: var(--accent); color: white; }

/* Heart Effect */
.heart {
    position: fixed;
    color: #ff4d4d;
    font-size: 24px;
    pointer-events: none;
    z-index: 1000;
    animation: floatUp 1.5s ease-out forwards;
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-200px) scale(1.5); opacity: 0; }
}

.inventory-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.inventory-controls button {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.inventory-controls button:hover {
    background: #7f8c8d;
}
