/* Reset básico */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f7f9fc;
    color: #333;
    line-height: 1.6;
}

/* HEADER */
header {
    width: 100%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

header .subtitle {
    font-size: 1.2rem;
    color: #dce6f7;
}

/* TEXTOS */
.description, .instruction {
    font-size: 1.1rem;
    text-align: center;
    max-width: 800px;
    margin: 20px auto;
    color: #555;
}

/* CONTENEDORES */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 15px;
    gap: 25px;
}

#entities-container {
    width: 100%;
    max-width: 700px;
}

/* BOTONES */
.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    max-width: 700px;
}

.btn {
    padding: 12px 18px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.btn:hover {
    background: linear-gradient(135deg, #0056b3, #003f8a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.btn-red {
    background: linear-gradient(135deg, #dc3545, #a71d2a);
}

.btn-red:hover {
    background: linear-gradient(135deg, #a71d2a, #7a1420);
}

.btn-clear {
    background: #ffc107;
    color: #222;
}

.btn-clear:hover {
    background: #e0a800;
}

/* ENTIDADES */
.entity {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.entity:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

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

.entity-header input {
    font-size: 1.2rem;
    padding: 10px;
    width: 70%;
    border: 2px solid #007bff;
    border-radius: 6px;
    background: #f8f9fa;
    transition: all 0.3s;
}

.entity-header input:focus {
    border-color: #0056b3;
    background: #fff;
}

/* INPUTS y SELECTS */
input, select, textarea {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin: 10px 0;
    width: 100%;
    font-size: 1rem;
    background: #fdfdfd;
    transition: border 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: #007bff;
    outline: none;
    background: #fff;
}

/* RELACIONES */
.relation-container {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    max-width: 700px;
    width: 100%;
}

/* OUTPUT */
.output-container {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sql-output-container, .documentation-output-container {
    background: #1e1e2f;
    border-radius: 10px;
    padding: 20px;
    color: #f8f8f2;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

#sql-output, #documentation-output {
    width: 100%;
    height: 180px;
    background: transparent;
    border: none;
    color: #f8f8f2;
    resize: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .entity-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .button-container {
        flex-direction: column;
    }
}
