* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
        "Segoe UI Symbol";
}

body {
    background-color: #fcfcfc;
    color: #333;
    overflow-x: hidden;
}

#fireworks-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 50;
    /* detrás del banner (100) pero delante de la ruleta */
}

.app-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    gap: 40px;
    justify-content: center;
}

.visual-panel {
    flex: 1;
    min-width: 550px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#roulette-title {
    font-size: 3.2rem;
    color: #5d50a3;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;


}

#roulette-title::after {
    content: "✎";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    font-size: 1.5rem;
    /* Smaller than the title */
    color: #aaa;
    pointer-events: none;
    /* Let clicks pass through to title */
    transition: color 0.2s ease;
}

.editable-title {
    cursor: text;
    position: relative;
    padding-right: 35px;
    /* Spacing for the pen icon */
    outline: none;
    /* Remove default focus outline */
}

.editable-title:hover .edit-icon,
.editable-title:focus .edit-icon {
    color: #4a90e2;
    /* Highlight on hover or focus */
}

.roulette-container {
    position: relative;
    width: 600px;
    height: 600px;
}

#roulette-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #ccc;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: rotate(0deg);
    /* CSS rotation will be applied here or drawn in JS */
}

.pointer {
    position: absolute;
    top: 50%;
    right: -25px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 22px solid transparent;
    border-bottom: 22px solid transparent;
    border-right: 35px solid #ff0000;
    z-index: 10;
}

.center-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(70, 70, 70, 0.85);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 2.2rem;
    border-radius: 15px;
    cursor: pointer;
    z-index: 15;
    transition: background-color 0.2s;
    width: 80%;
    text-align: center;
}

.center-btn:hover {
    background-color: rgba(50, 50, 50, 0.95);
}

/* Control Panel */
.control-panel {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.top-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    font-weight: 500;
}

.btn-blue {
    background-color: #007bff;
    flex: 1;
}

.btn-blue:hover {
    background-color: #0056b3;
}

.btn-salmon {
    background-color: #f08080;
}

.btn-salmon:hover {
    background-color: #cd5c5c;
}

.textarea-container {
    width: 100%;
    height: 380px;
    border: 1px solid #777;
    border-radius: 0;
    background-color: white;
    padding: 5px;
}

.names-editor {
    width: 100%;
    height: 100%;
    border: none;
    overflow-y: auto;
    padding: 5px;
    font-size: 1.2rem;
    line-height: 1.4;
    outline: none;
    white-space: pre-wrap;
    word-break: break-word;
}

.names-editor[contenteditable="false"] {
    background-color: #f9f9f9;
    color: #444;
}

.hidden-item {
    color: #999;
    background-color: #e0e0e0;
    text-decoration: line-through;
    padding: 0 4px;
    border-radius: 4px;
}

.middle-actions {
    display: flex;
    justify-content: space-between;
}

.secondary-btn {
    padding: 6px 15px;
    background-color: white;
    border: 1px solid #777;
    border-radius: 2px;
    color: #333;
    cursor: pointer;
    font-size: 0.95rem;
}

.secondary-btn:hover {
    background-color: #eaeaea;
}

/* Shortcuts legend */
.shortcuts-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
    color: #333;
}

.shortcut-item {
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.key {
    background-color: white;
    border: 1px solid #999;
    border-radius: 3px;
    padding: 2px 7px;
    font-size: 0.9rem;
    color: #333;
}

.banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 40px 80px 50px 80px;
    border-radius: 12px;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    font-size: 4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: opacity 0.3s ease;
}

.winner-title {
    font-size: 1.8rem;
    color: #ffd700;
    /* Dorado para denotar victoria */
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 600;
}

.banner.hidden {
    opacity: 0;
    pointer-events: none;
}

.banner-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    /* Spacing between name and X button */
}

.remove-winner-btn {
    background: #ffcccc;
    border: none;
    color: #ff4d4d;
    font-size: 1.2rem;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
    transition: all 0.2s;
}

.remove-winner-btn:hover {
    background: #ff4d4d;
    color: white;
    transform: scale(1.05);
}

.close-banner-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #ddd;
    font-size: 1.1rem;
    cursor: pointer;
}

.close-banner-btn:hover {
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .visual-panel {
        min-width: 100%;
    }

    .roulette-container {
        width: 90vw;
        height: 90vw;
        max-width: 600px;
        max-height: 600px;
    }

    .center-btn {
        width: 70%;
        font-size: 1.5rem;
    }

    .control-panel {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }

}



/* Emoji Picker */
.emoji-picker {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 280px;
    z-index: 200;
}

.emoji-picker.hidden {
    display: none;
}

.emoji-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.emoji-list span {
    font-size: 1.8rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    user-select: none;
    transition: background-color 0.2s;
}

.emoji-list span:hover {
    background-color: #f0f0f0;
}