:root {
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --accent-color: #e94560;
    --text-color: #ffffff;
    --card-front: #0f3460;
    --card-back: #e94560;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    text-align: center;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: flex;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--accent-color);
}

h2 {
    margin-bottom: 15px;
}

.form-group {
    width: 100%;
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input, select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background-color: var(--card-bg);
    color: white;
    font-size: 1rem;
    outline: none;
}

button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 20px;
    width: 100%;
}

button:active {
    transform: scale(0.98);
}

button.hidden {
    display: none;
}

/* Player Input Styles */
.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.input-group input {
    flex: 1;
}

.btn-small {
    width: auto;
    margin-top: 0;
    padding: 10px 20px;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.players-list {
    list-style: none;
    max-height: 150px;
    overflow-y: auto;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 10px;
    text-align: left;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.player-item:last-child {
    border-bottom: none;
}

.player-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.remove-player, .edit-player {
    cursor: pointer;
    font-weight: bold;
    padding: 5px;
    transition: color 0.2s;
}

.remove-player {
    color: #e94560;
}

.remove-player:hover {
    color: #ff002b;
}

.edit-player {
    color: #4ecca3; /* A nice green/teal for edit */
}

.edit-player:hover {
    color: #6effd6;
}

.edit-input {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 2px 5px;
    border-radius: 4px;
    width: 100%;
    max-width: 150px;
}

/* Card Animation */
.card-container {
    perspective: 1000px;
    width: 300px;
    height: 400px;
    margin: 30px auto;
    cursor: pointer;
}

.card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card.is-flipped {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    padding: 20px;
    border: 2px solid rgba(255,255,255,0.1);
}

.card-front {
    background: linear-gradient(135deg, var(--card-front), #16213e);
}

.card-back {
    background: linear-gradient(135deg, var(--card-back), #c0354e);
    transform: rotateY(180deg);
}

.icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

#card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-transform: uppercase;
}

#card-content p {
    font-size: 1.2rem;
    line-height: 1.4;
}

.role-impostor {
    color: #ffffff;
    font-weight: bold;
}

.role-crew {
    color: #ffffff;
}

.highlight-text {
    font-size: 2rem;
    color: var(--accent-color);
    margin-top: 10px;
}

.instruction {
    opacity: 0.8;
    margin-bottom: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-20px);}
    60% {transform: translateY(-10px);}
}
