* {
    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, #f5f7fa 0%, #e9edf2 100%);
}

header {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb4d);
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
    color: white;
    text-align: center;
    padding: 3rem 1rem;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #1a2a6c;
    border-left: 5px solid #fdbb4d;
    padding-left: 1rem;
}

/* Estilos para las partes del HTML */
.html-parts {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 2rem;
}

.parts-intro {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #555;
}

.part-detail {
    background: white;
    border-radius: 15px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.part-detail:hover {
    transform: translateX(5px);
}

.part-header {
    background: linear-gradient(135deg, #1a2a6c, #2a3a7c);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.part-badge {
    background: #fdbb4d;
    color: #1a2a6c;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.part-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.part-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
}

@media (max-width: 768px) {
    .part-content {
        grid-template-columns: 1fr;
    }
}

.part-explanation p, .part-explanation ul {
    margin-bottom: 0.8rem;
}

.part-explanation ul {
    padding-left: 1.5rem;
}

.part-explanation li {
    margin-bottom: 0.3rem;
}

/* Bloques de código */
.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
}

.code-tag {
    color: #569CD6;
}

.code-comment {
    color: #6A9955;
}

.code-indent {
    padding-left: 20px;
    display: block;
}

.code-double-indent {
    padding-left: 40px;
    display: block;
}

.small-icon {
    width: 50px;
    margin-top: 1rem;
}

.diagram-caption {
    font-size: 0.8rem;
    text-align: center;
    margin-top: 0.5rem;
    color: #666;
}

.visual-example {
    background: #e9ecef;
    padding: 0.8rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
}

.title-example {
    background: #1a2a6c;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-weight: bold;
}

.attribute-breakdown {
    background: #e9ecef;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.attr-name {
    color: #b21f1f;
    font-weight: bold;
    font-family: monospace;
}

.attr-value {
    color: #2e7d32;
    font-family: monospace;
}

.comment-example {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.structure-summary {
    margin-top: 2rem;
    background: #1a2a6c;
    border-radius: 15px;
    padding: 1.5rem;
}

.structure-summary h3 {
    color: white;
    margin-bottom: 1rem;
    text-align: center;
}

.full-structure .code-block {
    background: #0d1117;
}

/* Timeline */
.timeline-container {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    background: white;
    margin: 20px 0;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-left: 5px solid;
}

.timeline-year {
    font-weight: bold;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Creators */
.creators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.creator-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.creator-card:hover {
    transform: translateY(-5px);
}

.creator-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fdbb4d;
    margin-bottom: 1rem;
}

.creator-card h3 {
    color: #1a2a6c;
    margin-bottom: 0.5rem;
}

/* Context grid */
.context-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.context-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.context-card h3 {
    color: #b21f1f;
    margin-bottom: 0.8rem;
}

/* Fact box */
.fact-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

#factText {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    min-height: 80px;
}

button {
    background: #fdbb4d;
    color: #1a2a6c;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #ffaa22;
    transform: scale(1.05);
}

footer {
    background: #1a2a6c;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
}

.card {
    background: white;
    padding: 1.8rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.highlight {
    background: #fdbb4d;
    padding: 0.2rem 0.4rem;
    border-radius: 5px;
    font-weight: bold;
}