:root {
    --bg-dark: #0a0b10;
    --bg-card: #14161f;
    --bg-sidebar: #0f1118;
    --accent-primary: #3b82f6;
    /* Blue */
    --accent-secondary: #10b981;
    /* Green */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition-speed: 0.3s;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

html {
    background-color: var(--bg-dark);
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: #cbd5e1;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Specific Light Mode Adjustments */
[data-theme="light"] .search-box {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .search-box:focus-within {
    border-color: var(--accent-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

[data-theme="light"] .script-card,
[data-theme="light"] .result-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .script-card:hover,
[data-theme="light"] .result-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .code-box,
[data-theme="light"] .info-block,
[data-theme="light"] .modal-content {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .cat-btn:not(.active):hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    width: fit-content;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.breadcrumbs:empty {
    display: none;
}

.breadcrumbs.is-home {
    padding: 0;
}

.breadcrumbs.is-home .breadcrumb-item {
    margin: 0;
    padding: 0.75rem 1.25rem 0.75rem 1.5rem;
    border-radius: 100px;
    width: 100%;
}

.breadcrumb-item {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.5rem;
    border-radius: 100px;
}

.breadcrumb-item:hover {
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

.breadcrumb-item span {
    font-size: 1rem;
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 700;
    cursor: default;
    background: transparent;
}

.breadcrumb-separator {
    color: var(--text-secondary);
    opacity: 0.2;
    font-size: 0.6rem;
    user-select: none;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    background-color: transparent;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/wallpaper.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
}

h1,
h2,
h3,
.logo h1 {
    font-family: 'Outfit', sans-serif;
}

#app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    margin-bottom: 3rem;
}

.logo h1 {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent-primary);
}

.logo-icon {
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

.categories {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.categories::-webkit-scrollbar {
    width: 4px;
}

.categories::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

.separator {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin: 1.5rem 0 0.5rem 0.75rem;
    font-weight: 700;
}

.cat-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    text-align: left;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.cat-btn:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.cat-btn.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 15px -5px var(--accent-primary);
}

.cat-btn.is-locked {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    filter: grayscale(1);
    pointer-events: none;
}

.cat-btn.has-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Ensure active button stays blue in light mode */
[data-theme="light"] .cat-btn.active {
    background: var(--accent-primary);
    color: white;
}

[data-theme="light"] .cat-btn.active:hover {
    background: var(--accent-primary);
    /* Keep it blue */
    opacity: 0.9;
}

.chevron {
    font-size: 0.7rem;
    margin-left: 0.75rem;
    /* Separar del texto */
    transition: transform 0.3s;
    opacity: 0.6;
}

.category-group.expanded .chevron {
    transform: rotate(90deg);
    /* Apunta hacia abajo al expandir */
}

.sub-nav {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    padding-left: 1rem;
    margin-top: 0.25rem;
}

.category-group.expanded .sub-nav {
    display: flex;
}

.cat-btn.sub {
    padding: 0.5rem 0.75rem 0.5rem 1.5rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.cat-btn.sub:hover {
    opacity: 1;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    /* Lighter/Cleaner bg */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    /* More rounded */
    padding: 0 1.25rem;
    width: 100%;
    max-width: 800px;
    height: 52px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.search-box:focus-within {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.search-icon {
    color: var(--text-secondary);
    margin-left: 1.25rem;
    font-size: 1.1rem;
    transition: color 0.3s;
    order: 2;
}

.search-options {
    order: 3;
}

#search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    font-weight: 400;
    order: 1;
    /* Move input to the left */
}

#search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.btn-orcor:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

.sidebar-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Main Content Styles */
.main-content {
    flex-grow: 1;
    padding: 2rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    gap: 1.5rem;
}

.top-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.action-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.action-btn:active {
    transform: translateY(0);
}

.scripting-btn {
    position: relative;
}

.scripting-btn::after {
    content: attr(title);
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed);
    z-index: 100;
    box-shadow: var(--shadow);
}

.scripting-btn:hover::after {
    opacity: 1;
}

.search-container {
    position: relative;
    flex-grow: 1;
    max-width: 600px;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

#search-input {
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1rem 1rem 1rem 3.5rem;
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all var(--transition-speed);
}

#search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-options {
    display: none;
    /* Hidden by default, shown via JS when in a script */
    align-items: center;
    gap: 8px;
    margin: 0 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--glass-border);
    white-space: nowrap;
}

.search-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.search-options label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.search-kbd {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.content-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.content-header h2 {
    font-size: 2rem;
    font-weight: 700;
}

.stats {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#script-count {
    color: var(--text-primary);
    font-weight: 700;
}

/* Scripts Grid */
.scripts-grid {
    display: block;
    /* Default to block for detail view */
}

.scripts-grid.grid-mode {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.scripts-grid.search-mode {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.script-full-view {
    max-width: 1200px;
    width: 95%;
    margin: 0 auto;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.script-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    transition: all var(--transition-speed);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.script-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: var(--shadow);
}

.card-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--accent-primary);
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.script-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.card-preview {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
}

.tag {
    background: var(--glass-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 101;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--bg-card);
    margin: 5vh auto;
    padding: 3rem;
    border: 1px solid var(--glass-border);
    width: 90%;
    max-width: 800px;
    border-radius: 24px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    background: var(--glass-bg);
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Script Detail View */
.detail-header {
    margin-bottom: 2rem;
}

.detail-header .card-category {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.sync-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.8;
}

.detail-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* UI Components for Script Content */
.info-block {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 16px;
    margin: 1.5rem 0;
    transition: all 0.3s ease;
}

.info-block:hover {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
}

.alert-box {
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-left: 4px solid transparent;
}

.alert-box.warning {
    background: rgba(245, 158, 11, 0.08);
    border-left-color: #f59e0b;
}

.alert-box.info {
    background: rgba(59, 130, 246, 0.08);
    border-left-color: #3b82f6;
}

.alert-box.success {
    background: rgba(16, 185, 129, 0.08);
    border-left-color: #10b981;
}

.alert-box h4 {
    margin: 0 !important;
    font-size: 1rem !important;
    font-weight: 700;
}

.code-box {
    background: #0f172a;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin: 1rem 0;
    font-family: 'Fira Code', 'Monaco', monospace;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.code-box .code-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-box code {
    color: var(--accent-secondary);
    font-weight: 600;
}

.question-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(16, 185, 129, 0.3);
    margin: 3rem 0;
}

.question-box h3 {
    margin-bottom: 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
}

/* Redefined Table for Premium Look */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.data-table th {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.25rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
}

.data-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.policy-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.policy-item:last-child {
    border-bottom: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* Mobile Responsive */
/* Image and Multi-Button Styles */
.image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 2.5rem 0;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 98vw;
    max-height: 98vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-lightbox {
    position: fixed;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
    z-index: 2001;
}

.close-lightbox:hover {
    color: var(--accent-primary);
    transform: scale(1.1);
}

/* Fixed Bottom Left Button */
.fixed-bottom-left {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 999;
    transition: opacity 0.3s ease;
}

/* Fixed Bottom Right Button */
.fixed-bottom-right {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    transition: opacity 0.3s ease;
}

.floating-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
    font-size: 1.2rem;
    text-decoration: none;
}

.floating-btn:hover {
    transform: translateY(-5px);
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}



.floating-btn i {
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.zoom-img {
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: white;
    padding: 6px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: zoom-in;
    display: block;
    margin: 1.5rem auto;
}

.zoom-img:hover {
    transform: scale(1.03);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

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

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    gap: 5px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-speed);
    padding: 0;
}

.hamburger-menu:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-primary);
}

.hamburger-menu span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
    #app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1000;
        background: var(--bg-sidebar);
        max-height: 100vh;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
        z-index: -1;
    }

    .sidebar.open::after {
        opacity: 1;
        pointer-events: auto;
    }

    .main-content {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .top-bar {
        gap: 1rem;
    }

    .search-box {
        max-width: 100% !important;
        flex: 1;
    }

    .fixed-bottom-left {
        bottom: 1rem;
        left: 1rem;
    }

    .floating-btn {
        padding: 0.65rem;
    }

    .floating-btn i {
        font-size: 1.3rem;
    }
}

/* Category Hub Styles */
.category-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.category-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.cat-card-icon {
    font-size: 2.2rem;
    margin-bottom: 0.25rem;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3));
    transition: transform 0.3s ease;
}

.category-card:hover .cat-card-icon {
    transform: scale(1.1) rotate(3deg);
}

.category-card h3 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
}

.category-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.7;
    line-height: 1.4;
    display: none;
    /* Hide description for more compactness if desired, or keep it small */
}

.cat-card-link {
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 700;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.cat-card-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.category-card:hover .cat-card-link::after {
    width: 100%;
}

/* Locked Card Styles */
.category-card.is-locked {
    cursor: not-allowed;
    opacity: 0.5;
    filter: grayscale(1);
    background: rgba(255, 255, 255, 0.01);
    border-style: dashed;
}

.category-card.is-locked:hover {
    transform: none;
    border-color: var(--glass-border);
    box-shadow: none;
}

.category-card.is-locked .cat-card-icon {
    filter: none;
    opacity: 0.6;
}

.category-card.is-locked h3 {
    color: var(--text-secondary);
}

.category-card.is-locked .cat-card-link {
    color: var(--text-secondary);
    opacity: 0.5;
}

.category-card.is-locked .cat-card-link::after {
    display: none;
}

/* Locked Script Card Styles */
.script-card.is-locked {
    cursor: not-allowed;
    opacity: 0.6;
    filter: grayscale(0.8);
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--glass-border);
    pointer-events: none;
}

.script-card.is-locked:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--glass-border);
}

.script-card.is-locked h3 {
    color: var(--text-secondary);
}

.script-card.is-locked .card-category {
    color: var(--text-secondary);
    opacity: 0.7;
}

.script-card.is-locked .tag {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Section Headers for Grouping */
.section-header-wide {
    grid-column: 1 / -1;
    padding: 1.5rem 0 0.75rem 0.5rem;
    margin-top: 1rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header-wide h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.section-header-wide .section-icon {
    font-size: 1.2rem;
    background: var(--glass-bg);
    padding: 6px;
    border-radius: 8px;
}

.section-header-wide.transversal {
    margin-top: 2.5rem;
    border-color: rgba(16, 185, 129, 0.2);
}

/* Search Result Styles */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid var(--accent-primary);
}

.result-card:hover {
    transform: translateX(5px);
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.03);
}

.result-header {
    margin-bottom: 0.75rem;
}

.result-header h3 {
    margin: 0.25rem 0 0 0;
    font-size: 1.2rem;
}

.result-snippet {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
}

mark {
    background: rgba(59, 130, 246, 0.3);
    color: white;
    padding: 0 4px;
    border-radius: 4px;
    font-weight: 600;
}

/* Premium Loader Style */
.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 6rem 2rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    animation: fadeIn 0.5s ease;
    width: 100%;
}

.loader::before {
    content: '';
    width: 50px;
    height: 50px;
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

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