body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0f0f0f, #1e1e1e);
    color: #fff;
    font-family: 'Orbitron', Arial, sans-serif;
    min-height: 100vh;
}
.bg-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #ff007a33 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulse 4s infinite ease-in-out;
}
@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}
h1 {
    font-size: 2.5rem;
    color: #ff007a;
    text-shadow: 0 0 15px #ff007a, 0 0 30px #ff66b2;
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: 2px;
    animation: glow 2s infinite alternate;
    cursor: pointer;
    font-family: 'Orbitron', Arial, sans-serif;
}
@keyframes glow {
    from {
        text-shadow: 0 0 10px #ff007a;
    }
    to {
        text-shadow: 0 0 25px #ff66b2, 0 0 30px #ff007a;
    }
}
.filters input, .filters select,
table, th, td,
.desc,
.abilities-cell {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}
.filters {
    margin: 0 auto 30px auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.filters input, .filters select {
    padding: 10px 18px;
    border-radius: 10px;
    border: 2px solid #00ffe1;
    background: #222;
    color: #fff;
    font-family: 'Orbitron', Arial, sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 10px #00ffe144;
}
.filters input:focus, .filters select:focus {
    border-color: #ff007a;
    box-shadow: 0 0 15px #ff007a88;
}
table {
    border-collapse: collapse;
    width: 95%;
    margin: 0 auto 40px auto;
    background: #181818cc;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 30px #00ffe1aa;
}
th, td {
    border: 1px solid #333;
    padding: 12px 10px;
    text-align: left;
}
th {
    background: #222;
    color: #00ffe1;
    font-size: 1.1rem;
    letter-spacing: 1px;
    user-select: none;
    transition: background 0.2s, color 0.2s;
}
th[data-sort] { cursor: pointer; }
th.sorted-asc::after { content: " ▲"; color: #ff007a; }
th.sorted-desc::after { content: " ▼"; color: #ff007a; }
tr:hover {
    background: #2a2a2a;
    transition: background 0.15s;
}
.desc {
    max-width: 400px;
    min-width: 200px;
    white-space: pre-line;
    color: #fff;
}
.abilities-cell {
    max-width: 220px;
    min-width: 80px;
    white-space: normal;
    word-break: break-word;
    color: #fff;
}
@media (max-width: 900px) {
    table, th, td { font-size: 0.95rem; }
    .desc { max-width: 200px; min-width: 100px; }
    .abilities-cell { max-width: 120px; min-width: 60px; }
}
@media (max-width: 600px) {
    table, th, td { font-size: 0.85rem; }
    .desc { max-width: 120px; min-width: 60px; }
    .abilities-cell { max-width: 60px; min-width: 40px; }
    .filters { flex-direction: column; gap: 6px; }
}
.ability-badge {
    display: inline-block;
    background: #222;
    color: #00ffe1;
    border: 1px solid #00ffe1;
    border-radius: 8px;
    padding: 2px 8px;
    margin: 1px 2px;
    font-size: 0.95em;
    white-space: nowrap;
}
#cardsContainer {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
    margin: 0 auto 40px auto;
    width: 98%;
}
.role-card-header {
    font-family: 'Orbitron', Arial, sans-serif;
    font-size: 2.2rem;
    color: #ff007a;
    padding: 22px 18px 0 18px;
    text-shadow: 0 0 10px #ff007a;
    text-align: center;
    font-weight: 600;
}
.role-card-footer .modname {
    color: #ff66b2;
    font-weight: bold;
    font-family: inherit;
}
.role-card-footer {
    display: block;
    text-align: center;
    padding: 14px 18px 18px 18px;
    font-size: 1.08rem;
    color: #00ffe1;
    border-top: 1px solid #333;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-weight: 500;
    line-height: 1.5;
}
.role-card {
    background: linear-gradient(135deg, #181818cc 60%, #222 100%);
    box-shadow: 0 0 30px #00ffe1aa;
    transition: background 0.2s, box-shadow 0.2s;
    color: #fff;
    width: 600px; /* zwiększona szerokość */
    min-width: 340px;
    max-width: 98vw;
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid #333;
    transition: transform 0.15s;
}

.role-card-main {
    display: flex;
    flex-direction: row;
    gap: 18px;
    padding: 10px 18px 0 18px;
}

.role-card-desc {
    flex: 3 1 60%;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 1rem;
    color: #fff;
    white-space: pre-line;
    word-break: break-word;
    min-width: 0;
}

.role-card-abilities {
    flex: 2 1 40%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    justify-content: flex-start;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 0.98rem;
    min-width: 0;
    word-break: break-word;
    max-width: 220px;
    overflow-x: auto;
    white-space: normal;
}

.role-card-abilities .ability-badge {
    margin: 2px 0;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
}

@media (max-width: 900px) {
    .role-card { width: 98vw; min-width: 0; }
    .role-card-main { flex-direction: column; }
    .role-card-abilities { max-width: 100%; }
}
.toggle-view-btn {
    position: fixed;
    top: 24px;
    right: 32px;
    z-index: 100;
    padding: 12px 28px;
    border-radius: 12px;
    border: 2px solid #00ffe1;
    background: linear-gradient(135deg, #181818 60%, #222 100%);
    color: #00ffe1;
    font-family: 'Orbitron', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 0 16px #00ffe144;
    cursor: pointer;
    transition: 
        background 0.2s, 
        color 0.2s, 
        border 0.2s, 
        box-shadow 0.2s, 
        transform 0.1s;
    outline: none;
}
.toggle-view-btn:hover, .toggle-view-btn:focus {
    background: linear-gradient(135deg, #ff007a 40%, #ff66b2 100%);
    color: #fff;
    border-color: #ff007a;
    box-shadow: 0 0 24px #ff007a88;
    transform: scale(1.04);
}
@media (max-width: 600px) {
    .toggle-view-btn {
        top: 10px;
        right: 10px;
        padding: 8px 16px;
        font-size: 0.98rem;
    }
}
/* Jaśniejsze tło dla crewmate */
.role-card.role-crewmate {
    background: linear-gradient(135deg, #263a4d 60%, #2a3d4f 100%);
    box-shadow: 0 0 30px #00ffe1cc;
}

/* Czerwonawe tło dla impostor */
.role-card.role-impostor {
    background: linear-gradient(135deg, #3b2323 60%, #441a22 100%);
    box-shadow: 0 0 30px #ff007acc;
}

/* Neutral - delikatnie fioletowe */
.role-card.role-neutral {
    background: linear-gradient(135deg, #23232b 60%, #222233 100%);
    box-shadow: 0 0 30px #ff66b288;
}
