/*

██████╗ ██╗      █████╗  ██████╗██╗  ██╗ ██████╗██╗  ██╗ ██████╗ ██████╗ ██╗███╗   ███╗ █████╗          ██████╗ ██████╗ ███╗   ███╗
██╔══██╗██║     ██╔══██╗██╔════╝██║ ██╔╝██╔════╝██║  ██║██╔═══██╗██╔══██╗██║████╗ ████║██╔══██╗        ██╔════╝██╔═══██╗████╗ ████║
██████╔╝██║     ███████║██║     █████╔╝ ██║     ███████║██║   ██║██████╔╝██║██╔████╔██║███████║        ██║     ██║   ██║██╔████╔██║
██╔══██╗██║     ██╔══██║██║     ██╔═██╗ ██║     ██╔══██║██║   ██║██╔══██╗██║██║╚██╔╝██║██╔══██║        ██║     ██║   ██║██║╚██╔╝██║
██████╔╝███████╗██║  ██║╚██████╗██║  ██╗╚██████╗██║  ██║╚██████╔╝██║  ██║██║██║ ╚═╝ ██║██║  ██║ █████╗ ╚██████╗╚██████╔╝██║ ╚═╝ ██║
╚═════╝ ╚══════╝╚═╝  ╚═╝ ╚═════╝╚═╝  ╚═╝ ╚═════╝╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═╝╚═╝╚═╝     ╚═╝╚═╝  ╚═╝ ╚════╝  ╚═════╝ ╚═════╝ ╚═╝     ╚═╝
*/
﻿        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #333;
            line-height: 1.6;
            padding: 20px;
            padding-top: 100px;
            /* Espacio para navbar fija */
        }

        /* Navbar styles */
        .navbar {
            width: 100%;
            position: fixed;
            top: 0;
            left: 0;
            border-bottom: 1px solid #333;
            background-color: rgba(0, 0, 0, 0.8);
            z-index: 1000;
            padding: 20px 0;
        }

        .menu {
            list-style-type: none;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: space-evenly;
            align-items: center;
            width: 100%;
        }

        .crystal-btn {
            text-decoration: none;
            color: white;
            font-weight: bold;
            text-transform: uppercase;
            padding: 10px 30px;
            border-radius: 15px;
            background: rgba(20, 20, 20, 0.6);
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
        }

        .crystal-btn:hover {
            background: rgba(40, 40, 40, 0.8);
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
            text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
        }

        /* Demo styles */
        .demo_has #has-target {
            border: 2px solid red;
            padding: 10px;
            margin: 10px 0;
        }

        .demo_where :where(h1, h2, h3) {
            color: green;
        }

        .contenedor {
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            overflow: hidden;
        }

        header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 40px;
            text-align: center;
        }

        header h1 {
            font-size: 2.5em;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        header p {
            font-size: 1.2em;
            opacity: 0.9;
        }

        .contenido {
            padding: 40px;
        }

        .seccion {
            margin-bottom: 50px;
            padding: 30px;
            background: #f8f9fa;
            border-radius: 15px;
            border-left: 5px solid #667eea;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .seccion:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
        }

        .seccion h2 {
            color: #667eea;
            margin-bottom: 20px;
            font-size: 2em;
            border-bottom: 3px solid #667eea;
            padding-bottom: 10px;
        }

        .seccion h3 {
            color: #764ba2;
            margin-top: 25px;
            margin-bottom: 15px;
            font-size: 1.5em;
        }

        .ejemplo {
            background: white;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .codigo {
            background: #2d2d2d;
            color: #f8f8f2;
            padding: 20px;
            border-radius: 8px;
            font-family: 'Courier New', monospace;
            font-size: 0.95em;
            overflow-x: auto;
            margin: 15px 0;
            border-left: 4px solid #667eea;
        }

        .codigo .selector {
            color: #66d9ef;
        }

        .codigo .propiedad {
            color: #a6e22e;
        }

        .codigo .valor {
            color: #e6db74;
        }

        .codigo .comentario {
            color: #75715e;
            font-style: italic;
        }

        .demo {
            background: #fff;
            border: 3px dashed #667eea;
            border-radius: 10px;
            padding: 25px;
            margin: 20px 0;
        }

        .nota {
            background: #fff3cd;
            border-left: 5px solid #ffc107;
            padding: 15px 20px;
            margin: 20px 0;
            border-radius: 5px;
        }

        .nota strong {
            color: #856404;
        }

        /* 1. SELECTORES BÁSICOS */

        /* Universal */
        .demo-universal * {
            border: 1px dotted #999;
            padding: 5px;
        }

        /* Elemento */
        .demo-elemento p {
            color: #2c3e50;
            background: #ecf0f1;
            padding: 10px;
            margin: 5px 0;
        }

        /* Clase */
        .destacado {
            background: #f39c12;
            color: white;
            padding: 10px;
            border-radius: 5px;
            font-weight: bold;
        }

        /* ID */
        #unico {
            background: #e74c3c;
            color: white;
            padding: 15px;
            border-radius: 5px;
            text-align: center;
        }

        /* Agrupación */
        .demo-agrupacion h1,
        .demo-agrupacion h2,
        .demo-agrupacion h3 {
            color: #3498db;
            border-left: 4px solid #3498db;
            padding-left: 10px;
        }

        /* 2. SELECTORES COMBINADOS */

        /* Descendiente */
        .demo-descendiente div p {
            color: #e74c3c;
            font-weight: bold;
        }

        /* Hijo directo */
        .demo-hijo>p {
            background: #3498db;
            color: white;
            padding: 10px;
            border-radius: 5px;
        }

        /* Hermano adyacente */
        .demo-adyacente h3+p {
            background: #2ecc71;
            color: white;
            padding: 10px;
            border-radius: 5px;
            font-style: italic;
        }

        /* Hermanos generales */
        .demo-generales h3~p {
            border-left: 4px solid #9b59b6;
            padding-left: 15px;
            margin-left: 10px;
        }

        /* 3. SELECTORES DE ATRIBUTO */

        .demo-atributos a[href^="https"] {
            color: #27ae60;
            font-weight: bold;
        }

        .demo-atributos a[href$=".pdf"] {
            color: #e74c3c;
        }

        .demo-atributos a[href*="google"] {
            background: #f39c12;
            color: white;
            padding: 2px 8px;
            border-radius: 3px;
            text-decoration: none;
        }

        .demo-atributos input[type="text"] {
            border: 2px solid #3498db;
            padding: 8px;
            border-radius: 5px;
        }

        .demo-atributos input[type="email"] {
            border: 2px solid #e74c3c;
            padding: 8px;
            border-radius: 5px;
        }

        .demo-atributos input[disabled] {
            background: #ecf0f1;
            cursor: not-allowed;
        }

        /* 4. PSEUDO-CLASES DE ESTADO */

        .demo-estado a:link {
            color: #3498db;
        }

        .demo-estado a:visited {
            color: #9b59b6;
        }

        .demo-estado a:hover {
            color: #e74c3c;
            text-decoration: none;
        }

        .demo-estado a:active {
            color: #c0392b;
        }

        .demo-estado button:hover {
            background: #2ecc71;
            transform: scale(1.05);
            transition: all 0.3s ease;
        }

        .demo-estado input:focus {
            outline: 3px solid #3498db;
            border-color: #3498db;
        }

        .demo-estado input:disabled {
            background: #ecf0f1;
            cursor: not-allowed;
        }

        .demo-estado input[type="checkbox"]:checked+label {
            color: #2ecc71;
            font-weight: bold;
        }

        /* 5. PSEUDO-CLASES ESTRUCTURALES */

        .demo-estructurales li:first-child {
            background: #3498db;
            color: white;
            padding: 10px;
            border-radius: 5px;
        }

        .demo-estructurales li:last-child {
            background: #e74c3c;
            color: white;
            padding: 10px;
            border-radius: 5px;
        }

        .demo-estructurales li:nth-child(even) {
            background: #ecf0f1;
        }

        .demo-estructurales li:nth-child(odd) {
            background: #bdc3c7;
        }

        .demo-estructurales li:hover {
            transform: scale(1.05);
            cursor: pointer;
            transition: transform 0.3s ease;
        }

        .demo-estructurales2 p:first-of-type {
            font-size: 1.2em;
            color: #3498db;
            font-weight: bold;
        }

        .demo-estructurales2 p:last-of-type {
            font-style: italic;
            color: #7f8c8d;
        }

        .demo-estructurales2 div:only-child {
            background: #f39c12;
            color: white;
            padding: 10px;
        }

        .demo-estructurales2 p:empty {
            background: #e74c3c;
            height: 20px;
            display: block;
        }

        /* 6. PSEUDO-CLASES AVANZADAS */

        .demo-avanzadas p:not(.especial) {
            color: #7f8c8d;
        }

        .demo-avanzadas .especial {
            background: #f39c12;
            color: white;
            padding: 10px;
            border-radius: 5px;
        }

        .demo-avanzadas :is(h1, h2, h3) {
            color: #3498db;
            border-left: 4px solid #3498db;
            padding-left: 10px;
        }

        /* 7. PSEUDO-ELEMENTOS */

        .demo-pseudoelementos p::first-line {
            font-weight: bold;
            color: #667eea;
            font-size: 1.2em;
        }

        .demo-pseudoelementos p::first-letter {
            font-size: 3em;
            float: left;
            line-height: 0.8;
            margin-right: 5px;
            color: #764ba2;
        }

        .demo-pseudoelementos .con-before::before {
            content: "→ ";
            color: #e74c3c;
            font-weight: bold;
            font-size: 1.5em;
        }

        .demo-pseudoelementos .con-after::after {
            content: " ✓";
            color: #2ecc71;
            font-weight: bold;
            font-size: 1.5em;
        }

        .demo-pseudoelementos ::selection {
            background: #667eea;
            color: white;
        }

        .demo-pseudoelementos ul li::marker {
            color: #e74c3c;
            font-size: 1.5em;
        }

        .demo-pseudoelementos input::placeholder {
            color: #95a5a6;
            font-style: italic;
        }

        /* TABLA DE REFERENCIA */

        table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        thead {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        th,
        td {
            padding: 15px;
            text-align: left;
            border-bottom: 1px solid #e0e0e0;
        }

        th {
            font-weight: bold;
            text-transform: uppercase;
            font-size: 0.9em;
            letter-spacing: 1px;
        }

        tbody tr:hover {
            background: #f8f9fa;
            transition: background 0.3s ease;
        }

        tbody tr:last-child td {
            border-bottom: none;
        }

        code {
            background: #f4f4f4;
            padding: 2px 6px;
            border-radius: 3px;
            font-family: 'Courier New', monospace;
            color: #e74c3c;
            font-size: 0.9em;
        }

        .especificidad {
            background: white;
            padding: 20px;
            border-radius: 10px;
            margin: 20px 0;
        }

        .especificidad-ejemplo {
            background: #ecf0f1;
            padding: 15px;
            border-radius: 5px;
            margin: 10px 0;
        }

        .especificidad-valor {
            display: inline-block;
            background: #3498db;
            color: white;
            padding: 5px 10px;
            border-radius: 3px;
            font-family: monospace;
            margin-left: 10px;
        }

        footer {
            background: #2d2d2d;
            color: white;
            text-align: center;
            padding: 20px;
            margin-top: 40px;
        }

        /* Estilos para botones de ejemplo */
        button {
            background: #3498db;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 1em;
            margin: 5px;
        }

        input[type="text"],
        input[type="email"] {
            margin: 5px;
        }
    </style>

/* Clases extraÃ­das de estilos en lÃ­nea */
.list-indented {
    margin-left: 20px;
    margin-top: 10px;
}