body {
    font-family: 'Poppins', sans-serif;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
}

.message-box {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
    width: 90%;
    max-width: 400px;
}

button.inactive {
    opacity: 0.5;
    cursor: not-allowed;
}


h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

p {
    font-size: 1rem;
    margin-bottom: 2rem;
}

.highlight {
    color: red;
    font-weight: 600;
}

.duel-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.duel-buttons button {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: #007bff;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s, transform 0.2s;
}

.duel-buttons button:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.duel-buttons button i {
    font-size: 1.2rem;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.category-btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #1e88e5;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.category-btn:hover {
    background: #1565c0;
}

.close-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    margin-top: 15px;

#friendDuelContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

#friendDuelContainer.active {
    display: flex;
}

#friendDuelContainer .modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px 25px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
    position: relative;
}

#friendDuelContainer h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

#friendDuelContainer #friendOptions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

#friendDuelContainer #friendOptions button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #007bff;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

#friendDuelContainer #friendOptions button:hover {
    background: #0056b3;
}

#friendDuelContainer #duelCodeSection,
#friendDuelContainer #friendCategorySection {
    margin-top: 15px;
}

#friendDuelContainer #duelCodeText {
    font-weight: 600;
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
    word-break: break-word;
}

#friendDuelContainer #joinDuelInput {
    padding: 8px 12px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    width: 80%;
    margin-bottom: 10px;
}

#friendDuelContainer #joinDuelConfirmBtn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background: #28a745;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

#friendDuelContainer #joinDuelConfirmBtn:hover {
    background: #218838;
}

#friendDuelContainer .categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

#friendDuelContainer .friend-category-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background: #17a2b8;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

#friendDuelContainer .friend-category-btn:hover {
    background: #117a8b;
}

#friendDuelContainer .close-btn {
    background: transparent;
    border: none;
    color: #555;
    cursor: pointer;
    margin-top: 15px;
    font-size: 1rem;
}

#friendDuelContainer .status-text {
    margin-top: 10px;
    font-weight: 600;
    color: #333;
}

#friendDuelContainer .close-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    margin-top: 15px;
}

#friendDuelContainer .close-btn:hover {
    background: #b02a37;
}

#friendDuelContainer .spinner {
    margin: 15px auto 0;
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


