/* ==========================================================================
   OpenCode Showcase stylesheet — Sleek Modern Glassmorphic Theme
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
    /* Colors */
    --bg-dark: #0a0c10;
    --bg-glass: rgba(15, 18, 25, 0.7);
    --bg-card: rgba(20, 24, 33, 0.6);
    --bg-modal: rgba(13, 16, 22, 0.95);
    
    --primary: #6366f1; /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.35);
    --primary-subtle: rgba(99, 102, 241, 0.15);
    
    --cyan: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.3);
    --cyan-subtle: rgba(6, 182, 212, 0.1);
    
    --green: #10b981;
    --green-glow: rgba(16, 185, 129, 0.3);
    --green-subtle: rgba(16, 185, 129, 0.1);

    --pink: #d946ef;
    --pink-glow: rgba(217, 70, 239, 0.3);
    --pink-subtle: rgba(217, 70, 239, 0.1);

    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dark: #64748b;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.4);
    --border-focus: rgba(6, 182, 212, 0.6);

    /* Typography */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Shadows & Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Glowing Accents */
.ambient-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(160px);
    pointer-events: none;
    z-index: -1;
    opacity: 0.4;
}

.glow-top-left {
    top: -150px;
    left: -150px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.glow-bottom-right {
    bottom: -150px;
    right: -150px;
    background: radial-gradient(circle, var(--cyan) 0%, transparent 70%);
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

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

/* Layout Container */
.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header Component */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

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

.logo-circle {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.logo-icon {
    width: 24px;
    height: 24px;
    color: white;
}

.brand-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0;
    background: linear-gradient(to right, #ffffff, #c7d2fe, #a5f3fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text .subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* General Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: var(--border-color);
}

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

.btn-github {
    background: #24292f;
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-github:hover {
    background: #1b1f23;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-full {
    width: 100%;
}

/* Stats Bar Component */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-wrapper.cyan { background: var(--cyan-subtle); color: var(--cyan); }
.stat-icon-wrapper.indigo { background: var(--primary-subtle); color: var(--primary); }
.stat-icon-wrapper.pink { background: var(--pink-subtle); color: var(--pink); }
.stat-icon-wrapper.green { background: var(--green-subtle); color: var(--green); }

.stat-icon-wrapper i {
    width: 22px;
    height: 22px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Layout Split */
.main-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    align-items: start;
    min-width: 0;
}

/* Sidebar / Filters */
.sidebar-filters {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    position: sticky;
    top: 2rem;
    min-width: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label i {
    width: 16px;
    height: 16px;
    color: var(--cyan);
}

/* Search Box styling */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

#search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

#search-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
}

.clear-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.clear-btn:hover {
    color: white;
}

.clear-btn i {
    width: 16px;
    height: 16px;
}

/* Categories selection list */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.category-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-fast);
}

.category-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.category-btn.active {
    color: white;
    background: var(--primary-subtle);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: inset 0 0 8px rgba(99, 102, 241, 0.1);
}

.category-btn-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

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

.category-count {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.category-btn.active .category-count {
    background: var(--primary);
    color: white;
}

/* Checkbox permission toggles */
.checkbox-filters {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
    user-select: none;
    transition: var(--transition-fast);
}

.checkbox-label:hover {
    color: var(--text-main);
}

.checkbox-label input {
    display: none;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.checkbox-label input:checked + .custom-checkbox {
    background: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.checkbox-label input:checked + .custom-checkbox::after {
    content: '';
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.checkbox-text code {
    font-family: var(--font-mono);
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.75rem;
}

/* Content Area Header */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.badge {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.badge-category {
    background: var(--primary-subtle);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.2);
}

.badge-mode {
    background: rgba(6, 182, 212, 0.1);
    color: #67e8f9;
    border-color: rgba(6, 182, 212, 0.2);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(217, 70, 239, 0.1);
    color: #f472b6;
    border-color: rgba(217, 70, 239, 0.2);
}

.sorting-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sorting-controls select {
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    font-family: var(--font-sans);
    outline: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.sorting-controls select:focus {
    border-color: var(--border-focus);
}

/* Agent Cards Grid */
.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Card design */
.agent-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: var(--transition-normal);
}

.agent-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.agent-card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.card-meta-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3.85rem;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 1rem;
    margin-top: auto;
}

.card-tools {
    display: flex;
    gap: 0.35rem;
}

.tool-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.tool-tag.enabled {
    background: var(--green-subtle);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.tool-tag.disabled {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-dark);
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.card-action-btn {
    background: transparent;
    border: none;
    color: var(--cyan);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition-fast);
}

.card-action-btn i {
    width: 14px;
    height: 14px;
    transition: var(--transition-fast);
}

.card-action-btn:hover {
    color: white;
}

.card-action-btn:hover i {
    transform: translateX(3px);
}

/* Empty State */
.empty-state {
    background: var(--bg-glass);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.empty-icon {
    width: 48px;
    height: 48px;
    color: var(--text-dark);
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.empty-state p {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 320px;
    margin-bottom: 0.5rem;
}

/* Modal Overlay Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 5, 8, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn var(--transition-fast) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(99, 102, 241, 0.1);
    animation: slideUp var(--transition-normal) forwards;
    overflow: hidden;
}

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

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
}

.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.modal-icon-container {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0;
    color: white;
}

.modal-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    flex: 1;
}

.modal-desc-box {
    background: rgba(99, 102, 241, 0.05);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 1.25rem 1.5rem;
}

.desc-title {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

#modal-agent-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.modal-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-subheading {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

.modal-tools-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-tool-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.modal-tool-item.enabled {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.03);
}

.modal-tool-item.enabled i {
    color: var(--green);
}

.modal-tool-item.disabled i {
    color: var(--text-dark);
}

.modal-tool-item i {
    width: 16px;
    height: 16px;
}

.modal-tool-item code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Tabs & Code blocks within Modal */
.code-section {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
}

.code-tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.01);
}

.tab-btn.active {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
    background: rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
    flex-direction: column;
}

.tab-content.active {
    display: flex;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.8rem;
    color: var(--text-dark);
}

.copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-fast);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: var(--border-hover);
}

.copy-btn.copied {
    background: var(--green-subtle);
    color: #6ee7b7;
    border-color: var(--green);
}

.copy-btn i {
    width: 14px;
    height: 14px;
}

.code-block {
    padding: 1.25rem;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #cbd5e1;
    white-space: pre-wrap;
    word-break: break-all;
}

.modal-footer {
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: #1e293b;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideIn var(--transition-normal) forwards;
}

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

.toast i {
    color: var(--green);
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Pagination & Navigation Controls
   ========================================================================== */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.pagination-summary {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.6rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
}

.pag-btn:hover:not(:disabled) {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.pag-btn.active {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.pag-btn:disabled, .pag-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.pag-dots {
    color: var(--text-dark);
    font-weight: 700;
    padding: 0 0.25rem;
}

.pag-btn i {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   Responsive Styles & Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar-filters {
        position: relative;
        top: 0;
        overflow: hidden;
    }

    .category-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 1rem;
    }
    
    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
    }

    .brand {
        width: 100%;
        min-width: 0;
    }

    .brand-text {
        min-width: 0;
    }

    .brand-text h1,
    .brand-text .subtext {
        overflow-wrap: anywhere;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .btn-github {
        width: 100%;
    }
    
    /* Horizontal Category Scrolling on Mobile */
    .category-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
        min-width: 0;
        max-height: none;
        padding-bottom: 6px;
        gap: 0.5rem;
        scrollbar-width: thin;
    }
    
    .category-btn {
        flex: 0 0 auto;
        padding: 0.5rem 0.85rem;
    }
    
    /* Horizontal Checkbox layouts */
    .checkbox-filters {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    /* Stats Bar optimizations */
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.35rem;
    }
    
    .stat-icon-wrapper {
        width: 36px;
        height: 36px;
    }
    
    .stat-icon-wrapper i {
        width: 18px;
        height: 18px;
    }

    .results-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.9rem;
    }

    .sorting-controls,
    .sorting-controls select {
        width: 100%;
    }
    
    /* Grid overrides */
    .agent-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }

    .card-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.85rem;
    }

    .pagination-container,
    .pagination-controls {
        justify-content: center;
    }

    .pagination-summary {
        flex-basis: 100%;
        text-align: center;
    }
    
    /* Modal responsive optimizations */
    .modal-card {
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 1.25rem;
        gap: 1.25rem;
    }
    
    .modal-header {
        padding: 1rem 1.25rem;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 1.25rem;
    }
    
    .modal-footer a, .modal-footer button {
        width: 100%;
    }
    
    /* Code tabs horizontal scroll */
    .code-tabs-header {
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }
    
    .code-tabs-header::-webkit-scrollbar {
        display: none;
    }
    
    .tab-btn {
        flex: 0 0 auto;
        padding: 0.75rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .app-container {
        gap: 1rem;
        padding: 0.75rem;
    }

    .stats-bar {
        grid-template-columns: 1fr;
    }
    
    .agent-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    .pag-btn {
        min-width: 42px;
        padding: 0.55rem 0.7rem;
    }
    
    .modal-title-wrapper {
        gap: 0.75rem;
    }
    
    .modal-icon-container {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
    
    .modal-meta {
        flex-wrap: wrap;
    }
}
