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

body {
    font-family: 'Noto Nastaliq Urdu', serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #eee;
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    color: #f39c12;
    text-shadow: 2px 2px 8px rgba(243, 156, 18, 0.3);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #bbb;
}

/* Screens */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Card */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card h2 {
    font-size: 1.8rem;
    color: #f39c12;
    margin-bottom: 20px;
    text-align: center;
}

/* Input Group */
.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    font-size: 1.1rem;
    font-family: 'Noto Nastaliq Urdu', serif;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    outline: none;
    transition: all 0.3s;
}

input[type="text"]:focus {
    border-color: #f39c12;
    background: rgba(255, 255, 255, 0.15);
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Players List */
.players-list {
    margin: 20px 0;
    min-height: 50px;
}

.player-item {
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid rgba(52, 152, 219, 0.4);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.player-item span {
    font-size: 1.1rem;
}

.player-item .remove-btn {
    background: rgba(231, 76, 60, 0.8);
    border: none;
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.player-item .remove-btn:hover {
    background: rgba(231, 76, 60, 1);
    transform: scale(1.05);
}

.info-text {
    color: #bbb;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 10px;
}

/* Settings */
.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    font-size: 1.1rem;
    color: #f39c12;
    margin-bottom: 8px;
}

.select-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 1.1rem;
    font-family: 'Noto Nastaliq Urdu', serif;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
}

.select-input:focus {
    border-color: #f39c12;
}

.select-input option {
    background: #16213e;
    color: #fff;
}

/* Checkbox Group */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.checkbox-label:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #f39c12;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #f39c12;
}

.checkbox-label span {
    font-size: 1.1rem;
    color: #fff;
}

.checkbox-label input[type="checkbox"]:checked + span {
    color: #f39c12;
    font-weight: 700;
}


/* Buttons */
.btn {
    padding: 12px 24px;
    font-size: 1.1rem;
    font-family: 'Noto Nastaliq Urdu', serif;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 700;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #2980b9, #2980b9);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #2980b9, #2980b9);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.btn-large {
    width: 100%;
    padding: 15px 30px;
    font-size: 1.3rem;
    margin-top: 10px;
}

/* Reveal Card */
.reveal-card {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.player-name-title {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 15px;
}

.instruction {
    font-size: 1.2rem;
    color: #bbb;
    margin-bottom: 25px;
}

.role-display {
    margin: 30px 0;
    padding: 30px;
    border-radius: 10px;
    width: 100%;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.role-display.hidden {
    display: none;
}

.role-normal {
    background: rgba(46, 204, 113, 0.2);
    border: 3px solid #2ecc71;
}

.role-imposter {
    background: rgba(231, 76, 60, 0.2);
    border: 3px solid #e74c3c;
}

#roleContent {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.6;
}

.secret-word {
    color: #2ecc71;
    font-size: 2.5rem;
    display: block;
    margin-top: 15px;
}

.imposter-text {
    color: #e74c3c;
    font-size: 2rem;
}

.hidden {
    display: none !important;
}

/* Game Screen */
.game-instruction {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 30px;
    color: #bbb;
    line-height: 1.8;
}

.game-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 30px 0;
}

.info-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-box .label {
    font-size: 1.1rem;
    color: #f39c12;
}

.info-box .value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #3498db;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }

    .card {
        padding: 20px;
    }

    .card h2 {
        font-size: 1.5rem;
    }

    input[type="text"] {
        min-width: 100%;
    }

    .input-group {
        flex-direction: column;
    }

    .player-name-title {
        font-size: 1.6rem;
    }

    #roleContent {
        font-size: 1.5rem;
    }

    .secret-word {
        font-size: 2rem;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 600px) {
    .game-info {
        grid-template-columns: repeat(3, 1fr);
    }
}