.wc_prereg_overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.wc_prereg_modal {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    background: #1a1a1a;
    background-size: cover;
    background-position: center;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 30px;
    color: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

/* Overlay escuro com gradiente sobre a imagem de fundo para garantir
   contraste do texto independente da imagem que o admin enviar. */
.wc_prereg_modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.78) 60%, rgba(0, 0, 0, 0.85) 100%);
    border-radius: 6px;
    pointer-events: none;
    z-index: 0;
}

.wc_prereg_modal > * {
    position: relative;
    z-index: 1;
}

.wc_prereg_close {
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;
    font-size: 1.6em;
    color: #fff;
    opacity: 0.8;
    z-index: 2;
}

.wc_prereg_close:hover {
    opacity: 1;
}

.wc_prereg_header {
    text-align: center;
    padding-bottom: 20px;
}

.wc_prereg_server_img {
    max-width: 220px;
    display: block;
    margin: auto;
}

.wc_prereg_title {
    font-size: 2em;
    margin-top: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 4px rgba(0, 0, 0, 0.8);
}

.wc_prereg_launch {
    font-size: 1.1em;
    margin-top: 8px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.9);
}

.wc_prereg_subtitle {
    font-size: 1em;
    opacity: 0.95;
    margin-top: 4px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.9);
}

.wc_prereg_body {
    padding: 20px 0;
}

.wc_prereg_items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
}

.wc_prereg_item {
    background: rgba(0, 0, 0, 0.55);
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wc_prereg_item_img img {
    max-width: 60px;
    max-height: 60px;
}

.wc_prereg_item_qty {
    font-weight: bold;
    color: #ffcc00;
    margin-top: 4px;
}

.wc_prereg_item_name {
    font-size: 0.85em;
    margin-top: 4px;
    min-height: 2.4em;
}

.wc_prereg_item_meta {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.75em;
}

.wc_prereg_item_duration {
    opacity: 0.85;
}

.wc_prereg_item_bind.limited {
    color: #ff9966;
}

.wc_prereg_item_bind.unlimited {
    color: #66ff99;
}

.wc_prereg_footer {
    text-align: center;
    padding-top: 16px;
}

.wc_prereg_cta {
    display: inline-block;
    background: linear-gradient(180deg, #ffd84d, #ffa500);
    color: #222;
    padding: 14px 50px;
    border-radius: 6px;
    font-size: 1.4em;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 4px 0 #c08000, 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s;
}

.wc_prereg_cta:hover {
    transform: translateY(-2px);
}

/* Auth prompt: aparece no lugar do CTA quando usuario anonimo clica Jogar Agora */
.wc_prereg_auth_text {
    margin: 0 0 14px 0;
    font-size: 1.05em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.wc_prereg_auth_btns {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.wc_prereg_auth_btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 6px;
    font-size: 1.15em;
    font-weight: bold;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: transform 0.15s;
    font-family: inherit;
}

.wc_prereg_auth_btn:hover {
    transform: translateY(-2px);
}

.wc_prereg_auth_login {
    background: linear-gradient(180deg, #ffd84d, #ffa500);
    color: #222;
    box-shadow: 0 4px 0 #c08000, 0 8px 20px rgba(0, 0, 0, 0.4);
}

.wc_prereg_auth_register {
    background: linear-gradient(180deg, #66e58a, #1ea54a);
    color: #fff;
    box-shadow: 0 4px 0 #126b30, 0 8px 20px rgba(0, 0, 0, 0.4);
}

@media (max-width: 480px) {
    .wc_prereg_auth_btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 1em;
    }
}

/* === Card de criar personagem === */
.wc_create_char_card {
    background: linear-gradient(170deg, rgba(20, 30, 60, 0.7), rgba(15, 20, 45, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 32px 28px;
    color: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    max-width: 640px;
    margin: 24px auto 0;
}

.wc_create_char_header {
    text-align: center;
    margin-bottom: 26px;
}

.wc_create_char_icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(30, 144, 255, 0.2), rgba(124, 77, 255, 0.2));
    border: 1px solid rgba(30, 144, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.wc_create_char_title {
    margin: 0 0 6px 0 !important;
    font-size: 1.8em !important;
    font-weight: 900 !important;
    color: #fff !important;
    letter-spacing: -0.01em;
}

.wc_create_char_subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95em;
}

.wc_create_char_form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wc_create_field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wc_create_label {
    font-size: 0.8em;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.55) !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
}

.wc_create_input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    color: #fff !important;
    font-size: 1em;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.wc_create_input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.wc_create_input:focus {
    outline: none;
    border-color: rgba(30, 144, 255, 0.6) !important;
    background: rgba(30, 144, 255, 0.06) !important;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.12);
}

/* Custom dropdown (servidor) */
.wc_create_select_wrap {
    position: relative;
}

.wc_create_custom_select {
    cursor: pointer;
    width: 100%;
    padding: 14px 44px 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 1em;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, color 0.15s;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    -webkit-user-select: none;
}

.wc_create_custom_select:hover {
    border-color: rgba(30, 144, 255, 0.35);
    background: rgba(30, 144, 255, 0.04);
}

.wc_create_custom_select:focus,
.wc_create_custom_select.open {
    outline: none;
    border-color: rgba(30, 144, 255, 0.6);
    background: rgba(30, 144, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.12);
}

.wc_create_custom_select.has-value {
    color: #fff;
}

.wc_create_custom_select_value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wc_create_custom_select_arrow {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1em;
    line-height: 1;
    margin-left: 12px;
    transition: transform 0.2s;
}

.wc_create_custom_select.open .wc_create_custom_select_arrow {
    transform: rotate(180deg);
}

.wc_create_custom_select_options {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #1a1f3a, #0f1428);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
}

.wc_create_custom_select_options.open {
    display: block;
    animation: wc_create_select_in 0.15s ease-out;
}

@keyframes wc_create_select_in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.wc_create_custom_select_option {
    padding: 12px 14px;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.95em;
    transition: background 0.1s, color 0.1s;
}

.wc_create_custom_select_option:hover {
    background: rgba(30, 144, 255, 0.18);
    color: #fff;
}

.wc_create_custom_select_option.selected {
    background: linear-gradient(135deg, rgba(30, 144, 255, 0.22), rgba(124, 77, 255, 0.22));
    color: #fff;
    font-weight: 700;
}

/* Scrollbar dark do dropdown */
.wc_create_custom_select_options::-webkit-scrollbar {
    width: 8px;
}

.wc_create_custom_select_options::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.wc_create_custom_select_options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.wc_create_custom_select_options::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.wc_create_hint {
    font-size: 0.78em;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
}

/* Mensagem de erro inline (escondida por padrao, exibida via .has-error) */
.wc_create_error {
    display: none;
    font-size: 0.82em;
    color: #ff6b6b;
    margin-top: 4px;
    font-weight: 600;
    animation: wc_create_error_in 0.2s ease-out;
}

.wc_create_field.has-error .wc_create_error {
    display: block;
}

@keyframes wc_create_error_in {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Borda vermelha nos cards de genero quando ha erro */
.wc_create_field.has-error .wc_create_gender_card {
    border-color: rgba(255, 107, 107, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.08);
}

/* Borda vermelha no custom select quando ha erro */
.wc_create_field.has-error .wc_create_custom_select {
    border-color: rgba(255, 107, 107, 0.7);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12);
    background: rgba(255, 107, 107, 0.05);
}

/* Inputs comuns com erro (reutilizavel) */
.wc_create_field.has-error .wc_create_input {
    border-color: rgba(255, 107, 107, 0.7) !important;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12) !important;
    background: rgba(255, 107, 107, 0.05) !important;
}

/* Cards de selecao de genero */
.wc_create_gender_grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.wc_create_gender_card {
    cursor: pointer;
    padding: 18px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
}

.wc_create_gender_card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(30, 144, 255, 0.35);
    transform: translateY(-1px);
}

.wc_create_gender_card.selected {
    background: linear-gradient(135deg, rgba(30, 144, 255, 0.18), rgba(124, 77, 255, 0.18));
    border-color: var(--st-blue, #1E90FF);
    box-shadow: 0 4px 14px rgba(30, 144, 255, 0.2);
}

.wc_create_gender_emoji {
    font-size: 30px;
    line-height: 1;
}

.wc_create_gender_label {
    font-size: 0.95em;
    font-weight: 800;
    color: #fff;
}

.wc_create_actions {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.wc_create_btn {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 16px 24px;
    font-size: 1em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(135deg, #1E90FF, #4AA8FF);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(30, 144, 255, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.wc_create_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(30, 144, 255, 0.45);
}

.wc_create_btn_icon {
    font-size: 1.2em;
}

.wc_create_loading {
    width: 24px;
    height: 24px;
}

@media (max-width: 600px) {
    .wc_create_char_card {
        padding: 22px 18px;
        margin: 12px auto 0;
    }

    .wc_create_char_title {
        font-size: 1.45em !important;
    }

    .wc_create_btn {
        padding: 14px 18px;
        font-size: 0.95em;
    }
}

/* Banner compacto de pre-registro na pagina de criacao de personagem */
.wc_prereg_create_banner {
    background: linear-gradient(135deg, rgba(15, 25, 50, 0.96), rgba(40, 20, 60, 0.96));
    border: 1px solid rgba(30, 144, 255, 0.6);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 18px 0 0 0;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.wc_prereg_create_banner_header {
    font-size: 1.05em;
    font-weight: 800;
    margin-bottom: 6px;
    color: #ffd84d;
}

.wc_prereg_create_banner p {
    margin: 0 0 10px 0;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.85);
}

.wc_prereg_create_banner small {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.75em;
}

/* Compacta o grid de itens dentro do banner */
.wc_prereg_create_banner .wc_prereg_items {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 6px;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
}

.wc_prereg_create_banner .wc_prereg_item {
    padding: 6px 4px;
}

.wc_prereg_create_banner .wc_prereg_item_img img {
    max-width: 38px;
    max-height: 38px;
}

.wc_prereg_create_banner .wc_prereg_item_qty {
    font-size: 0.9em;
    margin-top: 2px;
}

.wc_prereg_create_banner .wc_prereg_item_name {
    font-size: 0.7em;
    margin-top: 2px;
    min-height: 2em;
    line-height: 1.15;
}

.wc_prereg_create_banner .wc_prereg_item_meta {
    margin-top: 4px;
    font-size: 0.65em;
}

@media (max-width: 768px) {
    .wc_prereg_modal {
        padding: 20px;
    }

    .wc_prereg_title {
        font-size: 1.4em;
    }

    .wc_prereg_items {
        grid-template-columns: repeat(2, 1fr);
    }

    .wc_prereg_cta {
        padding: 12px 30px;
        font-size: 1.1em;
    }
}
