:root {
    --bg: #f0f2f5;
    --card: #ffffff;
    --primary: #4CAF50;
    --primary-dark: #3e9c43;
    --primary-active: #144917;
    --border: #ddd;
    --text: #333;
    --muted: #666;
    --radius: 12px;
}

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

body {
    font-family: "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    margin: 0;
    padding: 20px;
    color: var(--text);
}

/* Contenedor principal */
.container {
    max-width: 900px;
    margin: auto;
    background: var(--card);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Títulos */
h1 {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
}

section {
    margin-bottom: 40px;
}

h2 {
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--muted);
}

/* Labels */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

/* Inputs, Select, Textarea */
input[type="text"],
input[type="color"],
input[type="range"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
    color: var(--text);
}

textarea {
    min-height: 140px;
    resize: vertical;
}

/* Focus elegante */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

/* Botones */
button {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.05s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

button:hover {
    background: var(--primary-dark);
}

button:active {
    background: var(--primary-active);
    transform: scale(0.98);
}

/* Botón secundario */
button.ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
}

button.ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Texto auxiliar */
small {
    display: block;
    margin-top: -10px;
    margin-bottom: 15px;
    color: var(--muted);
    font-size: 13px;
}

/* Preview / bloques */
.preview {
    text-align: center;
    background: var(--card);
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 20px;
    }

    button {
        width: 100%;
        margin-right: 0;
    }
}
