.linear-layout {
    display: grid;
    grid-template-columns: 260px 1fr 1fr;
    gap: 20px;
    align-items: flex-start;
}

#main-lesson-container {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: flex-start;
}

.lesson-theory {
    background: rgba(17, 24, 39, 0.92);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 12px 34px var(--shadow);
    animation: fadeUp 0.8s ease forwards;
}

.lesson-theory h2 {
    margin: 0 0 10px;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: var(--accent);
}

.lesson-theory p {
    margin: 8px 0;
    color: #d1d5db;
}

.lesson-theory strong {
    color: #ffffff;
}

/* Código dentro de teoría */
.lesson-theory pre {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    margin: 12px 0;
    overflow-x: auto;
    color: #93c5fd;
    font-family: Consolas, monospace;
}

/* === Contenido del Ejemplo === */
.lesson-example {
    background: rgba(17, 24, 39, 0.92);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 12px 34px var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    animation: fadeUp 0.8s ease forwards;
}

/* Estilos para los demos dentro de lesson-example */
.lesson-example .demo-box {
    width: 100%;
    height: 180px;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

/* Estilos para los demos en la sección de comparación */
.demo-comparison .demo-box {
    height: 120px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    margin-bottom: 10px;
}

/* === Menú lateral === */
.side-menu {
    background: rgba(17, 24, 39, 0.9);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 25px var(--shadow);
    height: fit-content;
    position: sticky;
    top: 24px;
    animation: fadeUp 0.8s ease forwards;
}

.side-menu h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--accent);
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
}

.lesson-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lesson-list li {
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 500;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.lesson-list li:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--accent);
}

.lesson-list li.active {
    background: rgba(56, 189, 248, 0.25);
    color: #dbeafe;
    border-color: var(--accent);
    font-weight: 600;
}

.hidden-lesson {
    display: none !important;
}

.lesson-content {
    display: block;
}

html {
    scroll-behavior: smooth;
}

/* === estilos - leccion === */
.concept-box {
    background: rgba(56, 189, 248, 0.1);
    border-left: 4px solid var(--accent);
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.concept-box h4 {
    margin-top: 0;
    color: var(--accent);
}

.concept-box ul {
    margin: 10px 0;
    padding-left: 20px;
}

.concept-box li {
    margin: 8px 0;
    color: var(--text);
}

.syntax-breakdown {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.syntax-breakdown h4 {
    color: var(--accent);
    margin-top: 0;
}

.explanation {
    background: rgba(129, 140, 248, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.tip-box {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.tip-box h4 {
    color: #ffc107;
    margin-top: 0;
}

.demo-container {
    text-align: center;
}

.demo-container h4 {
    color: var(--accent);
    margin: 20px 0 10px 0;
}

.demo-caption {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 5px 0 15px 0;
}

/* === estilos - estructura === */
.lesson-content {
    grid-column: 1 / -1;
}

.theory-block {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theory-block:last-of-type {
    border-bottom: none;
}

.example-block {
    background: rgba(56, 189, 248, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    border-left: 4px solid var(--accent);
}

/* Demo de comparación */
.demo-comparison {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.demo-item {
    text-align: center;
    flex: 1;
}

.demo-item p {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--muted);
}

.solid-demo {
    border: 2px dashed var(--border);
}

/* Sintaxis con demo */
.syntax-demo {
    text-align: center;
}

.code-example {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.demo-result {
    margin: 20px 0;
}

.demo-explanation {
    color: var(--muted);
    font-style: italic;
}

/* Grid de direcciones */
.direction-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 15px;
}

.direction-item {
    text-align: center;
}

.direction-item p {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--muted);
}

/* Paso a paso */
.step-by-step {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.step-number {
    background: var(--accent);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 8px 0;
    color: var(--accent);
}

.step-content p {
    margin: 0;
    color: var(--muted);
}

/* Breakdown de código */
.code-breakdown {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.breakdown-items {
    margin-top: 15px;
}

.breakdown-item {
    display: flex;
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.part-name {
    font-weight: bold;
    color: var(--accent);
    min-width: 120px;
}

.part-desc {
    color: var(--text);
}

/* Reglas y consejos */
.rules-box {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    padding: 20px;
    border-radius: 8px;
}

.rules-box h4 {
    color: #ffc107;
    margin-top: 0;
}

.rules-box ul {
    margin: 15px 0;
    padding-left: 20px;
}

.rules-box li {
    margin: 8px 0;
    color: var(--text);
}

/* === estilos - contenido === */

/* Grid de etiquetas HTML */
.tags-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.tag-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
}

.tag-item code {
    color: var(--accent);
    font-weight: bold;
}

/* Lista de propiedades */
.properties-list ul {
    columns: 2;
    margin: 15px 0;
}

.properties-list li {
    margin: 8px 0;
    font-family: monospace;
    color: var(--accent);
}

/* Panel de código real */
.real-code-example {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start;
}

.code-panel {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.code-header {
    background: #2d2d2d;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #444;
}

.code-filename {
    color: #ccc;
    font-weight: bold;
}

.code-language {
    color: var(--accent);
    font-size: 0.8rem;
}

.code-content {
    padding: 20px;
    margin: 0;
    background: #1e1e1e;
    color: #d4d4d4;
    font-size: 0.9rem;
    line-height: 1.4;
}

.code-content code {
    background: none;
    padding: 0;
}

/* Botón demo real */
.boton-profundo-demo {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: radial-gradient(circle at 30% 30%, #ffffff, #ff6b6b, #c44569);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 15px 0;
}

.boton-profundo-demo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.demo-notes {
    font-size: 0.8rem;
    color: var(--muted);
    font-style: italic;
}

/* Grid de comparación */
.comparison-grid {
    display: grid;
    flex-direction: column;
    gap: 25px;
    margin: 20px 0;
}

.comparison-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.comparison-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.comparison-header h5 {
    margin: 0;
    color: var(--accent);
    font-size: 1.1rem;
}

.comparison-badge {
    background: rgba(129, 140, 248, 0.2);
    color: var(--accent-2);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.comparison-demo {
    margin: 15px 0;
}

.comparison-demo .demo-box {
    height: 80px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.comparison-desc p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text);
}

/* === syntax hight === */

.css-comment {
    color: #6a9955;
    font-style: italic;
}

.css-selector {
    color: #d7ba7d;
}

.css-property {
    color: #9cdcfe;
}

.css-value {
    color: #ce9178;
}

.css-function {
    color: #dcdcaa;
}

.css-number {
    color: #b5cea8;
}

.css-hex {
    color: #c586c0;
}

/* Panel de código mejorado */
.code-panel {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    border: 1px solid #444;
}

.code-header {
    background: #2d2d2d;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
    font-family: var(--sans);
}

.code-filename {
    color: #cccccc;
    font-weight: 600;
    font-size: 0.9rem;
}

.code-language {
    color: var(--accent);
    font-size: 0.8rem;
    background: rgba(56, 189, 248, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.code-content {
    padding: 25px;
    margin: 0;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.code-content code {
    background: none;
    padding: 0;
    font-family: inherit;
}

/* Breakdown del código mini */
.code-breakdown-mini {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 3px solid var(--accent);
}

.code-breakdown-mini h6 {
    margin: 0 0 10px 0;
    color: var(--accent);
    font-size: 0.9rem;
}

.code-breakdown-mini ul {
    margin: 0;
    padding-left: 20px;
}

.code-breakdown-mini li {
    margin: 6px 0;
    font-size: 0.85rem;
    color: var(--text);
}

.code-highlight {
    background: rgba(56, 189, 248, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--accent);
    font-weight: 600;
}

/* === diseño - paso a paso === */

.journey-intro {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(129, 140, 248, 0.1));
    padding: 20px;
    border-radius: 12px;
    margin: 25px 0;
    border-left: 4px solid var(--accent);
}

.journey-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.journey-intro p {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
}

/* Contenedor principal de pasos */
.step-by-step-enhanced {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 30px 0;
    position: relative;
}

/* Tarjetas de paso */
.step-card {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(56, 189, 248, 0.3);
}

.step-card.final-step {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(56, 189, 248, 0.1));
    border: 2px solid rgba(56, 189, 248, 0.3);
}

/* Header de cada paso */
.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

.step-line {
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    border-radius: 1px;
}

.step-line.final {
    background: linear-gradient(to bottom, var(--accent), rgba(56, 189, 248, 0.3));
}

.step-title {
    flex: 1;
}

.step-title h4 {
    margin: 0 0 5px 0;
    color: var(--accent);
    font-size: 1.2rem;
}

.step-tag {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contenido del paso */
.step-content {
    padding: 25px;
}

.step-explanation p {
    margin: 0 0 15px 0;
    color: var(--text);
    line-height: 1.6;
}

.step-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255, 193, 7, 0.1);
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 3px solid #ffc107;
}

.tip-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-tip span {
    color: var(--text);
    font-size: 0.9rem;
}

/* Opciones de dirección */
.direction-options {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.direction-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mini-demo {
    width: 80px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.direction-option span {
    font-size: 0.8rem;
    color: var(--muted);
}

/* Formatos de color mini */
.color-formats-mini {
    margin-top: 20px;
}

.color-formats-mini h5 {
    margin: 0 0 12px 0;
    color: var(--accent);
    font-size: 0.95rem;
}

.formats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.format-option {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.format-option:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.format-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.format-option code {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}

.format-option span {
    font-size: 0.75rem;
    color: var(--muted);
    margin-left: auto;
}

/* Resultado final */
.final-result {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(129, 140, 248, 0.1));
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.final-result h5 {
    margin: 0 0 15px 0;
    color: var(--accent);
    font-size: 1.1rem;
}

.demo-box-final {
    height: 80px;
    border-radius: 10px;
    margin: 0 auto 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.success-message {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
}

/* === diseño - aplicaciones === */

.application-intro {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.1), rgba(56, 189, 248, 0.1));
    padding: 20px;
    border-radius: 12px;
    margin: 25px 0;
    border-left: 4px solid var(--accent-2);
}

.app-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.application-intro p {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
}

/* Grid principal de aplicaciones */
.application-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.app-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.app-header {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-header h4 {
    margin: 0 0 8px 0;
    color: var(--accent);
    font-size: 1.3rem;
}

.app-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Grid de etiquetas mejorado */
.tags-grid-enhanced {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tag-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(17, 24, 39, 0.8);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tag-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(56, 189, 248, 0.3);
}

.tag-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.tag-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.tag-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tag-content code {
    color: var(--accent);
    font-weight: bold;
    font-size: 0.95rem;
    font-family: 'Consolas', monospace;
}

.tag-content span {
    color: var(--muted);
    font-size: 0.85rem;
}

.tag-demo {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.tag-card:hover .tag-demo {
    transform: scale(1.1);
}

/* Grid de propiedades */
.properties-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.property-card {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.property-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.property-card.primary {
    border: 2px solid rgba(56, 189, 248, 0.3);
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(56, 189, 248, 0.1));
}

.property-card.primary::before {
    content: '⭐ RECOMENDADO';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
}

.property-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.property-header h5 {
    margin: 0;
    color: var(--accent);
    font-size: 1.1rem;
    font-family: 'Consolas', monospace;
}

.property-badge {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.property-content {
    padding: 20px;
}

.property-content p {
    margin: 0 0 15px 0;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Panel de código micro */
.code-panel.micro {
    font-size: 0.75rem;
}

.code-panel.micro .code-content {
    padding: 12px;
    font-size: 0.75rem;
}

.code-panel.micro .code-header {
    padding: 8px 12px;
    font-size: 0.7rem;
}

/* Tip de uso */
.usage-tip {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05));
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
}

.tip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.tip-header h5 {
    margin: 0;
    color: #ffc107;
    font-size: 1.1rem;
}

.tip-icon {
    font-size: 1.3rem;
}

.usage-tip p {
    margin: 0;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.usage-tip code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent);
    font-weight: 600;
}

/* === diseño- formato de color vertical === */

.formats-intro {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
    padding: 20px;
    border-radius: 12px;
    margin: 25px 0;
    border-left: 4px solid #ff6b6b;
}

.formats-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.formats-intro p {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
}

/* Lista vertical de formatos */
.color-formats-vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
}

.format-item-vertical {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.format-item-vertical:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.format-item-vertical::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
}

/* Header del formato */
.format-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.format-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 50px;
    text-align: center;
}

.format-title {
    flex: 1;
}

.format-title h4 {
    margin: 0 0 5px 0;
    color: var(--accent);
    font-size: 1.3rem;
}

.format-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
}

.format-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.format-badge.beginner {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.format-badge.popular {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.format-badge.versatile {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.format-badge.modern {
    background: rgba(156, 39, 176, 0.2);
    color: #9c27b0;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

/* Contenido del formato */
.format-content {
    padding: 25px;
}

.format-details {
    margin-top: 20px;
}

.format-details p {
    margin: 0 0 15px 0;
    color: var(--text);
    line-height: 1.6;
}

/* Demo del formato */
.format-demo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.format-demo .demo-box {
    width: 120px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.demo-label {
    color: var(--muted);
    font-size: 0.85rem;
    font-family: 'Consolas', monospace;
}

/* animaciones */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* responsiveL */
@media (max-width: 1200px) {
    .linear-layout {
        grid-template-columns: 260px 1fr;
    }

    #main-lesson-container {
        grid-column: span 1;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .lesson-example {
        min-height: 150px;
    }
}

@media (max-width: 900px) {
    .linear-layout {
        grid-template-columns: 1fr;
    }

    .side-menu {
        position: relative;
        top: 0;
        width: 100%;
    }

    #main-lesson-container {
        grid-template-columns: 1fr;
    }

    .application-grid {
        grid-template-columns: 1fr;
    }

    .real-code-example {
        grid-template-columns: 1fr;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .journey-intro {
        flex-direction: column;
        text-align: center;
    }

    .formats-grid {
        grid-template-columns: 1fr;
    }

    .direction-options {
        flex-direction: column;
        align-items: center;
    }

    .application-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .format-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .format-demo {
        flex-direction: column;
        text-align: center;
    }

    .format-demo .demo-box {
        width: 100%;
        max-width: 200px;
    }
}

/* === estilos - demos === */

/* Efectos especiales para demos radiales */
.radial-glow {
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
}

.radial-3d {
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

/* Botón circular con efecto radial */
.boton-circular-radial {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: radial-gradient(circle at 30% 30%, #ffffff, #ff6b6b, #c44569);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.boton-circular-radial:hover {
    transform: scale(1.1);
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.boton-circular-radial:active {
    transform: scale(0.95);
}

.lesson-content {
    display: none;
}

#lesson-content-1 {
    display: block;
}

.lesson-list li {
    cursor: pointer;
    transition: all 0.3s ease;
}

.lesson-list li:hover {
    background: rgba(56, 189, 248, 0.1);
}

.lesson-list li.active {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--accent);
    font-weight: 600;
}


/* === seccion 2 === */

/* Estilos para los demos en la sección de comparación */
.demo-comparison .demo-box {
    height: 120px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    margin-bottom: 10px;
}

/* Estilos para el grid de direcciones */
.direction-grid .demo-box {
    height: 100px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
}

/* Estilos para mini demos */
.mini-demo {
    height: 60px;
    border-radius: 6px;
    border: 1px solid var(--border);
    margin: 10px 0;
}

.lesson-content {
    padding: 20px;
}

.theory-block {
    margin-bottom: 30px;
}

.example-block {
    margin: 25px 0;
    padding: 20px;
    background: rgba(56, 189, 248, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--accent);
}

.practice-container .mi-gradiente {
    transition: all 0.3s ease;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.example-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: auto;
}

.example-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}

/* === estilos- practica === */

/* Panel de código mejorado para práctica */
.code-panel.practice-panel {
    background: #1e1e1e;
    border: 1px solid #444;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.code-panel.practice-panel .code-header {
    background: #2d2d2d;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
    font-family: var(--sans);
}

.code-panel.practice-panel .code-filename {
    color: #cccccc;
    font-weight: 600;
    font-size: 0.9rem;
}

.code-panel.practice-panel .code-language {
    color: var(--accent);
    font-size: 0.8rem;
    background: rgba(56, 189, 248, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Editor de CSS */
.css-editor {
    width: 100%;
    height: 300px;
    background: #1e1e1e;
    border: none;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 20px;
    resize: vertical;
    outline: none;
}

.css-editor:focus {
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.3);
}

/* Botones de acción */
.editor-actions {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hint-box {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.85rem;
}

.hint-icon {
    font-size: 1rem;
}

/* Panel de preview */
.preview-panel {
    display: flex;
    flex-direction: column;
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.preview-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.preview-header h4 {
    margin: 0 0 5px 0;
    color: var(--accent);
    font-size: 1.2rem;
}

.preview-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
}

.preview-content {
    flex: 1;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.preview-container {
    width: 100%;
    height: 100%;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.preview-container:hover {
    border-color: rgba(56, 189, 248, 0.5);
}

.mi-gradiente {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Información del preview */
.preview-info {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-label {
    color: var(--muted);
    font-size: 0.85rem;
}

.info-item code {
    color: var(--accent);
    font-weight: 600;
}

/* === estilos - ejemplos=== */

/* Grid de ejemplos */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.example-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: auto;
}

.example-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.example-card h5 {
    margin: 0 0 15px 0;
    color: var(--accent);
    font-size: 1rem;
}

/* Panel de código dentro de ejemplo */
.example-card .code-panel.enhanced {
    margin-bottom: 15px;
    flex: 1;
}

.example-card .code-panel.enhanced .code-content {
    padding: 15px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.example-card .code-panel.enhanced .code-content code {
    font-size: 0.8rem;
}

/* Botón de ejemplo */
.example-btn {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid var(--accent);
    color: var(--text);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    width: 100%;
}

.example-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}

/* === botones === */

.btn-play,
.btn-reset {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid var(--accent);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-reset.secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-play:hover,
.btn-reset:hover {
    background: rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}

.btn-reset.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* === responsive === */

@media (max-width: 1100px) {
    .practice-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .editor-actions {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .preview-info {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .css-editor {
        height: 250px;
        font-size: 0.9rem;
    }

    .example-card {
        padding: 15px;
    }

    .example-card h5 {
        font-size: 0.9rem;
    }

    .example-card .code-panel.enhanced .code-content {
        padding: 12px;
        font-size: 0.8rem;
    }

    .example-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}


/* === layout para practica === */
.practice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
    margin: 25px 0;
}

/* Panel del editor */
.editor-panel {
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Panel del preview */
.preview-panel {
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    height: fit-content;
}

/* Header del editor */
.editor-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.editor-header h4 {
    margin: 0 0 5px 0;
    color: var(--accent);
    font-size: 1.2rem;
}

.editor-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Contenido del editor */
.editor-content {
    padding: 0;
}

/* Editor de CSS */
.css-editor {
    width: 100%;
    height: 400px;
    background: #1e1e1e;
    border: none;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    padding: 25px;
    resize: none;
    outline: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.css-editor:focus {
    background: #1e1e1e;
}

/* Acciones del editor */
.editor-actions {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* Botones mejorados */
.btn-play,
.btn-reset {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
}

.btn-play {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

.btn-reset {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text);
}

.btn-reset:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

/* Hint box */
.hint-box {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
}

.hint-icon {
    font-size: 1.1rem;
}

/* Header del preview */
.preview-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.preview-header h4 {
    margin: 0 0 5px 0;
    color: var(--accent);
    font-size: 1.2rem;
}

.preview-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Contenido del preview */
.preview-content {
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: rgba(0, 0, 0, 0.2);
}

.preview-container {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: 3px dashed rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.preview-container:hover {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

/* Elemento de gradiente */
.mi-gradiente {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: radial-gradient(circle, #667eea, #764ba2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Información del preview */
.preview-info {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.info-value {
    color: var(--accent);
    font-weight: 600;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
}

/* Ejemplos */
.examples-section {
    margin-top: 40px;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.example-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.example-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.example-card h5 {
    margin: 0 0 15px 0;
    color: var(--accent);
    font-size: 1rem;
}

.example-preview {
    height: 80px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.example-code {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-family: 'Consolas', monospace;
    font-size: 0.8rem;
    color: #93c5fd;
}

.example-btn {
    width: 100%;
    padding: 10px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid var(--accent);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.example-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 968px) {
    .practice-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .css-editor {
        height: 300px;
    }

    .preview-content {
        min-height: 300px;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .editor-actions {
        flex-direction: column;
    }

    .preview-info {
        grid-template-columns: 1fr;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }
}