* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
    text-align: center;
}

header h1 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 2.5em;
}

header p {
    color: #666;
    font-size: 1.1em;
}

nav {
    background: white;
    padding: 15px 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

nav a {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
    font-weight: 600;
    cursor: pointer;
}

nav a:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: none;
}

section.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 2em;
    color: #667eea;
    margin-bottom: 20px;
    border-bottom: 3px solid #764ba2;
    padding-bottom: 10px;
}

.concept {
    background: #f0f4ff;
    padding: 20px;
    border-left: 5px solid #667eea;
    margin: 15px 0;
    border-radius: 5px;
}

.concept h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.example {
    background: #2d3748;
    color: #a0aec0;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
}

.example code {
    color: #81e6d9;
}

.tabla {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.tabla th,
.tabla td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.tabla th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.tabla tr:hover {
    background: #f5f5f5;
}

.ejercicios {
    margin-top: 30px;
}

.ejercicio {
    background: #fff5e6;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid #f39c12;
    border-radius: 5px;
}

.ejercicio h4 {
    color: #e67e22;
    margin-bottom: 8px;
}

.respuesta {
    background: #e8f5e9;
    padding: 10px;
    margin-top: 10px;
    border-left: 3px solid #4caf50;
    border-radius: 3px;
    display: none;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.respuesta.visible {
    display: block;
}

.btn-respuesta {
    background: #4caf50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 8px;
}

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

.caracteristica {
    display: flex;
    align-items: center;
    margin: 10px 0;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
}

.caracteristica .icon {
    font-size: 1.5em;
    margin-right: 10px;
    min-width: 30px;
}

.bueno {
    border-left: 4px solid #4caf50;
}

.malo {
    border-left: 4px solid #f44336;
}

.resalta {
    background: #fff9c4;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 600;
}

footer {
    background: white;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    margin-top: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    margin: 5px 5px 5px 0;
}

.intro-text {
    font-size: 1.1em;
    line-height: 1.8;
    color: #555;
    margin: 20px 0;
}

.ejemplo-real {
    background: #f0f4ff;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid #667eea;
}

.ejemplo-real h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.ejemplo-real ul {
    list-style-position: inside;
    line-height: 1.8;
}
