
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    direction: rtl;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin-bottom: 0.5rem;
}

.player-info {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Tajawal', sans-serif;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.error {
    color: #e74c3c;
    background-color: #fadbd8;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}


.form-section {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
}

.form-section h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Tajawal', sans-serif;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}


.game-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .game-container {
        grid-template-columns: 1fr 1fr;
    }
}

.game-status {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.status-waiting {
    color: #f39c12;
}

.status-night {
    color: #2c3e50;
}

.status-day {
    color: #3498db;
}

.status-ended {
    color: #e74c3c;
}

.players-list {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.players-list ul {
    list-style: none;
}

.players-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.players-list li:last-child {
    border-bottom: none;
}

.player-name {
    flex-grow: 1;
}

.you {
    color: #3498db;
    font-weight: bold;
}

.leader {
    color: #27ae60;
    font-weight: bold;
}

.dead {
    opacity: 0.6;
}

.dead-label {
    color: #e74c3c;
}

.game-phase {
    grid-column: 1 / -1;
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.players-to-choose {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.player-choice {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: all 0.3s;
}

.player-choice:hover {
    background-color: #f0f0f0;
}

.player-choice input[type="radio"] {
    display: none;
}

.player-choice input[type="radio"]:checked + label {
    font-weight: bold;
    color: #3498db;
}

.player-choice label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.role-icon {
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

.night-result {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.night-result.killed {
    background-color: #fadbd8;
    color: #c0392b;
}

.night-result.saved {
    background-color: #d5f5e3;
    color: #27ae60;
}

.night-result.peaceful {
    background-color: #ebf5fb;
    color: #2980b9;
}

.role-card {
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
}



.role-card.girl {
    background-color: #f5eef8;
    border: 2px solid #9b59b6;
}

.role-card.citizen {
    background-color: #e8f8f5;
    border: 2px solid #1abc9c;
}

.role-card.unknown {
    background-color: #f9f9f9;
    border: 2px solid #bdc3c7;
}

.role-name {
    display: block;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.role-description {
    font-size: 0.9rem;
}


.results-container {
    text-align: center;
}

.game-result {
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.game-result.citizens {
    background-color: #d5f5e3;
    border: 2px solid #27ae60;
}

.game-result.mafia {
    background-color: #fadbd8;
    border: 2px solid #e74c3c;
}

.result-message {
    margin-top: 1rem;
    font-size: 1.1rem;
}

.players-roles {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    text-align: right;
}

.players-roles li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.role-badge.mafia {
    background-color: #fadbd8;
    color: #c0392b;
}
.mafia_boss {
    background-color: #fadbd8;
    color: #c0392b;
}

.role-badge.girl {
    background-color: #f5eef8;
    color: #9b59b6;
}

.role-badge.citizen {
    background-color: #e8f8f5;
    color: #1abc9c;
}

.game-actions {
    margin-top: 2rem;
}



.role-icon {
    font-family: 'RoleIcons';
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.role-icon.unknown:before {
    content: "?";
}

.role-icon.mafia:before {
    content: "🔪";
}

.role-icon.girl:before {
    content: "🛡️";
}

.role-icon.citizen:before {
    content: "👤";
}

.leader-dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.game-controls {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.status-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.status-buttons .btn {
    flex: 1;
    min-width: 150px;
}

.status-buttons .btn.active {
    background-color: #27ae60;
    font-weight: bold;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.players-list table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.players-list th, 
.players-list td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.players-list th {
    background-color: #2c3e50;
    color: white;
}

.players-list tr:last-child td {
    border-bottom: none;
}

.players-list tr.dead {
    opacity: 0.6;
}

.role-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-block;
}

.role-badge.mafia {
    background-color: #fadbd8;
    color: #c0392b;
}
.role-badge.mafia_boss
 {
    background-color: #fadbd8;
    color: #c0392b;
}

.role-badge.girl {
    background-color: #f5eef8;
    color: #9b59b6;
}

.role-badge.citizen {
    background-color: #e8f8f5;
    color: #1abc9c;
}

.game-info {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-card {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.info-card p {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.info-card p strong {
    color: #2c3e50;
}

.player-status-killed {
    position: relative;
}

.player-status-killed::after {
    content: "✝";
    color: #e74c3c;
    font-size: 1.2rem;
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}


.death-message {
    background-color: #fadbd8;
    color: #c0392b;
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-weight: bold;
    text-align: center;
}

.player-status-killed {
    position: relative;
    color: #e74c3c;
}

.player-status-killed::before {
    content: "✝";
    margin-left: 5px;
}

.mafia-action, .girl-action {
    background: rgba(0,0,0,0.05);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.players-to-choose {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.player-choice {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.player-choice:hover {
    background: #f5f5f5;
}

.player-choice input[type="radio"] {
    display: none;
}

.player-choice input[type="radio"]:checked + label {
    font-weight: bold;
    color: #3498db;
}

.leader-dashboard {
    position: relative;
}

.refresh-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #3498db;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.phase-controls {
    margin: 20px 0;
    text-align: center;
}

.leader-instruction {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}
.night-result {
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.night-result.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.night-result.failed {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.killed-player {
    margin-top: 10px;
    padding: 10px;
    background-color: #fff3cd;
    color: #856404;
    border-radius: 4px;
}

.btn-day {
    background-color: #3498db;
    color: white;
}

.btn-night {
    background-color: #2c3e50;
    color: white;
}

.phase-controls {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.phase-controls form {
    display: inline-block;
}


.night-result {
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
}

.night-result.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.night-result.failed {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.player-choice label.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.player-choice input[type="radio"]:disabled + label {
    color: #999;
}
.player-choice input[type="radio"]:checked + label {
    font-weight: bold;
    color: #e74c3c;
    background-color: #fde8e8;
    border: 2px solid #e74c3c;
    border-radius: 5px;
}

.saved-choice {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}
.refresh-counter {
    position: fixed;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 1000;
    animation: pulse 2s infinite;
}

.refresh-counter #countdown {
    font-weight: bold;
    color: #f1c40f;
    min-width: 20px;
    display: inline-block;
    text-align: center;
}
.leader-refresh {
    background-color: rgba(46, 204, 113, 0.8);
}

.player-refresh {
    background-color: rgba(52, 152, 219, 0.8);
}

.refresh-info {
    font-size: 12px;
    margin-right: 5px;
    opacity: 0.8;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}


.refresh-counter.warning {
    background-color: rgba(231, 76, 60, 0.8);
    animation: pulse-fast 0.5s infinite;
}

@keyframes pulse-fast {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}



.voting-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.players-to-vote {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.vote-option {
    background: white;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.btn-vote {
    background-color: #dc3545;
    color: white;
    font-weight: bold;
}

.btn-vote:hover {
    background-color: #c82333;
}


.voting-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.vote-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.btn-vote {
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    width: 100%;
    transition: all 0.3s;
}

.btn-vote:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.voting-result {
    background: #e9ecef;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #dc3545;
}
.voting-form {
    margin-top: 20px;
}

.vote-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.vote-option {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    transition: all 0.3s;
    border: 1px solid #ddd;
}

.vote-option:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.vote-option input[type="radio"] {
    margin-left: 10px;
}

.vote-option label {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.btn-submit-vote {
    background: #dc3545;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    width: 100%;
}

.btn-submit-vote:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.no-players {
    color: #6c757d;
    text-align: center;
    padding: 20px;
    border: 1px dashed #ddd;
    border-radius: 8px;
}


.voting-result {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    animation: fadeIn 0.5s;
}

.voting-result.tie {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.tie-message {
    color: #856404;
    font-weight: bold;
    margin-bottom: 10px;
}

.executed-player {
    font-weight: bold;
    color: #dc3545;
    margin: 0 5px;
}

.execution-effect {
    text-align: center;
    font-size: 30px;
    margin-top: 10px;
    color: #dc3545;
    animation: bounce 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}





.execution-result {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    animation: fadeIn 0.5s;
}

.execution-result h4 {
    color: #721c24;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.execution-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #dc3545;
    font-size: 14px;
    color: #856404;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.death-alert {
    background-color: #ffdddd;
    border: 1px solid #cc0000;
    color: #800000;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}








.result-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    text-align: center;
}

.result-card {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.result-card.mafia {
    border-top: 5px solid #dc3545;
}

.result-card.citizens {
    border-top: 5px solid #28a745;
}

.players-section {
    margin: 30px 0;
    text-align: right;
}

.player-result {
    padding: 10px;
    margin: 5px 0;
    background: #f8f9fa;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
}

.player-role {
    font-weight: bold;
}

.player-role.mafia {
    color: #dc3545;
}

.player-role.citizen {
    color: #6c757d;
}

.player-role.girl {
    color: #ff69b4;
}

.dead {
    opacity: 0.7;
    text-decoration: line-through;
}



span.mafia_boss {
    background-color: #fadbd8;
    color: #c0392b;
}







