* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    background-color: #0f172a;
    color: #f8fafc;
    display: flex;
    justify-content: center;
    padding: 20px;
}

/* Container no estilo Carta de TCG */
.card-container {
    width: 100%;
    max-width: 580px;
    background: #1e293b;
    border: 3px solid #38bdf8;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* Cabeçalho */
.card-header {
    border-bottom: 2px solid #334155;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.header-main {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

/* Layout ajustado para acomodar o Cargo / Nível */
.header-sub {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.input-name {
    flex: 2;
    font-weight: bold;
    font-size: 1.1em;
    border-color: #38bdf8;
}

.input-guild {
    flex: 1;
}

.select-cargo {
    font-weight: bold;
    color: #38bdf8;
    border-color: #38bdf8;
}

.input-class, .input-alignment, .select-cargo {
    font-size: 0.85em;
}

/* Seções da Carta */
.card-section {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}

.card-section h2 {
    font-size: 1.05em;
    color: #38bdf8;
    margin-bottom: 10px;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 4px;
}

/* Grid de Atributos */
.attributes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.attribute-item {
    display: flex;
    flex-direction: column;
}

.attribute-item.full-width {
    grid-column: span 2;
}

.attribute-item label {
    font-size: 0.8em;
    color: #94a3b8;
    margin-bottom: 3px;
}

.attribute-item input {
    text-align: center;
    font-weight: bold;
}

/* Magias */
.spell-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-spell-title {
    font-weight: bold;
    border-left: 3px solid #38bdf8;
}

.spell-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 0.85em;
}

.spell-stats label, .spell-effect label, .curse-debuff label, .curse-degree label {
    display: block;
    font-size: 0.8em;
    color: #94a3b8;
    margin-bottom: 2px;
}

/* Maldições */
.curse-section {
    border-color: #ef4444;
}

.curse-section h2 {
    color: #f87171;
}

.curse-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-curse-title {
    font-weight: bold;
    border-left: 3px solid #ef4444;
}

/* Entradas Globais (Inputs, Selects, Textareas) */
input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 8px;
    background: #1e293b;
    border: 1px solid #475569;
    color: #f8fafc;
    border-radius: 4px;
    font-size: 0.9em;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #38bdf8;
}

textarea {
    resize: vertical;
}

/* Responsividade */
@media (max-width: 520px) {
    .header-main, .spell-stats, .attributes-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    .header-sub {
        grid-template-columns: 1fr;
    }
    .attribute-item.full-width {
        grid-column: span 1;
    }
}