
body {
    background-color: #121212;
    color: #FFFFFF;
    font-family: 'Noto Sans KR', 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    width: 90%;
    max-width: 800px;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #BB86FC;
    margin-bottom: 20px;
}

h1 {
    margin: 0;
    font-size: 2.2em;
    color: #BB86FC;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

#language-switcher {
    display: flex;
    gap: 8px;
    background-color: #252525;
    padding: 5px;
    border-radius: 8px;
}

.lang-btn {
    padding: 6px 12px;
    border: none;
    background-color: transparent;
    color: #FFFFFF;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.lang-btn.active {
    background-color: #BB86FC;
    color: #121212;
}

.lang-btn:not(.active):hover {
    background-color: #3a3a3a;
}

main {
    width: 90%;
    max-width: 800px;
}

#streamer-controls {
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.control-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

#call-next, #lucky-draw, #set-max-size {
    padding: 16px 28px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 1.3em;
}

#call-next:hover, #lucky-draw:hover, #set-max-size:hover, #reset-queue:hover {
    transform: translateY(-3px);
}

#call-next {
    background-color: #03DAC6;
    color: #121212;
}

#lucky-draw {
    background-color: #BB86FC;
    color: #121212;
}

#set-max-size {
    background-color: #CF6679;
    color: #121212;
}

#reset-queue {
    padding: 12px 20px;
    font-size: 1em;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#call-next:hover {
    background-color: #02b3a0;
}

#lucky-draw:hover {
    background-color: #a063f0;
}

#set-max-size:hover {
    background-color: #b85468;
}

#reset-queue:hover {
    background-color: #d32f2f;
}

#max-size-input {
    width: 120px;
    padding: 16px;
    border: 1px solid #BB86FC;
    border-radius: 8px;
    background-color: #252525;
    color: #FFFFFF;
    text-align: center;
    font-size: 1.3em;
    box-sizing: border-box;
}

#called-person-display {
    margin-top: 15px;
    font-size: 3em;
    color: #03DAC6;
    font-weight: bold;
    min-height: 65px;
}

#queue-container, #join-form-container {
    background-color: #1E1E1E;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#my-position {
    font-size: 1.2em;
    font-weight: bold;
    color: #BB86FC;
    text-align: center;
    margin-bottom: 10px;
}

h2 {
    border-bottom: 2px solid #BB86FC;
    padding-bottom: 10px;
    margin-top: 0;
}

#queue-list {
    list-style: none;
    padding: 0;
}

#join-form {
    display: flex;
    gap: 10px;
}

#name-input {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #BB86FC;
    border-radius: 6px;
    background-color: #252525;
    color: #FFFFFF;
    font-size: 1.1em;
}

button[type="submit"] {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    background-color: #BB86FC;
    color: #121212;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1.1em;
}

button[type="submit"]:hover {
    background-color: #a063f0;
}

.my-turn {
    background-color: #03DAC6 !important;
    color: #121212;
}

/* Widget Mode Styles */
body.widget-mode {
    background-color: transparent;
}

.widget-mode header,
.widget-mode #streamer-controls,
.widget-mode #join-form-container {
    display: none;
}

.widget-mode #queue-container {
    background-color: transparent;
    box-shadow: none;
    border: none;
}

.widget-mode h2 {
    font-size: 2em;
    text-align: center;
}

.widget-mode #queue-list {
    font-size: 1.5em;
}

@media (max-width: 700px) {
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

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

    #join-form {
        flex-direction: column;
    }

    button[type="submit"], #set-max-size, #max-size-input, #reset-queue {
        width: 100%;
        box-sizing: border-box;
    }
}
