:root[data-theme="light"] {
    --primary-color: #0252CD;
    --secondary-color: #2D7FF9;
    --accent-color: #FF5757;
    --background-color: #ffffff;
    --surface-color: #ffffff;
    --card-bg: #ffffff;
    --text-color: #111827;
    --text-color-light: #4b5563;
    --text-muted: #6b7280;
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow-color: rgba(0, 0, 0, 0.06);
    --success-color: #10B981;
    --error-color: #EF4444;
    --warning-color: #F59E0B;
    --hover-color: rgba(45, 127, 249, 0.08);
    --primary-color-rgb: 2, 82, 205;
    --secondary-color-rgb: 45, 127, 249;
    --input-bg: #ffffff;
    --tag-bg: #f3f4f6;
}

:root[data-theme="dark"] {
    --primary-color: #2D7FF9;
    --secondary-color: #5096FF;
    --accent-color: #FF5757;
    --background-color: #111827;
    --surface-color: #1F2937;
    --card-bg: #1F2937;
    --text-color: #F9FAFB;
    --text-color-light: #D1D5DB;
    --text-muted: #9CA3AF;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --success-color: #10B981;
    --error-color: #EF4444;
    --warning-color: #F59E0B;
    --hover-color: rgba(45, 127, 249, 0.15);
    --primary-color-rgb: 45, 127, 249;
    --secondary-color-rgb: 80, 150, 255;
    --input-bg: #374151;
    --tag-bg: #374151;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    letter-spacing: -0.01em;
    font-weight: 400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 16px;
}

/* Estilos para encabezados */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.4rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

/* Estilos para botones */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: transform 0.3s ease, 
                box-shadow 0.3s ease, 
                background-color 0.3s ease;
    position: relative;
    overflow: hidden;
    background-color: var(--primary-color);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 6px rgba(var(--primary-color-rgb), 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(var(--primary-color-rgb), 0.3);
    background-color: var(--secondary-color);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(var(--primary-color-rgb), 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px var(--shadow-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: var(--hover-color);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Estilos para tarjetas */
.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-color);
}

/* Estilos para secciones */
.section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-color-light);
    max-width: 800px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.lock-generator {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
}

.lock-display {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-family: monospace;
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--secondary-color);
}

.btn-secondary {
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
}

.lock-history {
    margin-top: 2rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
}

.lock-history h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.history-list {
    list-style: none;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.history-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px var(--shadow-color);
    border-color: var(--primary-color);
    background-color: rgba(var(--primary-color-rgb), 0.03);
}

.history-item-content {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.history-item-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.history-item-type {
    font-size: 0.9rem;
    color: var(--text-color);
    padding: 0.2rem 0.8rem;
    background-color: rgba(var(--primary-color-rgb), 0.1);
    border-radius: 20px;
    font-weight: 500;
}

.history-item-date {
    font-size: 0.8rem;
    color: var(--text-color-light);
    margin-left: auto;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.history-item-actions {
    display: flex;
    gap: 0.5rem;
}

.history-item-actions button {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item-actions button:hover {
    background-color: var(--hover-color);
    transform: scale(1.1);
}

.btn-copy:hover {
    color: var(--success-color) !important;
}

.btn-delete:hover {
    color: var(--error-color) !important;
}

.history-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.empty-history {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.history-help-section {
    margin-bottom: 3rem;
}

.panel {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.panel-info {
    border: 1px solid rgba(var(--secondary-color-rgb), 0.3);
}

.panel-heading {
    padding: 1rem 1.5rem;
    background-color: rgba(var(--secondary-color-rgb), 0.1);
    border-bottom: 1px solid rgba(var(--secondary-color-rgb), 0.2);
}

.panel-title {
    margin: 0;
    font-size: 1.2rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-body {
    padding: 1.5rem;
    background-color: var(--surface-color);
}

.panel-body ul {
    margin: 0;
    padding-left: 1.5rem;
}

.panel-body li {
    margin-bottom: 0.5rem;
}

/* Estilos responsivos para historial */
@media (max-width: 768px) {
    .history-hero {
        padding: 3rem 1rem;
    }

    .help-hero {
        padding: 3rem 1rem;
    }
    
    .history-hero .section-title {
        font-size: 2rem;
    }
    
    .history-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .history-filters .filter-options {
        flex-direction: column;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .history-item-content {
        margin-bottom: 1rem;
        width: 100%;
    }
    
    .history-item-date {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .history-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .history-actions {
        flex-direction: column;
    }
    
    .history-actions button {
        width: 100%;
    }
}

/* Estilos para el header de navegación */
.main-header {
    background-color: var(--card-bg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.025em;
}

.nav-logo i {
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-link {
    color: var(--text-color-light);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease, left 0.3s ease;
    z-index: 1;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color-light);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    color: var(--primary-color);
    background-color: var(--hover-color);
    transform: rotate(30deg);
}

/* Menú de usuario */
.user-menu-wrapper {
    position: relative;
}

.user-menu-btn {
    background: none;
    border: none;
    color: var(--text-color-light);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
}

.user-menu-btn:hover {
    color: var(--primary-color);
    background-color: var(--hover-color);
}

.user-menu-btn[aria-expanded="true"] {
    color: var(--primary-color);
    background-color: var(--hover-color);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--shadow-color);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    padding: 0.5rem 0;
}

.user-menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.user-menu-item:hover {
    background-color: var(--hover-color);
    color: var(--primary-color);
}

.user-menu-item i {
    width: 20px;
    text-align: center;
    color: var(--text-muted);
}

.user-menu-item:hover i {
    color: var(--primary-color);
}

.user-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

@media (max-width: 768px) {
    .user-menu-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }
    
    .user-menu-dropdown.active {
        transform: translateX(-50%) translateY(0);
    }
}

/* Tarjetas de acceso rápido en perfil */
.quick-access-card {
    display: block;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.quick-access-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--shadow-color);
    border-color: var(--primary-color);
    background-color: rgba(var(--primary-color-rgb), 0.03);
}

.quick-access-card:hover i {
    transform: scale(1.1);
    color: var(--secondary-color);
}

.quick-access-card i {
    transition: all 0.3s ease;
}

.user-menu-item.active {
    background-color: var(--hover-color);
    color: var(--primary-color);
    font-weight: 600;
}

.user-menu-item.active i {
    color: var(--primary-color);
}

/* Enlace de icono de usuario en navegación */
.user-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: var(--text-color);
    text-decoration: none;
}

.user-icon-link:hover {
    background-color: var(--hover-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

.user-icon-link i {
    font-size: 1.1rem;
}

.user-icon-link.active {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        font-size: 2rem;
        color: var(--primary-color);
        width: 48px;
        height: 48px;
        border-radius: 50%;
        margin-right: 1rem;
        z-index: 2100;
        transition: background 0.2s, color 0.2s;
    }
    .mobile-menu-btn:focus,
    .mobile-menu-btn:hover {
        background: var(--hover-color);
        outline: none;
    }
    :root[data-theme="dark"] .mobile-menu-btn {
        color: #fff;
        background: none;
    }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100vw;
        background: rgba(255,255,255,0.85);
        backdrop-filter: blur(12px);
        box-shadow: 0 8px 32px rgba(2,82,205,0.10);
        flex-direction: column;
        gap: 0;
        padding: 1.5rem 0 2rem 0;
        z-index: 2000;
        border-bottom-left-radius: 18px;
        border-bottom-right-radius: 18px;
        border-top: 1px solid var(--border-color);
        align-items: center;
        animation: slideDownMenu 0.25s cubic-bezier(.4,1.3,.6,1) both;
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-link {
        padding: 1.1rem 0;
        text-align: center;
        width: 100%;
        border-radius: 0;
        color: var(--text-color);
        background: none;
        font-size: 1.15rem;
        margin: 0;
        font-weight: 500;
        border: none;
        transition: background 0.2s, color 0.2s;
        position: relative;
    }
    .nav-link:not(:last-child)::after {
        content: '';
        display: block;
        width: 60%;
        height: 1px;
        background: var(--border-color);
        margin: 0.5rem auto 0 auto;
        opacity: 0.4;
    }
    .nav-link.active {
        background: none;
        color: var(--primary-color) !important;
        font-weight: 700;
        border-radius: 6px;
        box-shadow: none;
        position: relative;
    }
    .nav-link.active::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 70%;
        height: 60%;
        background: rgba(2,82,205,0.10);
        border-radius: 8px;
        z-index: -1;
    }
    :root[data-theme="dark"] .nav-menu {
        background: rgba(17,24,39,0.95);
        box-shadow: 0 8px 32px rgba(45,127,249,0.10);
    }
    :root[data-theme="dark"] .nav-link.active {
        color: var(--secondary-color) !important;
    }
    .theme-toggle {
        margin: 1.2rem 0 0 0;
        align-self: center;
    }
}

@keyframes slideDownMenu {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Estilos generales para los candados */
.lock-keypad-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 2rem 0;
    padding: 0;
}

.lock-keypad {
    display: grid;
    gap: 10px;
    padding: 15px;
    background-color: var(--surface-color);
    border-radius: 8px;
    margin: 15px 0;
    width: 100%;
    max-width: 100%;
}

.keypad-button {
    padding: 15px;
    border: none;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.keypad-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.8);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.keypad-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.keypad-button:active::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0) translate(-50%, -50%);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20) translate(-50%, -50%);
        opacity: 0;
    }
}

/* Estilos específicos para cada tipo de candado */

/* Numérico */
.numeric-keypad {
    max-width: 300px;
    margin: 0 auto;
}

/* Alfanumérico */
.alphanumeric-keypad {
    max-width: 600px;
    margin: 0 auto;
}

.alphanumeric-keypad .keypad-button {
    font-size: 1rem;
    padding: 12px;
}

/* Direccional */
.directional-keypad {
    max-width: 400px;
    margin: 0 auto;
    position: relative;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.directional-memory {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    min-height: 50px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.memory-item {
    font-size: 1.2rem;
    padding: 5px 10px;
    background-color: #e9ecef;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease;
    border: 1px solid #ced4da;
    color: #0066cc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.directional-grid {
    display: grid;
    gap: 10px;
    position: relative;
    z-index: 1;
    margin-bottom: 15px;
    padding: 10px;
}

.directional-button {
    aspect-ratio: 1;
    border: none;
    border-radius: 10px;
    background-color: #0066cc;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    padding: 15px;
    box-shadow: 0 4px 0 #004c99, 0 6px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(0);
}

.directional-button:hover {
    background-color: #0077ee;
    box-shadow: 0 6px 0 #004c99, 0 8px 15px rgba(0, 0, 0, 0.2);
}

.directional-button:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #004c99, 0 2px 4px rgba(0, 0, 0, 0.2);
    background-color: #005bb7;
}

.directional-button i {
    font-size: 1.8rem;
}

.directional-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Media query para dispositivos móviles */
@media (max-width: 480px) {
    .directional-keypad {
        max-width: 320px;
        padding: 15px;
    }

    .directional-button {
        padding: 12px;
        min-height: 55px;
        min-width: 55px;
    }
    
    .directional-button i {
        font-size: 1.5rem;
    }

    .memory-item {
        font-size: 1rem;
        padding: 4px 8px;
    }
}

/* Color */
.color-keypad {
    max-width: 300px;
    margin: 0 auto;
}

.color-button {
    font-size: 1.8rem;
    padding: 20px;
}

/* Patrón */
.pattern-keypad {
    max-width: 300px;
    margin: 0 auto;
}

.pattern-button {
    aspect-ratio: 1;
    padding: 0;
    position: relative;
}

.pattern-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: var(--text-color);
    border-radius: 50%;
}

.pattern-button.selected::after {
    background-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

/* Login de Ordenador */
.computer-login-container {
    max-width: 400px;
    margin: 0 auto;
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 16px var(--shadow-color);
    transition: all 0.3s ease;
}

/* Evita <input type="password"> (heurísticas anti-phishing); mismo efecto visual */
.computer-login-secret-input {
    -webkit-text-security: disc;
}
.computer-login-secret-input.revealed {
    -webkit-text-security: none;
}

.login-screen {
    text-align: center;
}

.login-header {
    margin-bottom: 30px;
}

.os-logo {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
}

.os-name {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.os-version {
    color: var(--text-color-light);
    font-size: 0.9rem;
}

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

.input-group {
    text-align: left;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.input-group label i {
    color: var(--primary-color);
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color-light);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-color-light);
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.login-status {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 24px;
}

.status-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.status-icon.success {
    background-color: var(--success-color);
    box-shadow: 0 0 10px var(--success-color);
}

.status-icon.error {
    background-color: var(--error-color);
    box-shadow: 0 0 10px var(--error-color);
}

.status-message {
    font-size: 0.9rem;
    color: var(--text-color-light);
}

.login-button {
    position: relative;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.login-button:hover:not(:disabled) {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-button .button-text {
    transition: opacity 0.3s ease;
}

.login-button .loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}

.login-button.loading .button-text {
    opacity: 0;
}

.login-button.loading .loading-spinner {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: spin 1s linear infinite;
}

.login-attempts {
    margin-top: 10px;
}

.attempts-bar {
    height: 4px;
    background-color: var(--background-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.attempts-progress {
    height: 100%;
    background-color: var(--primary-color);
    width: 100%;
    transition: width 0.3s ease;
}

.attempts-text {
    font-size: 0.8rem;
    color: var(--text-color-light);
}

.login-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.system-time {
    font-size: 0.9rem;
    color: var(--text-color-light);
}

.system-status {
    display: flex;
    gap: 10px;
    color: var(--text-color-light);
}

.system-status i {
    font-size: 1rem;
}

/* Estados y animaciones */
.computer-login-container.success {
    animation: successPulse 0.5s ease;
}

.computer-login-container.error {
    animation: errorShake 0.5s ease;
}

.computer-login-container.hacking {
    animation: hackPulse 0.5s ease infinite;
}

.computer-login-container.logged-in {
    animation: loginSuccess 1s ease forwards;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes hackPulse {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(90deg); }
}

@keyframes loginSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { 
        transform: scale(0);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .computer-login-container {
        padding: 20px;
    }

    .os-logo {
        font-size: 2.5rem;
    }

    .os-name {
        font-size: 1.5rem;
    }

    .input-wrapper input {
        padding: 10px 35px 10px 12px;
        font-size: 0.9rem;
    }
}

/* Musical */
.musical-keypad {
    max-width: 400px;
    margin: 0 auto;
}

.musical-button {
    font-size: 1.5rem;
    padding: 20px;
}

/* Emoji */
.emoji-keypad {
    max-width: 400px;
    margin: 0 auto;
}

.emoji-button {
    font-size: 1.8rem;
    padding: 20px;
}

/* Estilos para el código ingresado */
.code-display {
    text-align: center;
    font-size: 1.2rem;
    margin: 15px 0;
    padding: 10px;
    background-color: var(--surface-color);
    border-radius: 4px;
    min-height: 40px;
}

/* Estilos para mensajes de error/éxito */
.lock-message {
    text-align: center;
    margin: 10px 0;
    padding: 10px;
    border-radius: 4px;
}

.lock-message.error {
    background-color: var(--error-color);
    color: white;
}

.lock-message.success {
    background-color: var(--success-color);
    color: white;
}

/* Animaciones */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success-pulse {
    animation: success-pulse 0.5s ease-in-out;
}

/* Responsive */
@media (max-width: 600px) {
    .lock-keypad {
        gap: 8px;
        padding: 10px;
    }

    .keypad-button {
        padding: 12px;
        font-size: 1rem;
    }

    .directional-button,
    .color-button,
    .musical-button,
    .emoji-button {
        font-size: 1.5rem;
        padding: 15px;
    }

    .computer-login-container {
        padding: 15px;
    }
}

/* Actualizar estilos de formularios */
input, textarea, select {
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    border-radius: 4px;
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(var(--secondary-color-rgb), 0.2);
}

/* Actualizar estilos de tarjetas y listas */
.history-item,
.lock-type-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease,
                background-color 0.3s ease,
                border-color 0.3s ease;
    cursor: pointer;
}

.history-item:hover,
.lock-type-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    background-color: rgba(var(--primary-color-rgb), 0.03);
}

.lock-type-card i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.lock-type-card:hover i {
    transform: scale(1.2);
    color: var(--secondary-color);
}

/* Actualizar estilos de mensajes */
.notification {
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.notification.success {
    background-color: var(--success-color);
    color: white;
}

.notification.error {
    background-color: var(--error-color);
    color: white;
}

/* Actualizar estilos de tablas */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background-color: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--primary-color);
    color: white;
}

tr:hover {
    background-color: var(--hover-color);
}

/* Actualizar estilos de código */
code, pre {
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
    font-family: monospace;
}

/* Actualizar estilos de enlaces */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* Actualizar estilos de scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #121212, #2D3748);
    color: white;
    padding: 4rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    min-height: 50vh;
    max-height: 70vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 75%;
    height: 150%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 60%);
    transform: rotate(-15deg);
    z-index: 1;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -25%;
    left: -15%;
    width: 50%;
    height: 75%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    max-width: 650px;
    flex: 1;
    position: relative;
    z-index: 2;
    margin-left: auto;
    padding-left: 3rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    font-weight: 500;
    letter-spacing: -0.01em;
    max-width: 550px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-icon {
    font-size: 12rem;
    opacity: 0.2;
    transform-origin: center;
    animation: float 8s ease-in-out infinite;
}

@media (max-width: 991px) {
    .hero-icon {
        font-size: 8rem;
    }
}

@media (max-width: 991px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Secciones */
.section-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.3;
}

.features-section .section-title,
.how-to-section .section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-header {
    text-align: left;
    margin-bottom: 2.5rem;
}

.features-section .section-header,
.how-to-section .section-header {
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.section-header .section-title {
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-color-light);
    line-height: 1.7;
    max-width: 100%;
    margin: 0;
}

.features-section .section-subtitle,
.how-to-section .section-subtitle {
    text-align: center;
    margin-top: 0.5rem;
}

/* Features Section */
.features-section {
    padding: 4rem 0;
    position: relative;
    background-color: var(--background-color);
}

.features-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 0;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.feature-card {
    background-color: var(--card-bg);
    border-radius: 14px;
    padding: 2rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-height: 300px;
    box-shadow: 0 2px 12px rgba(var(--primary-color-rgb), 0.07);
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 24px rgba(var(--primary-color-rgb), 0.13);
    border-color: var(--primary-color);
    background: var(--hover-color);
}

.feature-icon-container {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 16px rgba(var(--primary-color-rgb), 0.2);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon-container {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 20px rgba(var(--primary-color-rgb), 0.3);
}

.feature-icon {
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.feature-card:hover h3 {
    color: var(--secondary-color);
}

.feature-card p {
    color: var(--text-color-light);
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.feature-link:hover {
    gap: 0.75rem;
    color: var(--secondary-color);
}

/* How to Section */
.how-to-section {
    padding: 5rem 0;
    background-color: var(--surface-color);
}

.how-to-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2.5rem;
}

@media (max-width: 992px) {
    .steps-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.step-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 2rem 1.75rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 12px rgba(var(--primary-color-rgb), 0.07);
}

.step-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 24px rgba(var(--primary-color-rgb), 0.13);
    border-color: var(--primary-color);
    background: var(--hover-color);
}

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

.step-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Recent Locks Section */
.recent-locks-section {
    padding: 5rem 0;
    background-color: var(--background-color);
}

.recent-locks-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.recent-locks-section .section-header {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1.5rem;
    text-align: left;
}

.recent-locks-section .section-header > div {
    flex: 1;
    min-width: 300px;
}

.recent-locks-section .section-title {
    margin-bottom: 0.5rem;
    text-align: left;
}

.recent-locks-section .section-subtitle {
    text-align: left;
    margin: 0;
}

@media (max-width: 768px) {
    .recent-locks-section .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .recent-locks-section .section-header > div {
        text-align: center;
    }
    
    .recent-locks-section .section-title,
    .recent-locks-section .section-subtitle {
        text-align: center;
    }
}

.recent-locks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .recent-locks-grid {
        grid-template-columns: 1fr;
    }
}

.lock-card {
    background-color: var(--surface-color);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lock-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.lock-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.lock-card-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.lock-card-header h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.lock-description {
    color: var(--text-color-light);
    margin-bottom: 1.5rem;
    min-height: 3em;
}

.lock-card-actions {
    display: flex;
    gap: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Información ColorADD inline */
.coloradd-info-inline {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--subtle-bg);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.coloradd-info-inline p {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-color-light);
}

.coloradd-info-inline strong {
    color: var(--text-color);
}

/* Nota de accesibilidad general */
.accessibility-note {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--hover-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-color);
}

.accessibility-note i {
    color: var(--primary-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.accessibility-note a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 600;
    white-space: nowrap;
}

.accessibility-note a:hover {
    text-decoration: none;
}

.accessibility-note strong {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .accessibility-note {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .accessibility-note i {
        align-self: flex-start;
    }
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background-color: var(--surface-color);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.empty-state i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    color: var(--text-color-light);
    margin-bottom: 1.5rem;
}

/* Footer */
.main-footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 0;
    margin-top: 6rem;
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(var(--primary-color-rgb), 0.03) 0%, transparent 70%);
    top: -200px;
    right: -150px;
    border-radius: 50%;
    z-index: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.footer-section h3 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.footer-section p {
    color: var(--text-color-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: var(--text-color-light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section a:hover {
    color: var(--primary-color);
    transform: translateX(3px);
}

.footer-section a i {
    font-size: 0.75rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-section a:hover i {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--hover-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-5px);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: var(--text-color-light);
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-section kbd {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--text-color);
    box-shadow: 0 2px 4px var(--shadow-color);
}

.footer-bottom {
    text-align: center;
    padding: 2rem 2rem 2rem 120px;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
        padding-left: 100px;
    }
    
    .footer-bottom-links {
        justify-content: center;
    }

    .hero-content {
        padding-left: 0;
        margin-left: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 3rem 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-icon {
        font-size: 10rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .step-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-content {
        text-align: center;
    }

    .footer-section ul {
        display: inline-block;
        text-align: left;
    }
}

/* Help Page Styles */
.help-hero {
    background: linear-gradient(135deg, #121212, #2D3748);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.help-search {
    max-width: 600px;
    margin: 2rem auto 0;
    position: relative;
}

.help-search input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(5px);
}

.help-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.help-search i {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
}

/* Ajuste para el campo de búsqueda en modo claro */
:root[data-theme="light"] .help-search input {
    background-color: rgba(0, 0, 0, 0.05);
    color: #1E293B;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .help-search input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

:root[data-theme="light"] .help-search i {
    color: rgba(0, 0, 0, 0.4);
}

/* Quick Guides */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.guide-card {
    background-color: var(--surface-color);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.guide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color);
    color: var(--primary-color);
}

.guide-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.guide-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background-color: var(--background-color);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--surface-color);
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 0;
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.5rem;
}

.faq-answer p {
    padding-bottom: 1.5rem;
    margin: 0;
    color: var(--text-color-light);
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

/* Detailed Guides */
.detailed-guides {
    padding: 4rem 0;
}

.guide-article {
    background-color: var(--surface-color);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}

.guide-article h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.guide-content {
    display: grid;
    gap: 2rem;
}

.guide-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

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

.guide-step .step-content h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.lock-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.lock-type-card {
    background-color: var(--card-bg);
    border-radius: 14px;
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 12px rgba(var(--primary-color-rgb), 0.07);
}

.lock-type-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 24px rgba(var(--primary-color-rgb), 0.13);
    border-color: var(--primary-color);
    background: var(--hover-color);
}

.lock-type-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.lock-type-card:hover i {
    transform: scale(1.1) rotate(5deg);
    color: var(--secondary-color);
}

.lock-type-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.lock-type-card:hover h3 {
    color: var(--secondary-color);
}

.lock-type-card p {
    color: var(--text-color-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.share-method, .customization-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--background-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.share-method i, .customization-option i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.share-method h4, .customization-option h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-section {
    text-align: center;
    padding: 4rem 0;
    background-color: var(--background-color);
    border-radius: 10px;
    margin-top: 4rem;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    margin-bottom: 2rem;
    color: var(--text-color-light);
}

/* Sistema de Pistas */
.hints-container {
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

.hints-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.hints-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color-light);
}

.hints-count i {
    color: var(--primary-color);
}

.hint-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.hint-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hint-button:hover:not(:disabled) {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
}

.hint-content {
    background-color: var(--background-color);
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1rem;
    display: none;
}

.hint-content.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Sistema de Puntuación */
.score-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    box-shadow: 0 2px 4px var(--shadow-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    z-index: 1000;
}

.score-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.score-value {
    font-weight: bold;
    color: var(--text-color);
}

.timer-container {
    position: fixed;
    top: 1rem;
    left: 1rem;
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    box-shadow: 0 2px 4px var(--shadow-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    z-index: 1000;
}

.timer-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.timer-value {
    font-weight: bold;
    color: var(--text-color);
}

.timer-value.warning {
    color: var(--accent-color);
    animation: pulse 1s infinite;
}

/* Sistema de Misiones */
.missions-container {
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.missions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.missions-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.missions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.mission-card {
    background-color: var(--background-color);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.mission-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px var(--shadow-color);
}

.mission-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.mission-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 0;
}

.mission-reward {
    background-color: var(--primary-color);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.mission-description {
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

.mission-progress {
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.mission-progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.mission-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-color-light);
}

.mission-card.completed {
    border-color: var(--success-color);
}

.mission-card.completed .mission-title {
    color: var(--success-color);
}

.mission-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.mission-notification i {
    font-size: 2rem;
    color: var(--success-color);
}

.mission-notification-content h4 {
    color: var(--success-color);
    margin: 0 0 0.3rem 0;
}

.mission-notification-content p {
    margin: 0;
    color: var(--text-color);
}

.mission-notification .reward {
    color: var(--primary-color);
    font-weight: bold;
}

/* Temas de Candados */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.theme-card {
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.theme-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.theme-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.theme-description {
    color: var(--text-color-light);
    margin-bottom: 1.5rem;
}

.theme-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.theme-category {
    background-color: var(--background-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Animaciones */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .score-container,
    .timer-container {
        position: static;
        margin: 1rem;
    }

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

    .mission-notification {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}

/* BADGES DE DIFICULTAD */
.difficulty-badge {
    display: inline-block;
    padding: 2px 14px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: lowercase;
    margin-left: 8px;
    margin-bottom: 2px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

.difficulty-badge.difficulty-easy {
    background: #e6f4ea;
    color: #256029;
}

.difficulty-badge.difficulty-medium {
    background: #fff7d6;
    color: #7c5a00;
}

.difficulty-badge.difficulty-hard {
    background: #fdeaea;
    color: #a4262c;
}

/* FILTROS DE DIFICULTAD */
.difficulty-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.difficulty-filter-btn {
    border: none;
    border-radius: 12px;
    padding: 8px 22px;
    font-size: 1.1rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #222;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
}

.difficulty-filter-btn.active {
    background: #181c23;
    color: #fff;
}

.difficulty-filter-btn.all {
    background: #f3f4f6;
    color: #222;
    border: 1px solid #ccc;
}

.difficulty-filter-btn.active.all {
    background: #181c23;
    color: #fff;
    border: 1px solid #181c23;
}

.difficulty-filter-btn.easy { 
    background: #e6f4ea; 
    color: #256029; 
    border: 1px solid #c6e7d2;
}

.difficulty-filter-btn.medium { 
    background: #fff7d6; 
    color: #7c5a00; 
    border: 1px solid #ffedb3;
}

.difficulty-filter-btn.hard { 
    background: #fdeaea; 
    color: #a4262c; 
    border: 1px solid #fbd7d7;
}

.difficulty-filter-btn.active.easy { 
    background: #256029; 
    color: #fff; 
    border: 1px solid #256029;
}

.difficulty-filter-btn.active.medium { 
    background: #7c5a00; 
    color: #fff; 
    border: 1px solid #7c5a00;
}

.difficulty-filter-btn.active.hard { 
    background: #a4262c; 
    color: #fff; 
    border: 1px solid #a4262c;
}

.difficulty-filter-btn:hover:not(.active) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
    border-color: var(--primary-color);
}

.difficulty-filter-btn.all:hover:not(.active) {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
}

.difficulty-filter-btn.easy:hover:not(.active) {
    background-color: rgba(37, 96, 41, 0.1);
    color: #256029;
    border-color: #256029;
}

.difficulty-filter-btn.medium:hover:not(.active) {
    background-color: rgba(124, 90, 0, 0.1);
    color: #7c5a00;
    border-color: #7c5a00;
}

.difficulty-filter-btn.hard:hover:not(.active) {
    background-color: rgba(164, 38, 44, 0.1);
    color: #a4262c;
    border-color: #a4262c;
}

/* Opciones numéricas */
.numeric-options {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    margin: 20px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.numeric-options:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.numeric-options h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.numeric-options:hover h4 {
    color: var(--secondary-color);
}

.option-group {
    margin-bottom: 18px;
}

.option-group p {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: 15px;
    margin-bottom: 5px;
}

.radio-group label,
.option-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.radio-group input,
.option-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.radio-group input:hover,
.option-group input[type="checkbox"]:hover {
    transform: scale(1.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

.checkbox-label span {
    flex: 1;
    line-height: 1.5;
}

/* Editor de texto enriquecido */
.success-message-editor {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    background: var(--card-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.success-message-editor:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    flex-wrap: wrap;
}

.toolbar-separator {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 4px;
}

.editor-toolbar::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    opacity: 0;
    transition: opacity 0.3s ease, top 0.3s ease;
}

.success-message-editor:hover .editor-toolbar::after {
    opacity: 1;
    top: 0;
}

.format-select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
    min-width: 120px;
}

.format-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.toolbar-btn {
    width: 36px;
    height: 36px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: all 0.2s ease;
    padding: 0;
    font-size: 0.9rem;
}

.toolbar-btn:hover {
    background-color: var(--hover-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(var(--primary-color-rgb), 0.1);
}

.toolbar-btn:active {
    transform: translateY(0);
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.editor-content {
    min-height: 150px;
    padding: 12px;
    background-color: var(--input-bg);
    color: var(--text-color);
    outline: none;
    overflow-y: auto;
    line-height: 1.6;
    position: relative;
    font-family: inherit;
    font-size: 0.95rem;
}

.editor-content:focus {
    outline: none;
}

.editor-content.editor-empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    pointer-events: none;
    position: absolute;
    top: 12px;
    left: 12px;
    font-style: italic;
}

.editor-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0.5rem 0;
}

.editor-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.editor-content a:hover {
    text-decoration: none;
}

.editor-content ul,
.editor-content ol {
    margin: 0.5rem 0;
    padding-left: 2rem;
}

.editor-content h1,
.editor-content h2,
.editor-content h3 {
    margin: 1rem 0 0.5rem 0;
    font-weight: 600;
    line-height: 1.3;
}

.editor-content h1 {
    font-size: 1.75rem;
}

.editor-content h2 {
    font-size: 1.5rem;
}

.editor-content h3 {
    font-size: 1.25rem;
}

.editor-content p {
    margin: 0.5rem 0;
}

.toolbar-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.toolbar-btn.active:hover {
    background-color: var(--primary-color);
    color: white;
    transform: none;
}

/* ===== MÚLTIPLES CÓDIGOS ===== */
.additional-codes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.code-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.code-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(var(--primary-color-rgb), 0.1);
}

.code-item .code-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.code-item .code-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.code-item .code-remove {
    color: var(--error-color);
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-item .code-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.form-help-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* URL Personalizada */
.custom-url-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.custom-url-input:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 3px 8px rgba(var(--secondary-color-rgb), 0.1);
}

.url-prefix {
    background-color: var(--surface-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0 10px;
    height: 44px;
    display: flex;
    align-items: center;
    border-right: 1px solid var(--border-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.custom-url-input:hover .url-prefix {
    background-color: rgba(var(--secondary-color-rgb), 0.05);
    color: var(--secondary-color);
}

.custom-url-input input {
    border: none;
    border-radius: 0;
    height: 44px;
    flex: 1;
    transition: background-color 0.3s ease;
}

.custom-url-input input:focus {
    box-shadow: none;
}

/* Selector de directorio */
.directory-selector {
    display: flex;
    gap: 8px;
}

.directory-selector input {
    flex: 1;
    background-color: var(--surface-color);
    color: var(--text-color);
}

.directory-selector button {
    white-space: nowrap;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                background-color 0.3s ease;
}

.directory-selector button:hover {
    transform: translateY(-2px) scale(1.03);
    background-color: rgba(var(--secondary-color-rgb), 0.1);
    color: var(--secondary-color);
}

.directory-selector button i {
    transition: transform 0.3s ease;
}

.directory-selector button:hover i {
    transform: rotate(15deg);
}

/* Efectos para tarjetas de tipos de candado */
.lock-type-card {
    position: relative;
    border: 1px solid var(--border-color);
}

.lock-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.lock-type-card:hover::before {
    opacity: 1;
}

.lock-type-card:hover h3 {
    color: var(--secondary-color);
}

/* Efectos para badges en tarjetas */
.lock-type-card:hover .difficulty-badge.difficulty-easy {
    background: linear-gradient(to right, #e6f4ea, #d0eed9);
    color: #1a4a1c;
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(37, 96, 41, 0.2);
}

.lock-type-card:hover .difficulty-badge.difficulty-medium {
    background: linear-gradient(to right, #fff7d6, #ffe7a0);
    color: #614500;
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(124, 90, 0, 0.2);
}

.lock-type-card:hover .difficulty-badge.difficulty-hard {
    background: linear-gradient(to right, #fdeaea, #fcd2d2);
    color: #7d1e22;
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(164, 38, 44, 0.2);
}

/* Ajustes para dispositivos móviles */
@media (max-width: 768px) {
    .editor-toolbar {
        flex-wrap: wrap;
    }
    
    .directory-selector {
        flex-direction: column;
    }
    
    .directory-selector button {
        align-self: flex-start;
    }
    
    .custom-url-input {
        flex-direction: column;
        align-items: stretch;
    }
    
    .url-prefix {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

/* Menú de navegación */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease, left 0.3s ease;
    z-index: 1;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* Efectos hover para input y textarea */
input:not([type="radio"]):not([type="checkbox"]):hover,
textarea:hover,
select:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 1px rgba(var(--secondary-color-rgb), 0.1);
}

/* QR Code section */
.qr-section {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent;
}

.qr-section:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
    box-shadow: 0 10px 20px rgba(var(--secondary-color-rgb), 0.1);
}

.share-panel {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    background: var(--card-bg);
}

.share-panel h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.share-panel p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

#qrCode canvas {
    border-radius: 12px;
    background: white;
    padding: 0.5rem;
}

.qr-description {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.share-link-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.share-link-control {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.share-link-control input {
    flex: 1;
    min-width: 240px;
}

.qr-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

.code-length-control {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

#codeLength {
    max-width: 140px;
}

.code-length-hint {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.8;
}

.lock-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
}

.lock-header-content {
    flex: 1;
    min-width: 200px;
}

.lock-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    color: var(--primary-color);
}

.lock-difficulty-label {
    display: inline-block;
    margin-top: 0.5rem;
}

.lock-type-selector {
    margin-bottom: 3rem;
}

.lock-type-selector .section-header {
    margin-bottom: 2rem;
}

.lock-type-selector h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.lock-creator {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(var(--primary-color-rgb), 0.07);
    margin-bottom: 2rem;
}

.lock-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
}

.lock-summary-item span {
    font-size: 0.85rem;
    color: var(--text-color);
    display: block;
}

.lock-summary-item strong {
    font-size: 1.1rem;
    color: var(--heading-color);
}

.cryptex-lab,
.safe-dial-lab,
.music-lab {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cryptex-preview {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    font-family: monospace;
    font-size: 1.5rem;
    letter-spacing: 0.2rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--subtle-bg);
}

.cryptex-preview span {
    display: inline-flex;
    width: 32px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--card-bg);
    box-shadow: inset 0 0 6px rgba(0,0,0,0.1);
}

.safe-dial-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.safe-dial-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.safe-sequence {
    min-height: 48px;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    background: var(--background-color);
    font-size: 0.95rem;
}

.safe-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.music-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.music-result {
    min-height: 48px;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--subtle-bg);
    font-family: monospace;
}

.music-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.music-table th,
.music-table td {
    border: 1px solid var(--border-color);
    padding: 6px;
    text-align: center;
}

.word-wheel-lock .wheel-btn {
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.word-wheel-lock .wheel-btn:hover {
    transform: translateY(-1px);
    background: var(--subtle-bg);
}

.switch-button {
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.switch-button:active {
    transform: scale(0.95);
}

.slider-lock .slider-input {
    width: 100%;
}

.slider-lock .slider-value {
    font-weight: 600;
    color: var(--secondary-color);
}

.directional-helper {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.directional-memory {
    min-height: 48px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background: var(--card-bg);
    border-radius: 10px;
    display: none; /* Oculto por defecto, se muestra cuando hay elementos */
    gap: 0.5rem;
    justify-content: flex-start; /* Alineado a la izquierda, no centrado */
    align-items: center;
    border: 1px dashed var(--border-color);
    flex-wrap: wrap;
}

.directional-step {
    font-size: 1.4rem;
}

.directional-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.cryptex-lock {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.cryptex-rings {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cryptex-ring {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
}

.cryptex-btn {
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 999px;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.cryptex-letter {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--subtle-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.cryptex-current-word {
    font-size: 1.6rem;
    font-family: monospace;
}

.rotary-lock {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.rotary-heading {
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rotary-dial-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.rotary-dial {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    position: relative;
    background: var(--surface-color);
    border: 6px solid var(--border-color);
    box-shadow:
        inset 0 0 25px rgba(0,0,0,0.1),
        0 20px 40px rgba(0,0,0,0.15);
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

:root[data-theme="light"] .rotary-dial {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #dee2e6;
    box-shadow:
        inset 0 0 25px rgba(0,0,0,0.05),
        0 20px 40px rgba(0,0,0,0.1);
}

:root[data-theme="dark"] .rotary-dial {
    background: radial-gradient(circle at 50% 45%, #1d1d2a 0%, #171823 40%, #0c0d16 70%);
    border-color: rgba(255,255,255,0.08);
    box-shadow:
        inset 0 0 25px rgba(0,0,0,0.45),
        0 20px 40px rgba(0,0,0,0.45);
}

.rotary-ticks {
    position: absolute;
    inset: 0;
}

.rotary-tick {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center;
    transform: rotate(var(--tick-rotation)) translate(0, -118px);
    font-size: 0.65rem;
    color: var(--text-color);
    opacity: 0.8;
    text-align: center;
}

.rotary-tick span {
    display: block;
    transform: rotate(calc(-1 * var(--tick-rotation)));
}

.rotary-pointer {
    --pointer-rotation: 0deg;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 95px;
    background: linear-gradient(180deg, #dfe6fb 0%, #9db8ff 100%);
    transform-origin: bottom center;
    transform: rotate(var(--pointer-rotation));
    border-radius: 999px;
    box-shadow: 0 0 15px rgba(146,174,255,0.6);
}

.rotary-pointer::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(180deg, #c7d5ff 0%, #8194ff 100%);
    border: 3px solid rgba(255,255,255,0.85);
    box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
}

.rotary-value {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-color);
    margin: 0.5rem 0;
}

.rotary-slider {
    width: 60%;
    margin-top: 0.5rem;
    accent-color: #7aa4ff;
}

.rotary-direction {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    font-weight: 600;
}

.rotary-direction input {
    margin-right: 0.35rem;
}

.rotary-sequence-heading {
    margin-bottom: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.rotary-sequence {
    min-height: 32px;
    width: 100%;
    padding: 0.85rem;
    border-radius: 10px;
    background: var(--surface-color);
    border: 1px dashed var(--border-color);
    font-size: 0.95rem;
    color: var(--text-color);
}

.rotary-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cipher-callout .resource-card {
    border: 1px dashed var(--secondary-color);
    background: rgba(var(--secondary-color-rgb), 0.05);
}

#downloadQR:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Lock Types Grid */
.lock-types-grid {
    transition: opacity 0.3s ease;
    grid-template-columns: repeat(3, 1fr);
}

.lock-types-grid:hover .lock-type-card:not(:hover) {
    opacity: 0.8;
    transform: scale(0.98);
}

/* Media queries para responsive design de lock-types-grid */
@media (max-width: 768px) {
    .lock-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .lock-types-grid {
        grid-template-columns: 1fr;
    }
}

/* Scroll bar con colores */
::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--primary-color), var(--secondary-color));
}

/* Notificaciones con gradientes */
.notification.success {
    background: linear-gradient(135deg, var(--success-color), #27ae60);
}

.notification.error {
    background: linear-gradient(135deg, var(--error-color), #c0392b);
}

/* Animación para el logo */
.nav-logo {
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-logo:hover {
    color: var(--secondary-color);
    transform: scale(1.05);
}

.nav-logo i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.nav-logo:hover i {
    transform: rotate(10deg);
    color: var(--secondary-color);
}

/* Ribbon de construcción/desarrollo */
/* Opción 2: Naranja/Amarillo (llamativo y destacado) - ACTIVA */
/* Posición: Esquina superior derecha */
.dev-ribbon {
    position: fixed;
    top: 52px;
    right: -52px;
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
    color: white;
    padding: 12px 60px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transform: rotate(45deg);
    transform-origin: center;
    z-index: 9998;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
    pointer-events: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dev-ribbon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 28px 5px;
    border-color: transparent transparent #D97706 transparent;
}

.dev-ribbon::after {
    content: '';
    position: absolute;
    top: 0;
    right: -5px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 5px 28px 0;
    border-color: transparent #D97706 transparent transparent;
}

/* Ribbon en esquina inferior izquierda */
.dev-ribbon-bottom {
    position: fixed;
    bottom: 52px;
    left: -58px;
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
    color: white;
    padding: 12px 60px;
    font-size: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transform: rotate(225deg);
    transform-origin: center;
    z-index: 9998;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
    pointer-events: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ocultar el texto original */
.dev-ribbon-bottom > * {
    font-size: 0;
    opacity: 0;
}

/* Mostrar texto rotado 180 grados usando pseudo-elemento */
.dev-ribbon-bottom::before {
    content: 'En desarrollo';
    font-size: 0.9rem;
    display: inline-block;
    transform: rotate(180deg);
    position: relative;
    z-index: 1;
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Borde derecho del ribbon inferior */
.dev-ribbon-bottom::after {
    content: '';
    position: absolute;
    top: 0;
    right: -5px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 5px 28px 0;
    border-color: transparent #D97706 transparent transparent;
}

/* Opción 1: Azul (combina con la paleta principal) */
/* .dev-ribbon {
    background: linear-gradient(135deg, #0252CD 0%, #2D7FF9 100%);
    box-shadow: 0 4px 16px rgba(2, 82, 205, 0.35);
}
.dev-ribbon::before {
    border-color: transparent transparent #0140A0 transparent;
}
.dev-ribbon::after {
    border-color: transparent #0140A0 transparent transparent;
} */

/* Opción 3: Rojo/Naranja (actual pero mejorado) */
/* .dev-ribbon {
    background: linear-gradient(135deg, #FF5757 0%, #FF8C42 100%);
    box-shadow: 0 4px 16px rgba(255, 87, 87, 0.4);
}
.dev-ribbon::before {
    border-color: transparent transparent #C0392B transparent;
}
.dev-ribbon::after {
    border-color: transparent #C0392B transparent transparent;
} */

/* Opción 4: Verde (fresco y positivo) */
/* .dev-ribbon {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}
.dev-ribbon::before {
    border-color: transparent transparent #059669 transparent;
}
.dev-ribbon::after {
    border-color: transparent #059669 transparent transparent;
} */

/* Opción 5: Azul-Verde (combinación única) */
/* .dev-ribbon {
    background: linear-gradient(135deg, #0252CD 0%, #10B981 100%);
    box-shadow: 0 4px 16px rgba(2, 82, 205, 0.35);
}
.dev-ribbon::before {
    border-color: transparent transparent #0140A0 transparent;
}
.dev-ribbon::after {
    border-color: transparent #0140A0 transparent transparent;
} */

/* Opción 6: Púrpura (moderno y distintivo) */
/* .dev-ribbon {
    background: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}
.dev-ribbon::before {
    border-color: transparent transparent #6D28D9 transparent;
}
.dev-ribbon::after {
    border-color: transparent #6D28D9 transparent transparent;
} */

@media (max-width: 768px) {
    .dev-ribbon {
        top: 28px;
        right: -35px;
        padding: 10px 50px;
        font-size: 0.8rem;
    }
    .dev-ribbon-bottom {
        bottom: 28px;
        left: -35px;
        padding: 10px 50px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .dev-ribbon {
        top: 22px;
        right: -38px;
        padding: 8px 45px;
        font-size: 0.75rem;
        letter-spacing: 0.08em;
    }
    .dev-ribbon-bottom {
        bottom: 22px;
        left: -38px;
        padding: 8px 45px;
        font-size: 0.75rem;
        letter-spacing: 0.08em;
    }

    .footer-bottom {
        padding-left: 80px;
    }
}

/* Efecto visual para historial y misiones */
.history-item,
.mission-card {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease,
                background-color 0.3s ease,
                border-color 0.3s ease;
    overflow: hidden;
    border: 1px solid transparent;
}

.history-item:hover,
.mission-card:hover {
    border-color: var(--secondary-color);
}

.history-item::before,
.mission-card::before {
    content: '';
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
                rgba(var(--secondary-color-rgb), 0.05), 
                rgba(var(--primary-color-rgb), 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.history-item:hover::before,
.mission-card:hover::before {
    opacity: 1;
}

/* Botones de acción en historial con color */
.history-item-actions button {
    transition: color 0.3s ease, transform 0.3s ease;
}

.history-item-actions button:hover {
    color: var(--secondary-color);
    transform: scale(1.15);
}

.btn-copy:hover {
    color: #27ae60 !important;
}

.btn-qr:hover {
    color: #3498db !important;
}

.btn-delete:hover {
    color: #e74c3c !important;
}

/* Mejoras de accesibilidad y UX */

/* Variables para accesibilidad */
:root {
    --focus-ring: 0 0 0 3px rgba(52, 152, 219, 0.5); /* Color de foco estándar */
    --error-focus: 0 0 0 3px rgba(231, 76, 60, 0.5); /* Color de foco para errores */
    --outline-width: 2px;
    --form-element-spacing: 1rem;
    --contrast-ratio-text: 4.5; /* Mínimo para AA */
    --transition-duration: 0.3s;
}

/* Mejora del foco para todos los elementos interactivos */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: var(--outline-width) solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: var(--focus-ring);
}

/* Modo de alto contraste para usuarios que lo necesiten */
@media (prefers-contrast: more) {
    :root {
        --primary-color: #0066cc;
        --secondary-color: #009900;
        --error-color: #cc0000;
        --background-color: #ffffff;
        --text-color: #000000;
        --border-color: #000000;
    }
    
    .difficulty-badge.difficulty-easy {
        background: #d4f8d4;
        color: #004400;
        border: 1px solid #004400;
    }
    
    .difficulty-badge.difficulty-medium {
        background: #fff0b3;
        color: #664400;
        border: 1px solid #664400;
    }
    
    .difficulty-badge.difficulty-hard {
        background: #ffcccc;
        color: #990000;
        border: 1px solid #990000;
    }
    
    /* Bordes más visibles */
    input, select, textarea, .btn, .lock-type-card {
        border-width: 2px;
    }
}

/* Reducción de movimiento para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    
    .keypad-button:hover,
    .btn:hover,
    .lock-type-card:hover {
        transform: none !important;
    }
    
    .success-message-editor:hover .editor-toolbar::after,
    .nav-link:hover::after,
    .btn:hover::before,
    .btn-primary:hover,
    .difficulty-filter-btn:hover:not(.active),
    ::-webkit-scrollbar-thumb:hover {
        transition: none !important;
        animation: none !important;
    }
}

/* Ajustes de tamaño para contenido */
html {
    font-size: 16px; /* Base size */
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

/* Textos con mejor legibilidad */
body {
    line-height: 1.6;
    letter-spacing: 0.01em;
}

p, li {
    max-width: 68ch; /* Mejora la legibilidad */
}

/* Skip to content link - Accesibilidad para usuarios de teclado */
.skip-to-content {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    background: #0252CD;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    z-index: 2000;
    font-weight: 600;
    text-decoration: none;
    transition: left 0.2s, box-shadow 0.2s;
}

.skip-to-content:focus {
    left: 20px;
    top: 20px;
    width: auto;
    height: auto;
    outline: 2px solid #0252CD;
    box-shadow: 0 2px 8px rgba(2,82,205,0.15);
}

/* Estados de validación para campos de formulario */
input:invalid,
textarea:invalid,
select:invalid {
    border-color: var(--error-color);
}

input:invalid:focus,
textarea:invalid:focus,
select:invalid:focus {
    box-shadow: var(--error-focus);
}

.validation-message {
    font-size: 0.8rem;
    color: var(--error-color);
    margin-top: 5px;
    animation: fadeIn 0.3s ease;
}

/* Tooltips para ayuda */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--text-color-light);
    color: white;
    font-size: 0.7rem;
    margin-left: 5px;
    cursor: help;
}

.tooltip-content {
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--surface-color);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 4px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    width: 200px;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tooltip-container:hover .tooltip-content,
.tooltip-icon:focus + .tooltip-content {
    opacity: 1;
}

/* Mejora de contraste para textos pequeños */
.text-muted {
    color: #6c7580; /* Mejor contraste que text-color-light */
}

/* Mejoras de diseño para keypad interactivo */
.keypad-button {
    min-width: 44px; /* Target size for touch */
    min-height: 44px;
    font-size: 1.2rem;
}

.delete-button {
    background-color: rgba(var(--error-color-rgb, 231, 76, 60), 0.1);
    color: var(--error-color);
}

.delete-button:hover {
    background-color: rgba(var(--error-color-rgb, 231, 76, 60), 0.9);
    color: white;
}

/* Indicadores visuales de estado activo */
.active-state {
    position: relative;
}

.active-state::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success-color);
}

/* Mejoras para pantallas pequeñas */
@media (max-width: 480px) {
    .btn {
        width: 100%; /* Full width buttons on small screens */
        margin-bottom: 8px;
    }

    .form-actions {
        flex-direction: column;
    }
    
    .lock-creator {
        padding: 1rem;
    }
    
    /* Espaciado para evitar que los dedos toquen múltiples botones */
    .keypad-button {
        margin: 5px;
    }
}

/* Estilo consistente para los botones */
.btn {
    position: relative;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-align: center;
}

/* Mejoras visuales para notificaciones */
.notification {
    border-radius: 6px;
    padding: 12px 16px;
    position: fixed;
    z-index: 1000;
    right: 16px;
    bottom: 16px;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    animation: slideInRight 0.3s ease-out;
}

.notification.success::before,
.notification.error::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
    font-size: 1.2rem;
}

.notification.success::before {
    content: '\f058'; /* check-circle */
}

.notification.error::before {
    content: '\f057'; /* times-circle */
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mejoras para usuarios con movilidad reducida */
.large-controls {
    font-size: 1.2rem;
    padding: 12px 20px;
}

.spacing-controls > * {
    margin-right: 16px;
    margin-bottom: 16px;
}

/* Indicadores de carga para feedback de usuario */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fluidez en la interfaz */
.lock-type-selector,
.lock-creator,
.lock-preview {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Dark mode con mejores contrastes */
:root[data-theme="dark"] {
    --text-color: #ffffff;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #64b5f6; /* Más brillante para mejor contraste */
    --secondary-color: #4ecca3;
    --border-color: rgba(255, 255, 255, 0.15);
}

/* Botones y controles con mejor visibilidad */
:root[data-theme="dark"] .btn-secondary {
    background-color: #2d2d2d;
    border-color: #454545;
} 

/* Estilos para la página de historial */
.history-hero {
    background: linear-gradient(135deg, #121212, #2D3748);
    color: white;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.history-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 75%;
    height: 150%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 60%);
    transform: rotate(-15deg);
    z-index: 1;
    pointer-events: none;
}

.history-hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 50%;
    height: 75%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.history-hero .container {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.history-hero .section-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.history-hero .section-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.filters-section {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.history-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: center;
}

.history-filters .search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.history-filters .search-box input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.history-filters .search-box i {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.history-filters .filter-options {
    display: flex;
    gap: 0.8rem;
}

.history-filters select {
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.history-section {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.history-list-container {
    margin-bottom: 1.5rem;
}

.history-list {
    list-style: none;
    padding: 0;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-color);
    border-color: var(--secondary-color);
}

.history-item-content {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.history-item-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

.history-item-type {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0.2rem 0.8rem;
    background-color: var(--tag-bg);
    border-radius: 20px;
}

.history-item-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
}

.history-item-actions {
    display: flex;
    gap: 0.5rem;
}

.history-item-actions button {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item-actions button:hover {
    background-color: var(--hover-color);
    transform: scale(1.1);
}

.btn-copy:hover {
    color: var(--success-color) !important;
}

.btn-delete:hover {
    color: var(--error-color) !important;
}

.history-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.empty-history {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.history-help-section {
    margin-bottom: 3rem;
}

.panel {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.panel-info {
    border: 1px solid rgba(var(--secondary-color-rgb), 0.3);
}

.panel-heading {
    padding: 1rem 1.5rem;
    background-color: rgba(var(--secondary-color-rgb), 0.1);
    border-bottom: 1px solid rgba(var(--secondary-color-rgb), 0.2);
}

.panel-title {
    margin: 0;
    font-size: 1.2rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-body {
    padding: 1.5rem;
    background-color: var(--surface-color);
}

.panel-body ul {
    margin: 0;
    padding-left: 1.5rem;
}

.panel-body li {
    margin-bottom: 0.5rem;
}

/* Estilos responsivos para historial */
@media (max-width: 768px) {
    .history-hero {
        padding: 3rem 1rem;
    }

    .help-hero {
        padding: 3rem 1rem;
    }
    
    .history-hero .section-title {
        font-size: 2rem;
    }
    
    .history-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .history-filters .filter-options {
        flex-direction: column;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .history-item-content {
        margin-bottom: 1rem;
        width: 100%;
    }
    
    .history-item-date {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .history-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .history-actions {
        flex-direction: column;
    }
    
    .history-actions button {
        width: 100%;
    }
}

/* Estilos específicos para modo claro */
:root[data-theme="light"] .filters-section {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

:root[data-theme="light"] .search-box input {
    border: 1px solid #d0d0d0;
    background-color: #f8f9fa;
}

:root[data-theme="light"] .search-box input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

:root[data-theme="light"] .history-section {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

:root[data-theme="light"] .history-item {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
}

:root[data-theme="light"] .history-item-name {
    color: #2c3e50;
}

:root[data-theme="light"] .history-item-type {
    background-color: rgba(44, 62, 80, 0.1);
    color: #2c3e50;
}

:root[data-theme="light"] .panel-body {
    background-color: #ffffff;
}

:root[data-theme="light"] .panel-info {
    border: 1px solid rgba(52, 152, 219, 0.3);
}

/* Sección de Testimonios */
.testimonials-section {
    padding: 6rem 0;
    background-color: var(--background-color);
    position: relative;
    overflow: hidden;
}

.testimonials-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(var(--primary-color-rgb), 0.08) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    border-radius: 50%;
    z-index: 0;
}

.testimonials-section::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(var(--secondary-color-rgb), 0.08) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
    border-radius: 50%;
    z-index: 0;
}

.testimonials-container {
    position: relative;
    z-index: 1;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.testimonial-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.testimonial-quote {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 4rem;
    opacity: 0.1;
    color: var(--primary-color);
}

.testimonial-content {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.author-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.author-info p {
    font-size: 0.9rem;
    color: var(--text-color-light);
    margin-bottom: 0;
}

.testimonial-company {
    height: 30px;
    opacity: 0.7;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* Sección de estadísticas */
.stats-section {
    padding: 5rem 0;
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
}

.stat-value {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-color-light);
    max-width: 200px;
    margin: 0 auto;
}

/* Estilos para el hover en las secciones hero en modo oscuro */
:root[data-theme="dark"] .history-hero:hover,
:root[data-theme="dark"] .hero-section:hover {
    background-color: rgba(16, 185, 129, 0.08);
    transition: background-color 0.3s ease;
}

:root[data-theme="dark"] .history-hero:hover .section-title,
:root[data-theme="dark"] .hero-section:hover .hero-title,
:root[data-theme="dark"] .history-hero:hover .section-subtitle,
:root[data-theme="dark"] .hero-section:hover .hero-subtitle {
    color: white;
    transition: color 0.3s ease;
}

:root[data-theme="dark"] .history-hero::before,
:root[data-theme="dark"] .hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

:root[data-theme="dark"] .history-hero:hover::before,
:root[data-theme="dark"] .hero-section:hover::before {
    opacity: 1;
}

:root[data-theme="dark"] .help-search input:focus {
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

:root[data-theme="dark"] .help-search i {
    color: #9CA3AF;
    transition: color 0.3s ease;
}

:root[data-theme="dark"] .help-search:hover i {
    color: #10B981;
}

:root[data-theme="dark"] .guide-card:hover {
    border-color: #10B981;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.15);
}

:root[data-theme="dark"] .guide-card:hover i {
    color: #10B981;
}

:root[data-theme="dark"] .hero-section:hover .btn-primary,
:root[data-theme="dark"] .history-hero:hover .btn-primary {
    background-color: #10B981;
    border-color: #10B981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

:root[data-theme="dark"] .hero-section:hover .btn-secondary,
:root[data-theme="dark"] .history-hero:hover .btn-secondary {
    color: #10B981;
    border-color: #10B981;
}

:root[data-theme="dark"] .hero-section:hover .btn-secondary:hover,
:root[data-theme="dark"] .history-hero:hover .btn-secondary:hover {
    background-color: rgba(16, 185, 129, 0.1);
    transform: translateY(-3px);
}

:root[data-theme="dark"] .faq-item:hover .faq-question {
    color: #10B981;
}

/* Estilos específicos para hero en modo claro */
:root[data-theme="light"] .hero-section,
:root[data-theme="light"] .history-hero,
:root[data-theme="light"] .help-hero {
    background: #E2E8F0;
    color: #1E293B;
}

:root[data-theme="light"] .hero-section .hero-title,
:root[data-theme="light"] .history-hero .section-title,
:root[data-theme="light"] .help-hero h1 {
    color: #0F172A;
}

:root[data-theme="light"] .hero-section .hero-subtitle,
:root[data-theme="light"] .history-hero .section-subtitle,
:root[data-theme="light"] .help-hero p {
    color: #334155;
}

:root[data-theme="light"] .hero-section,
:root[data-theme="light"] .history-hero,
:root[data-theme="light"] .help-hero {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

:root[data-theme="light"] .hero-section::before,
:root[data-theme="light"] .history-hero::before,
:root[data-theme="light"] .help-hero::before {
    background: radial-gradient(circle at center, rgba(0,0,0,0.03) 0%, transparent 60%);
}

:root[data-theme="light"] .hero-section::after,
:root[data-theme="light"] .history-hero::after,
:root[data-theme="light"] .help-hero::after {
    background: radial-gradient(circle at center, rgba(0,0,0,0.02) 0%, transparent 70%);
}

/* Botones en hero sections para modo claro */
:root[data-theme="light"] .hero-section .btn-primary,
:root[data-theme="light"] .history-hero .btn-primary,
:root[data-theme="light"] .help-hero .btn-primary {
    background-color: #0252CD;
    color: white;
    border-color: #0252CD;
    box-shadow: 0 4px 6px rgba(2, 82, 205, 0.25);
}

:root[data-theme="light"] .hero-section .btn-primary:hover,
:root[data-theme="light"] .history-hero .btn-primary:hover,
:root[data-theme="light"] .help-hero .btn-primary:hover {
    background-color: #0043A4;
    border-color: #0043A4;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(2, 82, 205, 0.3);
}

:root[data-theme="light"] .hero-section .btn-secondary,
:root[data-theme="light"] .history-hero .btn-secondary,
:root[data-theme="light"] .help-hero .btn-secondary {
    background-color: transparent;
    color: #0252CD;
    border: 1px solid #0252CD;
}

:root[data-theme="light"] .hero-section .btn-secondary:hover,
:root[data-theme="light"] .history-hero .btn-secondary:hover,
:root[data-theme="light"] .help-hero .btn-secondary:hover {
    background-color: rgba(2, 82, 205, 0.1);
    color: #0043A4;
    transform: translateY(-2px);
}

/* Estilos para la página de recursos */
.resource-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: center;
}

.resource-filters .search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.resource-filters .search-box input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.resource-filters .search-box i {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.resource-filters .filter-options {
    display: flex;
    gap: 0.8rem;
}

.resource-filters select {
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Estilos para las secciones de recursos */
.resources-section {
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.resources-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Estilos para las tarjetas de recursos */
.resource-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px var(--shadow-color);
    border-color: var(--primary-color);
}

.resource-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.resource-icon i {
    font-size: 1.8rem;
    color: white;
}

.resource-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

.resource-card p {
    color: var(--text-color-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.resource-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.resource-type, .resource-level {
    font-size: 0.8rem;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    background-color: var(--tag-bg);
    color: var(--text-color-light);
}

.resource-card .btn {
    align-self: flex-start;
}

/* Sección de comunidad */
.community-section {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin: 3rem 0;
    text-align: center;
    border: 1px solid var(--border-color);
}

.community-section .section-title {
    margin-bottom: 1.5rem;
}

.community-section .section-description {
    max-width: 800px;
    margin: 0 auto 2rem;
    color: var(--text-color-light);
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .resource-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .resource-filters .filter-options {
        flex-direction: column;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
}

/* Estilos específicos para página de recursos */
.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    width: 100%;
    grid-column: 1 / -1;
}

.resource-filters .search-box {
    position: relative;
    transition: all 0.3s ease;
}

.resource-filters .search-box:focus-within {
    transform: scale(1.02);
}

.resource-filters .search-box:focus-within i {
    color: var(--primary-color);
}

.resource-card {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.resource-card:hover .resource-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 20px rgba(var(--primary-color-rgb), 0.2);
}

.resource-icon {
    transition: all 0.3s ease;
}

.resource-meta {
    margin-top: auto;
}

.resource-type, .resource-level {
    transition: all 0.3s ease;
}

.resource-card:hover .resource-type,
.resource-card:hover .resource-level {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
}

.resources-section .btn-primary {
    position: relative;
    overflow: hidden;
}

.resources-section .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.resources-section .btn-primary:hover::before {
    left: 100%;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--success-color);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
    max-width: 350px;
}

.notification.error {
    background-color: var(--error-color);
}

/* Animaciones para tarjetas de recursos */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.resource-card {
    animation: fadeIn 0.5s ease forwards;
}

/* Retardo en cascada para recursos */
.resources-grid .resource-card:nth-child(1) { animation-delay: 0.1s; }
.resources-grid .resource-card:nth-child(2) { animation-delay: 0.2s; }
.resources-grid .resource-card:nth-child(3) { animation-delay: 0.3s; }

/* Modal de recursos */
.resource-modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1100;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
    visibility: hidden;
    opacity: 0;
}

.resource-modal.visible {
    display: block !important;
    visibility: visible;
    opacity: 1;
}

.resource-modal-content {
    position: relative;
    background-color: var(--background-color);
    margin: 30px auto;
    width: 90%;
    max-width: 1000px;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

.resource-modal-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resource-modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: white;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.resource-modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.resource-intro {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.resource-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.resource-actions {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

/* Sistemas de codificación */
.coding-system {
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.coding-system h3 {
    background-color: var(--card-bg);
    padding: 1.2rem;
    margin: 0;
    font-size: 1.4rem;
    border-bottom: 1px solid var(--border-color);
}

.system-content {
    padding: 1.5rem;
}

.system-description {
    margin-bottom: 1.5rem;
}

.system-implementation {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.system-implementation h4 {
    margin-top: 0;
    color: var(--primary-color);
}

.system-example {
    background-color: var(--surface-color);
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    border-left: 4px solid var(--primary-color);
}

.system-playground {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
}

.system-playground h4 {
    margin-top: 0;
    color: var(--primary-color);
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.result-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--surface-color);
    border-radius: 6px;
}

.result-container h5 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.encoded-result {
    font-family: monospace;
    font-size: 1.2rem;
    color: var(--primary-color);
    padding: 0.5rem;
    min-height: 2.5rem;
    word-break: break-all;
}

/* Tabla de Morse */
.morse-table {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin: 1rem 0;
}

.morse-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.morse-cell {
    background-color: var(--surface-color);
    padding: 0.5rem;
    text-align: center;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
}

/* Tabla de Polibio */
.polybius-grid {
    margin: 1rem 0;
}

.polybius-grid table {
    border-collapse: collapse;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.polybius-grid th, .polybius-grid td {
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    text-align: center;
    font-family: monospace;
}

.polybius-grid th {
    background-color: var(--primary-color);
    color: white;
}

.polybius-grid td {
    background-color: var(--surface-color);
}

/* Estilos para el cifrado Francmasón */
.pigpen-translation {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* Ajustes responsivos para tablas */
@media (max-width: 480px) {
    .polybius-grid table {
        font-size: 0.8rem;
    }
    
    .polybius-grid th, .polybius-grid td {
        padding: 0.3rem;
    }
}

/* Botón para mostrar más sistemas */
.show-more-systems {
    text-align: center;
    margin: 2rem 0 1rem;
}

.img-fluid {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
}

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

/* Mejoras para la sección de comunidad */
.community-section {
    position: relative;
    overflow: hidden;
}

.community-section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(var(--primary-color-rgb), 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.community-section::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(var(--primary-color-rgb), 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cta-buttons .btn {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.cta-buttons .btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(var(--primary-color-rgb), 0.2);
}

/* Responsive para modal de recursos */
@media (max-width: 768px) {
    .resource-modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .morse-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .resource-actions {
        flex-direction: column;
    }
    
    .resource-actions .btn {
        width: 100%;
    }
}

/* Estilos para el candado de Nokia */
.nokia-keypad {
    max-width: 300px;
    margin: 0 auto;
    display: grid;
    gap: 12px;
}

.nokia-display {
    background-color: #a4c9a4;
    color: #222;
    border-radius: 6px;
    padding: 12px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    font-family: monospace;
}

.nokia-button {
    background-color: #e0e0e0;
    color: #333;
    border-radius: 8px;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 0 #bbb, 0 4px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.1s ease;
}

.nokia-button:active {
    box-shadow: 0 1px 0 #bbb;
    transform: translateY(2px);
}

.nokia-button small {
    font-size: 0.7rem;
    margin-top: 3px;
    opacity: 0.7;
}

/* Estilos para el candado de Coordenadas */
.coordinates-keypad {
    max-width: 600px;
    margin: 0 auto;
}

.map-container {
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.coordinates-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

.coordinates-keypad .input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.coordinates-keypad label {
    font-weight: 500;
    color: var(--text-color);
}

.coordinates-keypad input {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: monospace;
}

.info-message {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 10px;
    text-align: center;
}

@media (max-width: 480px) {
    .nokia-keypad, .coordinates-keypad {
        max-width: 100%;
    }
    
    .coordinates-inputs {
        grid-template-columns: 1fr;
    }
}

/* Opciones numéricas */
.numeric-options {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    margin: 20px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.numeric-options:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.numeric-options h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.numeric-options:hover h4 {
    color: var(--secondary-color);
}

.option-group {
    margin-bottom: 18px;
}

.option-group p {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: 15px;
    margin-bottom: 5px;
}

.radio-group label,
.option-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.radio-group input,
.option-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.radio-group input:hover,
.option-group input[type="checkbox"]:hover {
    transform: scale(1.1);
}

/* Opciones para Nokia */
.nokia-options {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    margin: 20px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nokia-options:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.nokia-options h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nokia-options:hover h4 {
    color: var(--secondary-color);
}

/* Opciones para Coordenadas */
.coordinates-options {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    margin: 20px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.coordinates-options:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.coordinates-options h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.coordinates-options:hover h4 {
    color: var(--secondary-color);
}

/* Opciones para Mando Giratorio */
.rotary-options {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    margin: 20px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rotary-options:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.rotary-options h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.rotary-options:hover h4 {
    color: var(--secondary-color);
}

/* --- Mejoras UX para recursos.html --- */
.filters-section {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.resources-section {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.resources-section .section-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    text-align: left;
}

.resources-section .section-subtitle {
    margin-bottom: 2rem;
    color: var(--text-color-light);
    font-size: 1.1rem;
    text-align: left;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-bottom: 1rem;
}

.resource-card {
    background: var(--card-bg);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(2,82,205,0.07);
    padding: 2rem 1.2rem 1.5rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s, transform 0.2s;
}
.resource-card:hover {
    box-shadow: 0 8px 24px rgba(2,82,205,0.13);
    transform: translateY(-4px) scale(1.01);
}
.resource-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}
.resource-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 700;
}
.resource-card p {
    color: var(--text-color-light);
    margin-bottom: 1.2rem;
    min-height: 2.5em;
}
.btn-preview {
    margin-left: 0.5rem;
    background: var(--hover-color);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    font-size: 0.95rem;
}
.btn-preview:hover {
    background: var(--primary-color);
    color: #fff;
}

@media (max-width: 600px) {
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    .resources-section {
        padding-bottom: 1rem;
    }
    .filters-section {
        padding-bottom: 1rem;
    }
}
/* --- Fin mejoras UX recursos.html --- */

.resources-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2.5rem;
    align-items: flex-start;
    margin-top: 2rem;
}
.resources-sidebar {
    position: relative;
    min-width: 240px;
    max-width: 340px;
}
.resources-main {
    width: 100%;
}
@media (max-width: 900px) {
    .resources-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .resources-sidebar {
        max-width: 100%;
        margin-bottom: 2rem;
    }
}

.resources-grid-3cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-bottom: 1rem;
}
@media (max-width: 1100px) {
    .resources-grid-3cols {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 700px) {
    .resources-grid-3cols {
        grid-template-columns: 1fr;
    }
}

/* Foco visible y accesible en header y navegación */
.main-header a:focus, .main-header button:focus, .main-header .nav-link:focus, .main-header .theme-toggle:focus, .main-header .mobile-menu-btn:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(2,82,205,0.18);
  z-index: 10;
}

/* Refuerzo contraste en hover/focus */
.main-header .nav-link:hover, .main-header .nav-link:focus {
  color: var(--secondary-color);
  background: var(--hover-color);
}

.main-header .nav-link.active:focus {
  background: var(--primary-color);
  color: #fff;
}

.main-header .theme-toggle:focus, .main-header .theme-toggle:hover {
  color: var(--primary-color);
  background: var(--hover-color);
}

.main-header .mobile-menu-btn:focus, .main-header .mobile-menu-btn:hover {
  background: var(--hover-color);
  color: var(--primary-color);
}

/* Foco visible y área de toque mínima en botones y campos */
button:focus, .btn:focus, input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(2,82,205,0.18);
  z-index: 10;
}

button, .btn, input[type="button"], input[type="submit"], input[type="reset"] {
  min-width: 44px;
  min-height: 44px;
  font-size: 1rem;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

input, select, textarea {
  min-height: 44px;
  font-size: 1rem;
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Feedback visual en hover/focus */
.btn:hover, .btn:focus, button:hover, button:focus {
  background: var(--hover-color);
  color: var(--primary-color);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary-color);
}

/* Estados de error y validación accesibles */
input:invalid, select:invalid, textarea:invalid {
  border-color: var(--error-color);
}
input:invalid:focus, select:invalid:focus, textarea:invalid:focus {
  box-shadow: 0 0 0 4px rgba(239,68,68,0.18);
}

/* Botones deshabilitados */
button:disabled, .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #e5e7eb;
  color: #9ca3af;
}

/* Foco visible y feedback en tarjetas */
.resource-card:focus-within, .feature-card:focus-within, .lock-type-card:focus-within {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(2,82,205,0.18);
  z-index: 10;
}

.resource-card:hover, .feature-card:hover, .lock-type-card:hover {
  border-color: var(--secondary-color);
  box-shadow: 0 8px 24px var(--shadow-color);
  background: var(--hover-color);
}

/* ===== SISTEMA DE NOTIFICACIONES MEJORADO ===== */
.notifications-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.notification {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 300px;
    max-width: 100%;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    position: relative;
}

.notification-visible {
    opacity: 1;
    transform: translateX(0);
}

.notification-removing {
    opacity: 0;
    transform: translateX(400px);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.notification-content i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    line-height: 1.5;
    color: var(--text-color);
}

.notification-action {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
}

.notification-action:hover {
    background: var(--hover-color);
    border-color: var(--primary-color);
}

.notification-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.notification-close:hover {
    background: var(--hover-color);
    color: var(--text-color);
}

.notification-success {
    border-left: 4px solid var(--success-color);
}

.notification-success .notification-content i {
    color: var(--success-color);
}

.notification-error {
    border-left: 4px solid var(--error-color);
}

.notification-error .notification-content i {
    color: var(--error-color);
}

.notification-warning {
    border-left: 4px solid var(--warning-color);
}

.notification-warning .notification-content i {
    color: var(--warning-color);
}

.notification-info {
    border-left: 4px solid var(--primary-color);
}

.notification-info .notification-content i {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .notifications-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification {
        min-width: auto;
        width: 100%;
    }
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs-container {
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    margin-bottom: 2rem;
}

.breadcrumbs {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: var(--text-muted);
    opacity: 0.5;
}

.breadcrumb-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.breadcrumb-active {
    color: var(--text-color);
    font-weight: 500;
}

/* ===== FAVORITOS ===== */
.favorite-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    flex-shrink: 0;
}

.favorite-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--hover-color);
}

.favorite-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.favorite-btn.active:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.history-item .favorite-btn {
    margin-right: 8px;
}

/* ===== ESTADOS DE CARGA ===== */
.loading-skeleton {
    background: linear-gradient(90deg, 
        var(--surface-color) 25%, 
        var(--hover-color) 50%, 
        var(--surface-color) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-button {
    height: 40px;
    width: 120px;
    border-radius: 8px;
}

.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== MEJORAS DUA Y UX - ESPACIADO Y LEGIBILIDAD ===== */

/* Mejoras generales de espaciado según DUA */
.container {
    padding: 2.5rem 2rem !important;
}

/* Formularios - Mejor espaciado según DUA */
.form-group {
    margin-bottom: 2rem !important;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group-inline {
    flex-direction: row;
    gap: 1.5rem;
    align-items: flex-end;
}

.form-group-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.form-group-inline .form-group-item:first-child {
    flex: 2;
}

.form-group-inline .code-length-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group-inline .code-length-control input {
    max-width: 120px;
}

@media (max-width: 768px) {
    .form-group-inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-group-inline .code-length-control input {
        max-width: 100%;
    }
}

.form-group label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: block;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem !important;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    min-height: 48px;
    transition: all 0.2s ease;
    background-color: var(--input-bg);
    color: var(--text-color);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.form-actions .btn {
    min-width: 140px;
    padding: 0.875rem 1.75rem !important;
}

/* Escape Creator - Mejoras de espaciado */
.escape-creator-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.escape-step {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem !important;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-header h2 {
    margin: 0;
    font-size: 1.75rem;
    color: var(--text-color);
}

.escape-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Cards y elementos interactivos - Mejor espaciado */
.card,
.resource-card,
.lock-type-card,
.feature-card {
    padding: 2rem 1.75rem !important;
    margin-bottom: 1.5rem !important;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.resource-card,
.lock-type-card {
    padding: 1.75rem !important;
}

/* History items - Mejor espaciado */
.history-item {
    padding: 1.5rem 1.75rem !important;
    margin-bottom: 1.25rem !important;
    gap: 1rem;
}

.history-item-content {
    gap: 1rem !important;
    flex-wrap: wrap;
}

.history-item-actions {
    gap: 0.75rem !important;
    flex-shrink: 0;
}

.history-item-actions button {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
}

/* Selected locks - Mejor espaciado */
.selected-locks-container {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--surface-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.selected-locks-container h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.selected-locks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.selected-lock-item {
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sequence-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.sequence-item {
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    cursor: move;
    transition: all 0.2s ease;
}

.sequence-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.15);
}

.sequence-item .drag-handle {
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: grab;
}

.sequence-item .drag-handle:active {
    cursor: grabbing;
}

/* Grids - Mejor espaciado */
.locks-grid,
.resources-grid-selectable,
.lock-types-grid {
    gap: 1.5rem !important;
    margin: 2rem 0;
}

.lock-card-selectable,
.resource-card-selectable {
    padding: 1.75rem !important;
    margin: 0;
}

/* Secciones - Mejor espaciado */
.section {
    padding: 5rem 0 !important;
}

.section-header {
    margin-bottom: 3.5rem !important;
}

.section-title {
    margin-bottom: 1.25rem !important;
}

.section-subtitle {
    margin-top: 1rem;
    line-height: 1.7;
}

/* Help text y descripciones */
.help-text,
.section-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Empty messages */
.empty-message {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Botones - Área de toque mínima según WCAG */
button,
.btn,
input[type="button"],
input[type="submit"],
input[type="reset"],
a.btn {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    line-height: 1.5;
    gap: 0.625rem;
}

.btn-large {
    padding: 1rem 2rem !important;
    font-size: 1.125rem !important;
    min-height: 52px;
}

.btn-small {
    padding: 0.625rem 1.25rem !important;
    font-size: 0.9375rem !important;
    min-height: 40px;
}

/* Mejoras de contraste y legibilidad */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
    letter-spacing: -0.02em;
}

h1 {
    margin-bottom: 1.5rem !important;
}

h2 {
    margin-bottom: 1.25rem !important;
}

h3 {
    margin-bottom: 1rem !important;
}

p {
    line-height: 1.7 !important;
    margin-bottom: 1.25rem !important;
}

/* Listas - Mejor espaciado */
ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

/* Modales - Mejor espaciado */
.modal-content {
    padding: 0 !important;
}

.modal-header {
    padding: 1.75rem 2rem !important;
}

.modal-body {
    padding: 2rem !important;
}

/* Search y filtros - Mejor espaciado */
.search-filters {
    gap: 1.25rem !important;
    margin-bottom: 2rem !important;
    flex-wrap: wrap;
}

.search-input {
    padding: 0.875rem 1rem !important;
    min-height: 48px;
}

/* DUA - Múltiples formas de representación */
.dua-visual {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dua-text {
    flex: 1;
}

.dua-icon {
    flex-shrink: 0;
    font-size: 2rem;
    color: var(--primary-color);
}

/* Mejoras responsive */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1.25rem !important;
    }
    
    .escape-step {
        padding: 1.75rem 1.5rem !important;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .history-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .locks-grid,
    .resources-grid-selectable {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
}

/* Badges y etiquetas - Mejor espaciado */
.difficulty-badge,
.history-item-type,
.collection-badge {
    padding: 0.5rem 0.875rem !important;
    margin: 0 0.5rem 0 0 !important;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.4;
}

/* Filtros - Mejor espaciado */
.difficulty-filters {
    gap: 1rem !important;
    margin-bottom: 2rem !important;
    flex-wrap: wrap;
}

.difficulty-filter-btn {
    padding: 0.75rem 1.5rem !important;
    min-height: 44px;
    font-size: 1rem;
    gap: 0.5rem;
}

.history-filters {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box input {
    padding: 0.875rem 1rem 0.875rem 2.75rem !important;
    width: 100%;
    min-height: 48px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.filter-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-options select {
    flex: 1;
    min-width: 200px;
    padding: 0.875rem 1rem !important;
    min-height: 48px;
}

/* Hero section - Mejor espaciado */
.hero-section {
    padding: 4rem 2rem !important;
    min-height: 50vh !important;
    max-height: 70vh !important;
}

.hero-content {
    margin-bottom: 0;
}

.hero-title {
    margin-bottom: 1.25rem !important;
    line-height: 1.2;
    font-size: 3.5rem !important;
}

.hero-subtitle {
    margin-bottom: 2rem !important;
    line-height: 1.6;
    font-size: 1.25rem !important;
}

.hero-actions {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

/* Features grid - Mejor espaciado y distribución 2x2 */
.features-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
    margin: 0 !important;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
}

.feature-card {
    padding: 2rem !important;
}

.feature-icon {
    font-size: 2rem;
}

.feature-card h3 {
    margin-bottom: 1rem !important;
}

.feature-card p {
    line-height: 1.7;
}

/* Steps container - Mejor espaciado */
.steps-container {
    gap: 2rem !important;
    margin: 2.5rem 0 !important;
    list-style: none;
    padding-left: 0;
}

ol.steps-container {
    counter-reset: step-counter;
}

ol.steps-container .step-card {
    counter-increment: step-counter;
    position: relative;
}

.difficulty-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-right: 0.5rem;
    font-weight: 500;
}

.difficulty-filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.feature-card .difficulty-filters {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.step-card {
    padding: 2rem 1.75rem !important;
}

.step-number {
    margin-bottom: 1.5rem;
}

.step-content h3 {
    margin-bottom: 1rem !important;
}

.step-content p {
    line-height: 1.7;
}

/* Selection options - Mejor espaciado */
.selection-options {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.selection-options .btn {
    flex: 1;
    min-width: 200px;
}

/* DUA - Múltiples formas de acción y expresión */
.dua-action-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.dua-action-group .btn {
    flex: 1;
    min-width: 150px;
}

/* DUA - Múltiples formas de compromiso */
.dua-engagement {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

/* Mejoras de contraste para accesibilidad */
.required {
    color: var(--error-color);
    font-weight: 700;
    margin-left: 0.25rem;
}

/* Links - Mejor espaciado y legibilidad */
a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.2s ease, text-decoration 0.2s ease;
    padding: 0.125rem 0;
}

a:hover {
    text-decoration: underline;
    color: var(--secondary-color);
}

a:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Tablas - Mejor espaciado */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
}

th, td {
    padding: 1rem 1.25rem !important;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--surface-color);
    font-weight: 600;
    color: var(--text-color);
}

tr:hover {
    background: var(--hover-color);
}

/* Paneles y secciones de ayuda */
.panel {
    margin: 2rem 0;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.panel-heading {
    padding: 1.5rem 2rem;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
}

.panel-body {
    padding: 2rem;
}

.panel-body ul {
    margin: 1rem 0;
}

.panel-body li {
    margin-bottom: 0.875rem;
    line-height: 1.7;
}

@media (max-width: 480px) {
    .container {
        padding: 1.25rem 1rem !important;
    }
    
    .escape-step {
        padding: 1.5rem 1.25rem !important;
    }
    
    .card,
    .resource-card,
    .lock-type-card {
        padding: 1.5rem 1.25rem !important;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
    
    .hero-section {
        padding: 3rem 1.5rem !important;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .selection-options {
        flex-direction: column;
    }
    
    .selection-options .btn {
        width: 100%;
        min-width: auto;
    }
    
    .filter-options {
        flex-direction: column;
    }
    
    .filter-options select {
        width: 100%;
        min-width: auto;
    }
    
    .dua-action-group {
        flex-direction: column;
    }
    
    .dua-action-group .btn {
        width: 100%;
        min-width: auto;
    }
}

/* ===== MODAL DE CONFIRMACIÓN ===== */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.confirm-modal.visible {
    opacity: 1;
    visibility: visible;
}

.confirm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.confirm-modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.confirm-modal.visible .confirm-modal-content {
    transform: scale(1);
}

.confirm-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-color);
}

.confirm-modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.confirm-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    padding: 0;
}

.confirm-modal-close:hover {
    background: var(--hover-color);
    color: var(--text-color);
}

.confirm-modal-close:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.confirm-modal-body {
    padding: 2rem;
}

.confirm-modal-message {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
}

.confirm-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: var(--surface-color);
}

.confirm-modal-footer .btn {
    min-width: 120px;
}

@media (max-width: 480px) {
    .confirm-modal-content {
        width: 95%;
        max-width: none;
    }
    
    .confirm-modal-header,
    .confirm-modal-body,
    .confirm-modal-footer {
        padding: 1.25rem 1.5rem;
    }
    
    .confirm-modal-footer {
        flex-direction: column-reverse;
    }
    
    .confirm-modal-footer .btn {
        width: 100%;
    }
}

/* ===== PALETA DE COMANDOS ===== */
.command-palette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.command-palette.visible {
    opacity: 1;
    visibility: visible;
}

.command-palette-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.command-palette-content {
    position: relative;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 70vh;
    overflow: hidden;
    transform: scale(0.95) translateY(-20px);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.command-palette.visible .command-palette-content {
    transform: scale(1) translateY(0);
}

.command-palette-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface-color);
}

.command-palette-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1rem;
    padding: 0.5rem 0;
    outline: none;
}

.command-palette-input::placeholder {
    color: var(--text-muted);
}

.command-palette-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    padding: 0;
}

.command-palette-close:hover {
    background: var(--hover-color);
    color: var(--text-color);
}

.command-palette-list {
    max-height: calc(70vh - 80px);
    overflow-y: auto;
    padding: 0.5rem 0;
}

.command-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    gap: 1rem;
}

.command-item:hover,
.command-item.selected {
    background: var(--hover-color);
}

.command-key {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: var(--primary-color);
    background: var(--surface-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

.command-description {
    flex: 1;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* ===== AYUDA DE ATAJOS ===== */
.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--surface-color);
    border-radius: 8px;
    gap: 1rem;
}

.shortcut-key {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: var(--primary-color);
    background: var(--card-bg);
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.shortcut-description {
    flex: 1;
    color: var(--text-color);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .command-palette-content {
        width: 95%;
        max-width: none;
    }
    
    .shortcut-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== SISTEMA DE ETIQUETAS ===== */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tag-clickable {
    cursor: pointer;
}

.tag-clickable:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.tag-selected {
    box-shadow: 0 0 0 2px var(--primary-color);
    opacity: 1;
}

.tag-name {
    line-height: 1;
}

.tag-remove {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transition: background 0.2s ease;
    opacity: 0.7;
}

.tag-remove:hover {
    background: rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.tag-remove i {
    font-size: 0.7rem;
}

.no-tags {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.875rem;
}

.tag-more {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.625rem;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--surface-color);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    cursor: help;
}

.history-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

/* Selector de etiquetas */
.tag-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tag-selector-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0.5rem;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.tag-input-container {
    position: relative;
}

.tag-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tag-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.tag-suggestion {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.tag-suggestion:last-child {
    border-bottom: none;
}

.tag-suggestion:hover {
    background: var(--hover-color);
}

.tag-suggestion-new {
    color: var(--primary-color);
    font-weight: 500;
}

.tag-suggestion-new i {
    margin-right: 0.5rem;
}

.tags-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-height: 3rem;
}

.tags-filter .tag {
    margin: 0;
}

/* ===== PWA - Botón de instalación ===== */
.pwa-install-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.pwa-install-btn i {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .pwa-install-btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem !important;
    }
}

/* Indicador de modo offline */
.offline-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--warning-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: none;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.offline-indicator.visible {
    display: flex;
}

.offline-indicator i {
    font-size: 1.1rem;
}

/* ===== SISTEMA DE COLECCIONES ===== */
.collections-section {
    margin-bottom: 3rem;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.collection-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.collection-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.15);
    transform: translateY(-2px);
}

.collection-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.collection-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.collection-color {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
}

.collection-info {
    flex: 1;
    min-width: 0;
}

.collection-name {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collection-meta {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.collection-description {
    margin: 0.75rem 0;
    font-size: 0.9rem;
    color: var(--text-color-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.collection-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
    flex-wrap: wrap;
}

.collection-add-locks,
.collection-create-lock {
    flex: 1;
    min-width: 140px;
}

.collection-selector {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.collection-selector select {
    flex: 1;
    min-width: 200px;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-icon:hover {
    background: var(--hover-color);
    color: var(--text-color);
}

.collection-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.empty-collections {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
    font-style: italic;
    background: var(--surface-color);
    border-radius: 12px;
    border: 2px dashed var(--border-color);
}

/* Selector de color */
.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    padding: 0;
    background: none;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: var(--text-color);
}

.color-option.selected {
    border-color: var(--text-color);
    box-shadow: 0 0 0 2px var(--background-color), 0 0 0 4px var(--text-color);
}

.color-option i {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    font-size: 0.875rem;
}

/* Lista de colecciones para checkbox */
.collections-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.collection-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.collection-checkbox-item:hover {
    background: var(--hover-color);
}

.collection-checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.collection-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    cursor: pointer;
}

.collection-color-indicator {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.collection-count {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-left: auto;
}

.history-item-collections {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.collection-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid;
    line-height: 1.4;
}

.collection-badge i {
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .collections-grid {
        grid-template-columns: 1fr;
    }
    
    .collection-card {
        padding: 1.25rem;
    }
}

/* ===== SISTEMA DE PISTAS EN GENERADOR ===== */
.hints-manager {
    margin-top: 0.5rem;
}

.hints-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.hints-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.hint-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.hint-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(var(--primary-color-rgb), 0.1);
}

.hint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.hint-number {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.hint-text {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.2s ease;
}

.hint-text:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.hint-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: flex-end;
}

.hint-actions .btn-icon {
    width: 28px;
    height: 28px;
    font-size: 0.875rem;
}

.hint-remove {
    color: var(--error-color);
}

.hint-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ===== SISTEMA DE NOTAS ===== */
.note-editor {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.note-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.note-info {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

.note-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.note-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.note-updated {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.note-indicator {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-left: 0.5rem;
    opacity: 0.7;
}

.history-item-content .note-indicator {
    margin: 0 0.25rem;
}

.history-item-stats {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--surface-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.history-item-stats i {
    font-size: 0.75rem;
    color: var(--primary-color);
}

/* ===== PÁGINA DE CREACIÓN DE CANDADOS ===== */
.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filters-left {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filters-right {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-group label {
    font-size: 0.9rem;
    color: var(--text-color);
    white-space: nowrap;
}

.form-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.bulk-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.bulk-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.selected-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.locks-list-container {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
}

.locks-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s ease;
    gap: 1.5rem;
}

.lock-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.1);
    transform: translateY(-2px);
}

.lock-item-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.lock-checkbox {
    flex-shrink: 0;
}

.lock-info {
    flex: 1;
    min-width: 0;
}

.lock-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.lock-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.lock-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lock-date {
    color: var(--text-muted);
}

.lock-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ===== PÁGINA DE NUEVO CANDADO ===== */
.lock-form-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px var(--shadow-color);
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

.form-help {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.5;
}

.code-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.code-input-group .form-input,
.code-input-group input {
    flex: 1;
}

.code-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    min-height: 48px;
    transition: all 0.2s ease;
}

.code-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.1);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ===== ESTILOS PARA PANEL.HTML ===== */
.panel-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.user-info-card {
    background: var(--surface-color);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.user-info-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.user-info-header i {
    font-size: 3rem;
    color: var(--primary-color);
}

.user-details h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.user-details p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.user-stats {
    display: flex;
    gap: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.directories-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.directory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.directory-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.1);
    transform: translateY(-2px);
}

.directory-item.root-directory {
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1), rgba(var(--secondary-color-rgb), 0.05));
    border-color: var(--primary-color);
}

.directory-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.directory-content i {
    font-size: 2rem;
    color: var(--primary-color);
}

.directory-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.directory-path {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.directory-actions {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filters-left,
    .filters-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .form-select {
        width: 100%;
        min-width: auto;
    }

    .lock-item {
        flex-direction: column;
        align-items: stretch;
    }

    .lock-item-content {
        flex-direction: column;
        align-items: stretch;
    }

    .lock-item-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .lock-form-container {
        padding: 1.5rem;
    }

    .code-input-group {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }

    .user-info-header {
        flex-direction: column;
        text-align: center;
    }

    .user-stats {
        justify-content: center;
    }

    .directory-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .directory-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ===== PÁGINAS LEGALES ===== */
.legal-page {
    padding: 3rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.legal-page h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.last-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.legal-content {
    line-height: 1.8;
    color: var(--text-color);
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.legal-content h3 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.legal-content p {
    margin-bottom: 1rem;
}

.legal-content ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.legal-content a:hover {
    text-decoration: none;
}

.legal-actions {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    text-align: center;
}

@media (max-width: 768px) {
    .legal-page {
        padding: 2rem 1rem;
    }
    
    .legal-page h1 {
        font-size: 2rem;
    }
    
    .legal-content h2 {
        font-size: 1.3rem;
    }
}

/* ===== ESTILOS ESPECÍFICOS PARA HISTORY-ACTION-BTN ===== */
.history-action-btn {
    background: none !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
}

.history-action-btn:hover {
    background-color: var(--hover-color) !important;
    transform: scale(1.1) !important;
    color: var(--primary-color) !important;
}

.history-action-btn.btn-delete:hover {
    color: var(--error-color) !important;
    background-color: rgba(239, 68, 68, 0.1) !important;
}

.history-action-btn i {
    font-size: 0.9rem;
}

/* ===== ESTILOS PARA LOCK-FORM (GENERADOR.HTML) ===== */
.lock-form {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px var(--shadow-color);
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .lock-form {
        padding: 1.5rem;
    }
}

/* ===== ESTILOS PARA PANEL DE CONTROL ===== */
.directories-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.directory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.directory-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow-color);
    border-color: var(--primary-color);
}

.directory-item.root-directory {
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.15), rgba(var(--secondary-color-rgb), 0.1));
    border-color: var(--primary-color);
}

.directory-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.directory-content i {
    font-size: 2rem;
    color: var(--primary-color);
}

.directory-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    color: var(--text-color);
    font-weight: 600;
}

.directory-path {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.directory-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.directory-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.directory-badge i {
    font-size: 0.75rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--surface-color);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    flex: 1;
    min-width: 120px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .user-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .directory-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .directory-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
