/* Minimal CSS for clean, professional look */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Accessibility: Visually hidden but screen-reader accessible */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 1600px;
    width: 100%;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.header {
    text-align: center;
    margin-bottom: 50px;
    color: #333;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-text {
    flex: 1;
    text-align: left;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.header p {
    color: #586069;
    margin-top: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.header-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.made-by {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.made-by-text {
    font-size: 0.85rem;
    color: #666;
    margin-right: 0.25rem;
}

.author-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.author-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #333;
    transition: all 0.2s ease;
    text-decoration: none;
}

.social-link:hover {
    background: #333;
    color: white;
    transform: translateY(-2px);
}

.social-link.github:hover {
    background: #24292e;
}

.social-link.linkedin:hover {
    background: #0077b5;
}

.social-link.medium:hover {
    background: #00ab6c;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.project-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

.project-link svg {
    flex-shrink: 0;
}

/* Responsive header */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .header-text {
        text-align: center;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header-links {
        flex-direction: column;
        gap: 1rem;
    }

    .made-by {
        justify-content: center;
    }
}

.converter-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

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

.input-section, .output-section {
    position: relative;
}

.section-label {
    font-weight: 600;
    color: #24292e;
    margin-bottom: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.format-select {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.format-select:focus {
    outline: none;
    border-color: #667eea;
}

.text-area {
    width: 100%;
    min-height: 450px;
    padding: 12px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    resize: vertical;
    transition: border-color 0.2s;
}

.text-area:focus {
    outline: none;
    border-color: #667eea;
}

.text-area[readonly] {
    background: #f6f8fa;
    cursor: default;
}

.pipeline {
    background: #f6f8fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.pipeline-header {
    font-weight: 600;
    color: #586069;
    margin-bottom: 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pipeline-flow {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.pipeline-step {
    display: inline-block;
    padding: 6px 12px;
    padding-bottom: 10px; /* Extra space for underline */
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.pipeline-step.success {
    background: #28a745;
    color: white;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.pipeline-step.error {
    background: #dc3545;
    color: white;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
    animation: shake 0.5s;
}

.pipeline-step.inactive {
    background: #e1e4e8;
    color: #959da5;
}

.pipeline-step.start::after,
.pipeline-step.end::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 15%;
    right: 15%;
    height: 3px;
    border-radius: 1.5px;
}

.pipeline-step.start::after {
    background: #667eea;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.8);
}

.pipeline-step.end::after {
    background: #667eea;
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.8);
}

.pipeline-step.end.inactive::after {
    background: #959da5;
    box-shadow: 0 1px 3px rgba(149, 157, 165, 0.5);
}

.pipeline-step.end.error::after {
    background: #dc3545;
    box-shadow: 0 1px 3px rgba(220, 53, 69, 0.8);
}

.pipeline-arrow {
    color: #959da5;
    font-size: 14px;
}

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

.status {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-icon {
    font-size: 18px;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.examples {
    margin-bottom: 20px;
}

.examples-label {
    font-weight: 600;
    color: #24292e;
    margin-bottom: 8px;
    font-size: 13px;
}

.example-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.example-btn {
    padding: 6px 12px;
    background: white;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.example-btn:hover {
    border-color: #667eea;
    background: #f6f8fa;
}

.copy-btn {
    position: absolute;
    top: 35px;
    right: 8px;
    padding: 6px 10px;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.copy-btn:hover {
    background: #f6f8fa;
    border-color: #667eea;
}

.bytewords-style-select {
    display: inline-block;
    width: auto;
    padding: 10px 12px; /* match .format-select */
    margin-left: 8px;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    font-size: 14px; /* match .format-select */
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
    height: 42px; /* enforce consistent rendered height */
    line-height: 20px;
}

.bytewords-style-select:focus {
    outline: none;
    border-color: #667eea;
}

.format-row {
    display: flex;
    align-items: stretch; /* stretch children to same height */
    gap: 8px;
    margin-bottom: 12px;
}

.format-select-inline {
    flex: 1;
    margin-bottom: 0;
}

/* Unified control sizing */
.format-row > select,
.format-row > button,
.format-row > .bytewords-style-select {
    height: 42px; /* matches explicit bytewords style select */
}

.format-row > button.example-btn {
    display: flex;
    align-items: center;
    line-height: 20px;
    font-size: 14px;
    padding: 10px 16px;
}

/* Registry Browser Styles */
.registry-list {
    margin-top: 16px;
}

.package-section {
    margin-bottom: 16px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    overflow: hidden;
}

.package-header {
    padding: 12px 16px;
    background: #f6f8fa;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.package-header:hover {
    background: #e1e4e8;
}

.package-header .expand-icon {
    font-size: 12px;
    width: 16px;
    display: inline-block;
}

.package-header .type-count {
    color: #586069;
    font-size: 0.9em;
    font-weight: normal;
    margin-left: auto;
}

.package-types {
    padding: 8px;
}

.type-row {
    margin-bottom: 8px;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Matched type (active in converter) */
.type-row.matched {
    border: 2px solid #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: linear-gradient(to right, rgba(102, 126, 234, 0.05), transparent);
}

.type-row.matched .type-header {
    background: rgba(102, 126, 234, 0.05);
}

.match-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

/* Unregistered type notice */
.unregistered-type-notice {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
    animation: slideIn 0.3s ease;
}

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

.notice-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #856404;
    font-size: 14px;
}

.notice-icon {
    font-size: 20px;
}

.notice-body {
    color: #856404;
    font-size: 13px;
    line-height: 1.6;
}

.notice-body ul {
    margin: 8px 0;
    padding-left: 20px;
}

.notice-body li {
    margin: 4px 0;
}

.notice-body code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
    color: #667eea;
}

.notice-hint {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ffc107;
    font-style: italic;
}

.notice-hint a {
    color: #667eea;
    text-decoration: underline;
}

.notice-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 24px;
    color: #856404;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}

.notice-close:hover {
    color: #533f03;
}


.type-header {
    padding: 12px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    transition: background-color 0.2s;
}

.type-header:hover {
    background: #f6f8fa;
}

.type-header .expand-icon {
    font-size: 10px;
    width: 14px;
    padding-top: 2px;
}

.type-info {
    flex: 1;
}

.type-name {
    font-weight: 600;
    color: #24292e;
    font-size: 14px;
    margin-bottom: 4px;
}

.type-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #586069;
    margin-bottom: 4px;
}

.type-description {
    font-size: 13px;
    color: #586069;
}

.type-details {
    border-top: 1px solid #e1e4e8;
    padding: 16px;
    background: #f6f8fa;
}

.cddl-viewer {
    margin-bottom: 16px;
}

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

.cddl-header strong {
    font-size: 13px;
    color: #24292e;
}

.copy-cddl-btn {
    padding: 4px 8px;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-cddl-btn:hover {
    background: #e1e4e8;
}

.cddl-code {
    background: white;
    padding: 12px;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre;
}

.cddl-keyword {
    color: #0066cc;
    font-weight: 600;
}

.cddl-type {
    color: #008800;
}

.cddl-comment {
    color: #808080;
    font-style: italic;
}

.cddl-number {
    color: #cc6600;
}

.cddl-tag {
    color: #9900cc;
    font-weight: 600;
}

.cddl-tag-ref {
    color: #0066cc;
    font-weight: 600;
}

.cddl-tag-ref.clickable {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    transition: color 0.2s, background-color 0.2s;
}

.cddl-tag-ref.clickable:hover {
    color: #0052a3;
    background-color: #e3f2fd;
    text-decoration-style: solid;
}

.doc-link {
    margin-top: 12px;
}

.doc-link a {
    color: #0066cc;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.doc-link a:hover {
    color: #004499;
    text-decoration: underline;
}

.empty-state {
    text-align: center;
    color: #586069;
    padding: 40px;
    font-size: 14px;
}

/* Registry Item UI Styles */
#registry-item-ui {
    animation: fadeIn 0.3s ease-in;
}

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

.registry-panel {
    background: #f6f8fa;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

/* Registry Layout - Two Columns for Top Row */
.registry-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 968px) {
    .registry-top-row {
        grid-template-columns: 1fr;
    }
}

/* Property Inspector - Full Width */
.property-inspector-wide {
    width: 100%;
}

.inspector-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inspector-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.copy-option-btn.compact {
    padding: 6px 12px;
    font-size: 12px;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.copy-option-btn.compact:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.panel-header {
    font-weight: 600;
    color: #24292e;
    margin-bottom: 12px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Console Hints Panel */
.console-hints-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hint-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e1e4e8;
}

.hint-code {
    flex: 1;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 12px;
    color: #0066cc;
    background: #f6f8fa;
    padding: 4px 8px;
    border-radius: 4px;
}

.copy-hint-btn {
    padding: 4px 8px;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-hint-btn:hover {
    background: #e1e4e8;
    border-color: #667eea;
}

/* Tree View Panel */
.tree-view-content {
    background: white;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #e1e4e8;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.8;
    max-height: 600px;
    overflow-y: auto;
    min-height: 200px;
}

.property-inspector-wide .tree-view-content {
    max-height: 800px;
}

.tree-node {
    display: block;
    margin: 4px 0;
}

.tree-node-header {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
    transition: background-color 0.2s;
    gap: 6px;
}

.tree-node-header:hover {
    background: #f6f8fa;
}

/* Tree Section Headers */
.tree-section {
    margin-bottom: 16px;
}

.tree-section-header {
    font-weight: 600;
    color: #24292e;
    font-size: 13px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e1e4e8;
}

/* Tree Methods Grid */
.tree-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.tree-method-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    text-align: left;
}

.tree-method-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.tree-method-btn .method-icon {
    font-size: 14px;
}

.tree-method-btn .method-name {
    flex: 1;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-weight: 500;
}

.tree-method-btn .method-badge {
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
    background: #e1e4e8;
    color: #586069;
    font-weight: 600;
    text-transform: uppercase;
}

.tree-method-btn:hover .method-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.tree-method-btn .method-badge.type-specific {
    background: #dbedff;
    color: #0366d6;
}

.tree-method-btn:hover .method-badge.type-specific {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.tree-expand-icon {
    display: inline-block;
    width: 14px;
    font-size: 10px;
    color: #586069;
    user-select: none;
}

/* Tree Function Nodes (Clickable Functions) */
.tree-node-function {
    margin: 4px 0;
}

.tree-function-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    border: 1px solid #e1e4e8;
}

.tree-function-header:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateX(2px);
}

.tree-function-icon {
    font-size: 12px;
    transition: all 0.2s;
}

.tree-function-header:hover .tree-function-icon {
    transform: scale(1.1);
}

.tree-function-header:hover .tree-key {
    color: white;
}

.tree-function-header:hover .tree-type {
    color: rgba(255, 255, 255, 0.8);
}

/* Function Result Display */
.tree-function-result {
    background: #f6f8fa;
    border-left: 3px solid #667eea;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 4px;
    animation: slideDown 0.3s ease-out;
}

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

.tree-function-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12px;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.tree-function-result-header:hover {
    background: rgba(102, 126, 234, 0.1);
}

.tree-function-result-header .result-toggle-icon {
    color: #667eea;
    font-size: 10px;
    font-weight: bold;
    transition: transform 0.2s;
}

.tree-function-result-header .result-toggle-icon:hover {
    transform: scale(1.2);
}

.tree-function-result-header .result-icon {
    color: #10b981;
    font-size: 14px;
}

.tree-function-result-header .result-label {
    color: #586069;
    font-weight: 600;
}

.tree-function-result-header .result-type {
    color: #667eea;
    font-size: 11px;
    background: #e1e4e8;
    padding: 2px 6px;
    border-radius: 3px;
}

.tree-function-result-value {
    background: white;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #e1e4e8;
    font-size: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.tree-key {
    color: #0066cc;
    font-weight: 600;
    margin-right: 6px;
}

.tree-type {
    color: #586069;
    font-size: 11px;
    margin-left: 6px;
}

/* Registry Type Tags */
.registry-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.registry-type-tag .tag-badge {
    background: #667eea;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

.registry-type-tag .ur-type {
    background: #e1e4e8;
    color: #0066cc;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

/* Inspector Controls */
.inspector-controls input[type="checkbox"] {
    cursor: pointer;
    width: 14px;
    height: 14px;
}

.inspector-controls label {
    font-weight: 500;
    color: #24292e;
}

.inspector-controls label:hover {
    color: #667eea;
}

.tree-value {
    color: #24292e;
}

.tree-value.string {
    color: #008800;
}

.tree-value.number {
    color: #cc6600;
}

.tree-value.boolean {
    color: #9900cc;
}

.tree-value.null {
    color: #808080;
    font-style: italic;
}

.tree-children {
    margin-left: 20px;
    padding-left: 12px;
    border-left: 1px solid #e1e4e8;
}

.tree-children.collapsed {
    display: none;
}

/* Methods Panel */
.methods-content {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e1e4e8;
}

.toggle-methods-btn {
    padding: 4px 12px;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-methods-btn:hover {
    background: #e1e4e8;
    border-color: #667eea;
}

.methods-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.method-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f6f8fa;
    border-radius: 6px;
    border: 1px solid #e1e4e8;
    transition: all 0.2s;
}

.method-item:hover {
    background: #e3f2fd;
    border-color: #667eea;
}

.method-name {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 13px;
    color: #0066cc;
    font-weight: 600;
}

.method-badge {
    padding: 2px 8px;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    font-size: 10px;
    color: #586069;
    text-transform: uppercase;
    font-weight: 600;
}

.method-badge.common {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.method-badge.type-specific {
    background: #e3f2fd;
    border-color: #90caf9;
    color: #0066cc;
}

.execute-method-btn {
    padding: 4px 8px;
    background: #28a745;
    color: white;
    border: 1px solid #28a745;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.execute-method-btn:hover {
    background: #218838;
    border-color: #1e7e34;
    transform: scale(1.05);
}

.copy-method-btn {
    padding: 4px 8px;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-method-btn:hover {
    background: #e1e4e8;
    border-color: #667eea;
}

.console-hint-message {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #856404;
    line-height: 1.6;
}

.console-hint-message .hint-header {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.console-hint-message .hint-body {
    font-size: 12px;
}

.console-hint-message .hint-body > p {
    margin-bottom: 12px;
}

.console-hint-message .docs-links,
.console-hint-message .console-examples {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #ffc107;
}

.console-hint-message .docs-links strong,
.console-hint-message .console-examples strong {
    display: block;
    margin-bottom: 6px;
    color: #533f03;
}

.console-hint-message ul {
    margin: 4px 0 0 20px;
    padding: 0;
    list-style: disc;
}

.console-hint-message li {
    margin: 4px 0;
}

.console-hint-message a {
    color: #667eea;
    text-decoration: underline;
    transition: color 0.2s;
}

.console-hint-message a:hover {
    color: #764ba2;
}

.console-hint-message code {
    background: #fff;
    border: 1px solid #ffc107;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 11px;
    color: #667eea;
    white-space: nowrap;
}

.console-hint-message kbd {
    background: #f6f8fa;
    border: 1px solid #d1d5da;
    border-radius: 3px;
    padding: 2px 6px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 11px;
    color: #24292e;
}


.method-tooltip {
    display: none;
    position: absolute;
    background: #24292e;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    pointer-events: none;
}

.method-tooltip.visible {
    display: block;
}

.method-tooltip-signature {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 11px;
    color: #90caf9;
    margin-bottom: 4px;
}

.method-tooltip-description {
    font-size: 12px;
    line-height: 1.4;
}

.type-methods-section {
    display: none;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e1e4e8;
}

.type-methods-section.visible {
    display: block;
}

/* Copy Options Panel */
.copy-options-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.copy-option-btn {
    padding: 10px 16px;
    background: white;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.copy-option-btn:hover {
    background: #f6f8fa;
    border-color: #667eea;
}

.copy-option-btn:active {
    transform: scale(0.98);
}

.copy-feedback {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 2000;
    animation: slideInUp 0.3s ease-out;
}

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

/* Method Result Containers (FR-042: Inline Execution) */
.method-result-container {
    margin: 12px 0 12px 20px;
    padding: 12px;
    background: #f6f8fa;
    border-left: 3px solid #10b981;
    border-radius: 4px;
    animation: slideIn 0.3s ease-out;
}

.method-result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #586069;
}

.result-label {
    font-weight: 600;
}

.result-type {
    background: #e1e4e8;
    padding: 2px 8px;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 11px;
    color: #0969da;
}

.method-result-value pre {
    background: white;
    padding: 8px;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
    color: #24292e;
    overflow-x: auto;
    max-height: 200px;
    overflow-y: auto;
}

.nested-tree-view {
    margin-top: 8px;
    padding-left: 12px;
    border-left: 2px solid #d1d5da;
}

/* Console Hint Containers (FR-043: Parameterized Methods) */
.console-hint-container {
    margin: 8px 0 8px 20px;
    animation: slideIn 0.3s ease-out;
}

.console-hint {
    background: #fff8e1;
    border: 1px solid #ffb300;
    border-radius: 6px;
    padding: 12px;
}

.hint-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.hint-icon {
    font-size: 16px;
}

.hint-text {
    color: #7c6100;
    font-weight: 600;
}

.hint-signature {
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
    color: #8b5cf6;
    border: 1px solid #e1e4e8;
}

.hint-code {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #e1e4e8;
}

.hint-code code {
    flex: 1;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
    color: #6366f1;
}

.copy-hint-btn {
    padding: 4px 8px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.copy-hint-btn:hover {
    background: #5568d3;
}

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

/* Type Drawer Styles (FR-045: Expandable Type Information) */
#type-drawer-panel .panel-header.clickable {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

#type-drawer-panel .panel-header.clickable:hover {
    background: #f6f8fa;
}

#type-drawer-icon {
    display: inline-block;
    transition: transform 0.2s;
    margin-right: 4px;
    font-size: 12px;
}

.type-drawer-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 1;
}

.type-drawer-content.collapsed {
    max-height: 0;
    opacity: 0;
}

.type-info-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f6f8fa;
    border-radius: 6px;
}

.type-info-row {
    display: contents;
}

.type-info-label {
    font-weight: 600;
    color: #586069;
    font-size: 12px;
}

.type-info-value {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
    color: #0969da;
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
}

.cddl-section {
    margin-top: 12px;
}

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

.cddl-title {
    font-weight: 600;
    color: #24292e;
    font-size: 13px;
}

.copy-cddl-btn-small {
    padding: 4px 8px;
    background: white;
    border: 1px solid #d1d5da;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-cddl-btn-small:hover {
    background: #f6f8fa;
    border-color: #667eea;
}

.cddl-code {
    background: #24292e;
    color: #e1e4e8;
    padding: 12px;
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 12px;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.5;
}

.cddl-keyword {
    color: #79c0ff;
}

.cddl-type {
    color: #7ee787;
}

.cddl-comment {
    color: #8b949e;
    font-style: italic;
}

.type-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.view-in-registry-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.view-in-registry-btn:hover {
    background: #5568d3;
}
