body {
    background: #121212;
    color: #e0e0e0;
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px;
    margin: 0;
}

h1 {
    margin-bottom: 5px;
    color: #fff;
}

p {
    color: #888;
    margin-bottom: 40px;
}

.main-wrapper {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
    max-width: 1500px;
    width: 100%;
    flex-wrap: wrap;
}

.container {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #333;
    width: 450px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}

.row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

select,
input[type="text"] {
    flex-grow: 1;
    padding: 10px;
    border-radius: 4px;
    background: #2d2d2d;
    color: white;
    border: 1px solid #444;
    box-sizing: border-box;
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    font-size: 0.85em;
    background: #252525;
    padding: 10px;
    border-radius: 6px;
    flex-wrap: wrap;
}

label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.btn-main {
    background: #388e3c;
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
    text-decoration: none;
    display: block;
    text-align: center;
    box-sizing: border-box;
}

.btn-main:hover {
    background: #45a049;
}

.btn-creator {
    background: #1976d2;
}

.btn-creator:hover {
    background: #2196f3;
}

.btn-prompt {
    background: #7b1fa2;
}

.btn-prompt:hover {
    background: #8e24aa;
}

.btn-session {
    background: #c9a227;
    color: #1a1a1a;
}

.btn-session:hover {
    background: #e0b932;
}

h3 {
    margin-top: 0;
    color: #4caf50;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.blue-title {
    color: #2196f3;
}

.purple-title {
    color: #d18cff;
}

.yellow-title {
    color: #f4c542;
}

.helper-text {
    font-size: 0.9em;
    margin-bottom: 15px;
    color: #aaa;
    line-height: 1.5;
}

.panel-import {
    margin-top: 10px;
    border-top: 1px solid #333;
    padding-top: 15px;
    margin-bottom: 10px;
}

#importModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(5px);
}

/* =========================================================
   LISTAS DA HOME
   ========================================================= */

.masmorra-lista,
.lista-cards-home {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.masmorra-item,
.modelo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #252525;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: 0.2s ease;
}

.masmorra-item:hover {
    border-color: #2196f3;
    background: #2c2c2c;
}

.modelo-item:hover {
    border-color: #4caf50;
    background: #2c2c2c;
}

.masmorra-item.selected {
    border-color: #00e5ff;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
    background: #1f2d38;
}

.modelo-item.selected {
    border-color: #66ff99;
    box-shadow: 0 0 12px rgba(102, 255, 153, 0.20);
    background: #1f3327;
}
.masmorra-thumb {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 6px;
    background: #111;
    border: 1px solid #444;
    object-fit: cover;
}

.masmorra-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 11px;
    text-align: center;
    padding: 4px;
}

.masmorra-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.masmorra-nome {
    font-weight: 600;
    color: #fff;
    word-break: break-word;
}

.masmorra-subinfo {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}

/* =========================================================
   MODAL DE NOVA SESSÃO
   ========================================================= */

.hidden {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}

.modal-content {
    width: min(900px, 96vw);
    max-height: 90vh;
    overflow-y: auto;
    background: #181818;
    border: 1px solid #343434;
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
    padding: 24px;
    box-sizing: border-box;
}

.campo-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.campo-form label {
    color: #d7d7d7;
    font-weight: 600;
    font-size: 0.95rem;
}

.campo-form input {
    background: #232323;
    color: #efefef;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 0.95rem;
    outline: none;
}

.campo-form input:focus {
    border-color: #4f8cff;
    box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.18);
}

.acoes-modal {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.acoes-modal button {
    min-width: 140px;
    border: none;
    border-radius: 10px;
    padding: 11px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}

/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 1500px) {
    .container {
        width: min(100%, 500px);
    }
}

@media (max-width: 700px) {
    .acoes-modal {
        flex-direction: column;
    }

    .acoes-modal button {
        width: 100%;
    }

    .masmorra-thumb {
        width: 56px;
        height: 56px;
        min-width: 56px;
    }
}
.hidden {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}

.modal-box {
    width: 100%;
    background: #1b1b1b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    color: #f2f2f2;
    overflow: hidden;
}

.modal-box--medio {
    max-width: 520px;
}

.modal-header,
.modal-footer {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-footer {
    border-bottom: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    color: #fff;
}

.modal-close {
    border: 0;
    background: transparent;
    color: #ddd;
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #ddd;
}

.form-input {
    width: 100%;
    box-sizing: border-box;
    background: #101010;
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #f0f0f0;
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: rgba(255, 210, 80, 0.85);
    box-shadow: 0 0 0 2px rgba(255, 210, 80, 0.18);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e8e8e8;
    font-size: 14px;
    cursor: pointer;
}

.form-help {
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
}

.form-status {
    min-height: 18px;
    font-size: 13px;
    color: #ffb3b3;
}

.btn-primario,
.btn-secundario {
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.btn-primario {
    background: #c89f2b;
    color: #111;
}

.btn-secundario {
    background: #2b2b2b;
    color: #eee;
}

.upload-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.upload-overlay__content {
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 24px 28px;
    min-width: 280px;
    text-align: center;
    color: #f4f4f4;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}

.upload-overlay__spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 14px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.12);
    border-top-color: #d6aa2b;
    animation: spinOverlay 1s linear infinite;
}

.upload-overlay__texto {
    font-size: 16px;
    font-weight: 600;
}

@keyframes spinOverlay {
    to {
        transform: rotate(360deg);
    }
}