/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #00adb5;
    --primary-dark: #007b80;
    --dark: #16213e;
    --darker: #1a1a2e;
    --light: #eeeeee;
    --gray: #bbbbbb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --card-bg: rgba(30, 30, 46, 0.8);
}

body {
    background: linear-gradient(135deg, var(--darker), var(--dark));
    color: var(--light);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: rgba(10, 10, 20, 0.8);
    padding: 20px 0;
    border-bottom: 2px solid var(--primary);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 173, 181, 0.5);
}

.balance-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.balance-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--warning);
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 15px;
    border-radius: 20px;
    border: 2px solid var(--warning);
}

main {
    padding: 40px 0;
}

section {
    margin-bottom: 40px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary);
}

#roll-section {
    background: rgba(22, 22, 36, 0.9);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--primary);
}

.case-cost {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--warning);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.case-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative;
}

.case-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 173, 181, 0.4);
}

.case-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 2px solid var(--primary);
}

.case-info {
    padding: 15px;
    text-align: center;
}

.case-info h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--primary);
}

.case-price {
    font-weight: bold;
    color: var(--warning);
    margin: 5px 0;
}

.case-rarity {
    font-size: 0.9rem;
    color: var(--gray);
}

.roll-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skins-container {
    position: relative;
    height: 180px;
    overflow: hidden;
    margin: 30px 0;
    border-radius: 10px;
    background: rgba(10, 10, 20, 0.7);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    width: 100%;
}

.skins-track {
    display: flex;
    position: absolute;
    top: 10px;
    left: 0;
    transition: transform 0.1s linear;
}

.skin-item {
    width: 160px;
    height: 160px;
    margin: 0 10px;
    background: rgba(40, 40, 60, 0.9);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #393e46;
    transition: all 0.2s ease;
}

.skin-item.winner {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 173, 181, 0.7);
    transform: scale(1.05);
}

.skin-item img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.skin-item .skin-name {
    margin-top: 5px;
    font-size: 0.8rem;
    text-align: center;
    color: var(--light);
    font-weight: 500;
}

.btn {
    background: linear-gradient(45deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 173, 181, 0.4);
}

.btn:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: rgba(0, 173, 181, 0.1);
}

.roll-controls {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

#result {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.result-container {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 20px 0;
    padding: 20px;
    background: rgba(30, 30, 50, 0.5);
    border-radius: 10px;
}

.result-container img {
    width: 200px;
    height: 150px;
    object-fit: contain;
    border: 2px solid var(--primary);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
}

.result-info {
    flex: 1;
}

.result-info h4 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--light);
}

.result-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.detail {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
}

.detail span:first-child {
    font-size: 0.9rem;
    color: var(--gray);
}

.detail span:last-child {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 5px;
}

.new-balance {
    font-size: 1.3rem;
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    font-weight: bold;
}

.new-balance span {
    color: var(--warning);
}

.rarity-common { color: #5a6268; }
.rarity-uncommon { color: #117a43; }
.rarity-rare { color: #0d47a1; }
.rarity-epic { color: #6a0dad; }
.rarity-legendary { color: #ff8c00; }

.hidden {
    display: none;
}

footer {
    background: rgba(10, 10, 20, 0.8);
    padding: 20px 0;
    text-align: center;
    border-top: 2px solid var(--primary);
    color: var(--gray);
}