/* ===== URL LIST STYLES ===== */

/* Results info text */
.results-info {
    padding: 12px 15px;
    margin-bottom: 10px;
    background-color: var(--darkened-bg, rgba(121, 174, 200, 0.1));
    border-left: 3px solid var(--link-fg, #417690);
    border-radius: 3px;
    font-weight: bold;
    color: var(--body-fg, #333);
}

@media (prefers-color-scheme: dark) {
    .results-info {
        background-color: var(--darkened-bg, rgba(121, 174, 200, 0.15));
        border-left-color: var(--link-fg, #79aec8);
        color: var(--body-fg, #ddd);
    }
}

/* Pattern link styles */
.pattern-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: all 0.2s ease;
}

.pattern-link:hover {
    color: var(--link-fg, #417690);
}

.pattern-link:hover code {
    background-color: var(--link-fg, rgba(121, 174, 200, 0.2));
}

/* Namespace link styles */
.namespace-link {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease;
}

.namespace-link:hover {
    transform: scale(1.05);
}

.namespace-link .key-type-badge {
    cursor: pointer;
}

.namespace-link:hover .key-type-badge {
    opacity: 0.9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Dark mode support for pattern links */
@media (prefers-color-scheme: dark) {
    .pattern-link:hover {
        color: var(--link-fg, #79aec8);
    }

    .pattern-link:hover code {
        background-color: var(--link-fg, rgba(121, 174, 200, 0.3));
    }
}

/* Active filter badge styles */
.active-filters {
    margin-top: 15px;
    padding: 10px 15px;
    background-color: var(--darkened-bg, rgba(121, 174, 200, 0.1));
    border-left: 3px solid var(--link-fg, #417690);
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.filter-badge-active {
    background-color: var(--link-fg, #417690);
    color: white;
}

.filter-remove {
    color: white;
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    font-weight: bold;
    padding: 0 4px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.filter-remove:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

/* Dark mode support for active filters */
@media (prefers-color-scheme: dark) {
    .active-filters {
        background-color: var(--darkened-bg, rgba(121, 174, 200, 0.15));
        border-left-color: var(--link-fg, #79aec8);
    }

    .filter-badge-active {
        background-color: var(--link-fg, #79aec8);
    }
}

#result_list {
    width: 100%;
    border-collapse: collapse;
}

#result_list thead th {
    background-color: var(--darkened-bg, #f8f8f8);
    border-bottom: 2px solid var(--border-color, #ddd);
    padding: 10px;
    text-align: left;
    font-weight: bold;
}

#result_list tbody td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color, #eee);
    vertical-align: top;
}

#result_list tbody tr:hover {
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.02));
}

#result_list tbody tr.row1 {
    background-color: var(--body-bg, #fff);
}

#result_list tbody tr.row2 {
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.02));
}

#result_list code {
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.05));
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 12px;
    color: var(--body-fg, #333);
    word-break: break-all;
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--body-fg, #666);
    margin-bottom: 5px;
    font-weight: bold;
}

/* Dark mode support for URL list */
@media (prefers-color-scheme: dark) {
    #result_list thead th {
        background-color: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        border-bottom-color: var(--border-color, #555);
    }

    #result_list tbody td {
        border-bottom-color: var(--border-color, #444);
    }

    #result_list tbody tr:hover {
        background-color: var(--darkened-bg, rgba(255, 255, 255, 0.05));
    }

    #result_list tbody tr.row2 {
        background-color: var(--darkened-bg, rgba(255, 255, 255, 0.02));
    }

    #result_list code {
        background-color: var(--darkened-bg, rgba(255, 255, 255, 0.1));
        color: var(--body-fg, #ddd);
    }

    .stat-label {
        color: var(--body-fg, #aaa);
    }
}

/* ===== URL DETAIL PAGE STYLES ===== */

.url-detail-content {
    padding: 20px;
}

.detail-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color, #eee);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: bold;
    color: var(--body-fg, #666);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    display: flex;
    align-items: center;
    word-break: break-all;
}

.detail-code {
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.05));
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 13px;
    color: var(--body-fg, #333);
    display: inline-block;
    max-width: 100%;
    word-break: break-all;
}

.example-block {
    margin-bottom: 25px;
}

.example-block:last-child {
    margin-bottom: 0;
}

.example-block h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: var(--body-fg, #333);
}

.code-example {
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.05));
    padding: 15px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 13px;
    color: var(--body-fg, #333);
    overflow-x: auto;
    border: 1px solid var(--border-color, #ddd);
    margin: 0;
    line-height: 1.5;
}

.info-block {
    padding: 15px;
    background-color: var(--darkened-bg, rgba(121, 174, 200, 0.1));
    border-left: 3px solid var(--link-fg, #417690);
    border-radius: 3px;
}

.info-block p {
    margin: 0;
    line-height: 1.6;
    color: var(--body-fg, #333);
}

/* Dark mode support for detail page */
@media (prefers-color-scheme: dark) {
    .detail-row {
        border-bottom-color: var(--border-color, #444);
    }

    .detail-label {
        color: var(--body-fg, #aaa);
    }

    .detail-code {
        background-color: var(--darkened-bg, rgba(255, 255, 255, 0.1));
        color: var(--body-fg, #ddd);
    }

    .example-block h3 {
        color: var(--body-fg, #ddd);
    }

    .code-example {
        background-color: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        color: var(--body-fg, #ddd);
        border-color: var(--border-color, #555);
    }

    .info-block {
        background-color: var(--darkened-bg, rgba(121, 174, 200, 0.15));
        border-left-color: var(--link-fg, #79aec8);
    }

    .info-block p {
        color: var(--body-fg, #ddd);
    }
}

/* ===== KEY SEARCH PAGE STYLES ===== */

.key-search-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.key-search-page-header h1 {
    margin: 0;
    flex: 1;
}

.key-search-flush-form {
    margin: 0;
    flex-shrink: 0;
}

.flush-button {
    background-color: #ba2121 !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.flush-button:hover:not(:disabled) {
    background-color: #a41e1e !important;
}

.flush-button:disabled {
    background-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

/* Dark mode support for flush button */
@media (prefers-color-scheme: dark) {
    .flush-button {
        background-color: #cc2936 !important;
    }

    .flush-button:hover:not(:disabled) {
        background-color: #b02329 !important;
    }

    .flush-button:disabled {
        background-color: #555 !important;
        color: #999 !important;
    }
}

/* Table styles */
#result_list {
    width: 100%;
}

/* Icon styles */
.icon-yes img,
.icon-no img {
    width: 13px;
    height: 13px;
    margin-right: 4px;
    vertical-align: text-bottom;
}

.icon-yes {
    color: #30a030;
}

.icon-no {
    color: #ba2121;
}

/* Message list styles */
.messagelist {
    margin: 0 0 20px 0;
}

.messagelist .success,
.messagelist .error {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid;
}

.messagelist .success {
    background-color: var(--message-success-bg, #d4edda);
    color: var(--body-fg, #155724);
    border-color: var(--message-success-border, #c3e6cb);
}

.messagelist .error {
    background-color: var(--message-error-bg, #f8d7da);
    color: var(--message-error-fg, #721c24);
    border-color: var(--message-error-border, #f5c6cb);
}

.messagelist .warning {
    background-color: var(--message-warning-bg, #fff3cd);
    color: var(--message-warning-fg, #856404);
    border-color: var(--message-warning-border, #ffeeba);
}

/* ===== INSTANCE OVERVIEW STYLES ===== */

.instance-stats {
    padding-top: 15px;
    padding-bottom: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    margin-top: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid var(--border-color, #ddd);
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--link-fg, #417690);
}

.stat-value.stat-success {
    color: #30a030;
}

.stat-value.stat-warning {
    color: #e47911;
}

.stat-value.stat-disabled {
    color: #999;
}

.default-badge {
    background: var(--link-fg, #417690);
    color: var(--body-bg, white);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin-left: 5px;
}

.ttl-value {
    font-weight: bold;
    color: var(--link-fg, #417690);
}

/* ===== KEY SEARCH STYLES ===== */

.search-form {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color, #ddd);
}

.search-form .form-row {
    margin: 0;
}

.search-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.search-form .help {
    font-size: 11px;
    margin-top: 3px;
    opacity: 0.7;
}

/* Key type badges - used in both search and detail views */
.key-type {
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    color: white;
}

.key-type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    color: white;
}

/* Key type colors - consistent across templates */
.key-type-string {
    background-color: #28a745;
}

.key-type-list {
    background-color: #007bff;
}

.key-type-set {
    background-color: #ffc107;
}

.key-type-zset {
    background-color: #17a2b8;
}

.key-type-hash {
    background-color: #6f42c1;
}

.key-type-stream {
    background-color: #059669;
}

/* Alternative key type colors used in search view */
.key-search .key-type-string {
    background: #417690;
}

.key-search .key-type-list {
    background: #30a030;
}

.key-search .key-type-set {
    background: #e47911;
}

.key-search .key-type-zset {
    background: #7b68ee;
}

.key-search .key-type-hash {
    background: #dc2626;
}

/* ===== KEY DETAIL STYLES ===== */

.key-value-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.key-value-table th,
.key-value-table td {
    padding: 8px 12px;
    border: 1px solid var(--border-color, #ddd);
    text-align: left;
}

.key-value-table th {
    font-weight: bold;
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.05));
}

.key-value-table tbody tr:nth-child(even) {
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.02));
}

.key-value-table code {
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.05));
}

.string-value-field {
    width: 100%;
}

.readonly {
    padding: 8px 0;
}

.readonly code {
    padding: 4px 8px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.05));
}

.danger-zone {
    border: 2px solid #dc3545;
    border-radius: 4px;
    background-color: var(--error-bg, rgba(220, 53, 69, 0.1));
}

.danger-zone h2 {
    color: #dc3545;
}

.field-box {
    margin-bottom: 15px;
}

.submit-row {
    margin-top: 10px;
}

.key-value-display h3 {
    margin: 0 0 15px 0;
    opacity: 0.8;
}

/* Key Detail Page Styles */
.key-detail-delete-form {
    margin: 0;
}

.key-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.key-detail-header h1 {
    margin: 0;
}

/* Delete button styling to match Django admin */
.delete-button {
    background-color: #ba2121 !important;
    color: white !important;
    border-color: #ba2121 !important;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.delete-button:hover,
.delete-button:focus {
    background-color: #a41e1e !important;
    border-color: #a41e1e !important;
    color: white !important;
}

/* Disabled delete button styling */
.delete-button:disabled {
    background-color: #ba2121 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border-color: #ba2121 !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.delete-button:disabled:hover,
.delete-button:disabled:focus {
    background-color: #ba2121 !important;
    border-color: #ba2121 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 0.6 !important;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .delete-button {
        background-color: #cc2936 !important;
        border-color: #cc2936 !important;
    }

    .delete-button:hover,
    .delete-button:focus {
        background-color: #b02329 !important;
        border-color: #b02329 !important;
    }

    .delete-button:disabled {
        background-color: #cc2936 !important;
        border-color: #cc2936 !important;
        color: rgba(255, 255, 255, 0.6) !important;
        opacity: 0.6 !important;
    }

    .delete-button:disabled:hover,
    .delete-button:disabled:focus {
        background-color: #cc2936 !important;
        border-color: #cc2936 !important;
        color: rgba(255, 255, 255, 0.6) !important;
        opacity: 0.6 !important;
    }
}

/* Pagination Mode Indicator Styles */
.pagination-mode-indicator {
    margin-bottom: 10px;
}

.pagination-mode-indicator .badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pagination-mode-indicator .badge.cursor-mode {
    background-color: #2196F3;
    color: white;
}

.pagination-mode-indicator .badge.page-mode {
    background-color: #4CAF50;
    color: white;
}

/* Dark mode support for badges */
@media (prefers-color-scheme: dark) {
    .pagination-mode-indicator .badge.cursor-mode {
        background-color: #1976D2;
    }

    .pagination-mode-indicator .badge.page-mode {
        background-color: #388E3C;
    }

    /* Inline edit styles for dark mode */
    .inline-edit-input {
        border-color: #555;
        background-color: var(--darkened-bg, #2d2d2d);
        color: var(--body-fg, #fff);
    }

    .inline-edit-input:focus {
        border-color: #79aec8;
    }
}

/* Search Form Alignment Styles */
.search-form-row {
    margin-bottom: 15px;
}

.search-form-fields {
    display: flex;
    gap: 15px;
    align-items: end;
    margin-bottom: 5px;
}

.search-field-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.search-field-group label {
    font-weight: bold;
    color: #666;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 3px;
    white-space: nowrap;
}

.search-field-group input[type="text"],
.search-field-group select {
    height: 32px;
    box-sizing: border-box;
}

.search-field-group select {
    min-width: 80px;
    padding: 6px 8px;
}

.search-field-group input[type="submit"] {
    height: 32px;
    padding: 6px 15px;
    box-sizing: border-box;
}

.search-help {
    margin-left: 0;
    margin-top: 5px;
}

.search-help .help {
    margin: 0;
    color: #666;
    font-size: 11px;
    font-style: italic;
}

/* ===== INDEX PAGE ABILITIES STYLES ===== */

/* Ability indicators (checkmarks and dashes) */
.ability-indicator {
    font-size: 1.2em;
    display: inline-block;
}

.ability-supported {
    color: var(--link-fg, #417690);
}

.ability-unsupported {
    color: var(--border-color, #ccc);
}

/* Backend name display */
.backend-name {
    font-size: 0.9em;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.backend-error {
    color: #ba2121;
    font-size: 0.85em;
}

/* Abilities legend section */
.abilities-legend {
    margin-top: 20px;
    padding: 10px;
    background: var(--darkened-bg, #f8f8f8);
    border-left: 3px solid var(--link-fg, #417690);
    border-radius: 4px;
}

.abilities-legend-title {
    margin: 0 0 10px 0;
    font-weight: bold;
    color: var(--body-fg, #333);
}

.abilities-legend-list {
    margin: 0;
    padding-left: 20px;
    list-style: none;
    color: var(--body-fg, #333);
}

.abilities-legend-list li {
    margin-bottom: 5px;
}

.abilities-legend-list strong {
    color: var(--body-fg, #333);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ability-supported {
        color: var(--link-fg, #79aec8);
    }

    .ability-unsupported {
        color: var(--border-color, #555);
    }

    .abilities-legend {
        background: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        border-left-color: var(--link-fg, #79aec8);
    }

    .backend-error {
        color: #cc2936;
    }
}

/* ===== COLLECTION MEMBER DELETE STYLES ===== */

.delete-member-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 3px;
    color: #dc3545;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.delete-member-btn:hover:not(:disabled) {
    background-color: #dc3545;
    color: white;
    transform: scale(1.1);
}

.delete-member-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.delete-member-btn:disabled:hover {
    background: none;
    transform: none;
}

/* ===== INLINE EDIT STYLES ===== */

.inline-edit-input {
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 4px 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    background-color: var(--body-bg, #fff);
    color: var(--body-fg, #333);
    min-width: 100px;
}

.inline-edit-input:focus {
    outline: none;
    border-color: #79aec8;
    box-shadow: 0 0 0 2px rgba(121, 174, 200, 0.2);
}

.inline-edit-btn {
    background: #79aec8;
    border: none;
    border-radius: 3px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
}

.inline-edit-btn:hover:not(:disabled) {
    background-color: #5b9bd5;
    transform: scale(1.05);
}

.inline-edit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.inline-edit-btn:disabled:hover {
    background-color: #ccc;
    transform: none;
}

/* ===== URL TESTING INTERFACE STYLES ===== */

/* Swagger-like container */
.swagger-container {
    border: 1px solid var(--border-color, #d9d9d9);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.swagger-header {
    background: linear-gradient(to bottom, var(--darkened-bg, #fafafa), var(--body-bg, #fff));
    border-bottom: 1px solid var(--border-color, #e8e8e8);
    padding: 16px 20px !important;
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--body-fg, #3b4151) !important;
}

.swagger-content {
    padding: 0 !important;
}

.test-interface {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.test-row {
    background: var(--body-bg, #fff);
    padding: 20px;
    transition: all 0.3s ease;
}

/* Send Request Button */
.send-request-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    background-color: #61affe;
    border: 2px solid #61affe;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.send-request-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

.send-request-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.send-request-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-request-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(97, 175, 254, 0.3);
}

.test-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.test-input-group label {
    font-weight: 600;
    color: var(--body-fg, #3b4151);
    font-size: 13px;
    margin-bottom: 4px;
}

/* Method + URL Input - Swagger UI style */
.method-url-input {
    display: flex;
    gap: 0;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.method-url-input:focus-within {
    border-color: var(--link-fg, #4990e2);
    box-shadow: 0 0 0 3px rgba(73, 144, 226, 0.1);
}

.test-method-select {
    border: none;
    border-right: 1px solid var(--border-color, #d9d9d9);
    background-color: var(--darkened-bg, #fafafa);
    font-weight: 700;
    font-size: 13px;
    min-width: 110px;
    cursor: pointer;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: auto;
}

.test-method-select option {
    background: var(--body-bg, #fff);
    color: var(--body-fg, #333);
}

.test-url-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 14px;
    background-color: var(--body-bg, #fff);
    color: var(--body-fg, #3b4151);
    line-height: 1.5;
}

.test-url-input[readonly] {
    background-color: var(--darkened-bg, #f5f5f5);
    cursor: default;
    color: var(--body-fg, #6b7280);
}

.test-url-input:focus,
.test-method-select:focus {
    outline: none;
}

/* Dynamic method colors */
.test-method-select {
    background-color: #61affe;
}

.test-method-select[value="GET"] {
    background-color: #61affe;
}

.test-method-select[value="POST"] {
    background-color: #49cc90;
}

.test-method-select[value="PUT"] {
    background-color: #fca130;
}

.test-method-select[value="PATCH"] {
    background-color: #50e3c2;
}

.test-method-select[value="DELETE"] {
    background-color: #f93e3e;
}

.test-method-select[value="HEAD"] {
    background-color: #9012fe;
}

.test-method-select[value="OPTIONS"] {
    background-color: #0d5aa7;
}

/* URL Parameters - Table style like Swagger */
.url-parameters-list {
    display: grid;
    gap: 12px;
}

.url-param-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    align-items: center;
    padding: 12px;
    background-color: var(--darkened-bg, #fafafa);
    border-radius: 4px;
    border-left: 3px solid var(--link-fg, #4990e2);
}

.url-param-item label {
    font-size: 13px;
    font-weight: 600;
    color: var(--body-fg, #3b4151);
    margin: 0;
}

.url-param-item small {
    color: var(--body-fg, #6b7280);
    font-weight: 400;
    margin-left: 6px;
}

.url-param-input {
    padding: 10px 12px;
    border: 1px solid var(--border-color, #d9d9d9);
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 13px;
    background: var(--body-bg, #fff);
    transition: all 0.3s ease;
}

.url-param-input:focus {
    outline: none;
    border-color: var(--link-fg, #4990e2);
    box-shadow: 0 0 0 3px rgba(73, 144, 226, 0.1);
}

/* Authentication - Swagger style */
.auth-inputs {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    align-items: center;
}

.auth-type-select {
    border: 1px solid var(--border-color, #d9d9d9);
    border-radius: 4px;
    background-color: var(--body-bg, #fff);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-type-select:focus {
    outline: none;
    border-color: var(--link-fg, #4990e2);
    box-shadow: 0 0 0 3px rgba(73, 144, 226, 0.1);
}

.auth-value-input {
    padding: 10px 12px;
    border: 1px solid var(--border-color, #d9d9d9);
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 13px;
    transition: all 0.3s ease;
}

.auth-value-input:focus {
    outline: none;
    border-color: var(--link-fg, #4990e2);
    box-shadow: 0 0 0 3px rgba(73, 144, 226, 0.1);
}

.auth-value-input:disabled {
    background-color: var(--darkened-bg, #f5f5f5);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Headers - Swagger table style */
.headers-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.header-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    background-color: var(--darkened-bg, #fafafa);
    border-radius: 4px;
}

.header-key,
.header-value {
    padding: 10px 12px;
    border: 1px solid var(--border-color, #d9d9d9);
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    background: var(--body-bg, #fff);
    transition: all 0.3s ease;
}

.header-key:focus,
.header-value:focus {
    outline: none;
    border-color: var(--link-fg, #4990e2);
    box-shadow: 0 0 0 3px rgba(73, 144, 226, 0.1);
}

.remove-header-btn {
    padding: 8px 12px;
    border: none;
    background: none;
    color: #f93e3e;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: bold;
}

.remove-header-btn:hover {
    background-color: #f93e3e;
    color: white;
}

.add-header-btn {
    padding: 10px 16px;
    border: 1px solid var(--border-color, #d9d9d9);
    background: var(--body-bg, #fff);
    color: var(--link-fg, #4990e2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    width: fit-content;
    margin-top: 8px;
}

.add-header-btn:hover {
    background-color: var(--darkened-bg, #f5f5f5);
    border-color: var(--link-fg, #4990e2);
}

/* Request Body - Code editor style */
.request-body-textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 1px solid var(--border-color, #d9d9d9);
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    background-color: var(--darkened-bg, #fafafa);
    color: var(--body-fg, #3b4151);
    transition: all 0.3s ease;
}

.request-body-textarea:focus {
    outline: none;
    border-color: var(--link-fg, #4990e2);
    box-shadow: 0 0 0 3px rgba(73, 144, 226, 0.1);
    background-color: var(--body-bg, #fff);
}

.body-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.format-json-btn,
.generate-sample-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color, #d9d9d9);
    background-color: var(--body-bg, #fff);
    color: var(--link-fg, #4990e2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.format-json-btn:hover,
.generate-sample-btn:hover {
    background-color: var(--link-fg, #4990e2);
    color: white;
    border-color: var(--link-fg, #4990e2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* cURL Command Display */
.curl-display {
    background-color: var(--darkened-bg, #f5f5f5);
    border: 1px solid var(--border-color, #d9d9d9);
    border-radius: 4px;
    overflow: hidden;
}

.curl-command {
    padding: 16px;
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: var(--body-fg, #333);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.curl-copy-icon {
    display: inline-block;
    margin-left: 8px;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
    user-select: none;
}

.curl-copy-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.curl-copy-icon:active {
    transform: scale(0.95);
}

.curl-copy-feedback {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--link-fg, #417690);
    opacity: 0;
    transition: opacity 0.8s ease-out;
    pointer-events: none;
}

.curl-copy-feedback.show {
    opacity: 1;
    transition: opacity 0.2s ease-in;
}

.curl-copy-feedback.error {
    color: #f5222d;
}

/* Action Buttons */
.actions-row {
    padding: 0;
    background: var(--darkened-bg, #fafafa);
    border-bottom: none;
}

/* Response Display - Swagger style */
.response-container {
    border: 1px solid var(--border-color, #d9d9d9);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.response-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: var(--darkened-bg, #fafafa);
    border-bottom: 1px solid var(--border-color, #e8e8e8);
}

.response-status {
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.status-success {
    background-color: #e7f7ef;
    color: #00a854;
    border: 1px solid #00a854;
}

.status-error {
    background-color: #fff2f0;
    color: #f5222d;
    border: 1px solid #f5222d;
}

.status-info {
    background-color: #e6f7ff;
    color: #1890ff;
    border: 1px solid #1890ff;
}

.response-time {
    color: var(--body-fg, #6b7280);
    font-size: 13px;
    font-weight: 600;
}

.response-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color, #e8e8e8);
    background-color: var(--body-bg, #fff);
}

.response-tab {
    padding: 14px 24px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--body-fg, #6b7280);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.response-tab:hover {
    color: var(--link-fg, #4990e2);
    background-color: var(--darkened-bg, #fafafa);
}

.response-tab.active {
    color: var(--link-fg, #4990e2);
    border-bottom-color: var(--link-fg, #4990e2);
    background-color: var(--body-bg, #fff);
}

.response-body,
.response-headers {
    padding: 20px;
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.8;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    background-color: var(--darkened-bg, #fafafa);
    color: var(--body-fg, #3b4151);
}

/* HTTP Method Badges - Swagger colors */
.http-methods-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.http-method-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.http-method-get {
    background-color: #61affe;
}

.http-method-post {
    background-color: #49cc90;
}

.http-method-put {
    background-color: #fca130;
}

.http-method-patch {
    background-color: #50e3c2;
}

.http-method-delete {
    background-color: #f93e3e;
}

.http-method-head {
    background-color: #9012fe;
}

.http-method-options {
    background-color: #0d5aa7;
}

/* Serializer Fields Table - Swagger style */
.serializer-fields {
    margin-top: 24px;
}

.serializer-fields h3 {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--body-fg, #3b4151);
}

.serializer-fields-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border-color, #d9d9d9);
    border-radius: 4px;
    overflow: hidden;
}

.serializer-fields-table th,
.serializer-fields-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color, #e8e8e8);
}

.serializer-fields-table th {
    background-color: var(--darkened-bg, #fafafa);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--body-fg, #6b7280);
}

.serializer-fields-table tbody tr {
    transition: background-color 0.2s ease;
}

.serializer-fields-table tbody tr:hover {
    background-color: var(--darkened-bg, #fafafa);
}

.serializer-fields-table tbody tr:last-child td {
    border-bottom: none;
}

.serializer-fields-table td {
    font-size: 13px;
    color: var(--body-fg, #3b4151);
}

.serializer-fields-table code {
    padding: 3px 8px;
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.05));
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 12px;
    color: #c7254e;
    border: 1px solid rgba(199, 37, 78, 0.1);
}

.field-type-badge {
    display: inline-block;
    padding: 4px 10px;
    background-color: #6f42c1;
    color: white;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Field checkmarks for Required and Read Only columns */
.field-check-cell {
    text-align: center;
    vertical-align: middle;
}

.field-checkmark {
    display: inline-block;
    color: #49cc90;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}

/* Dark mode support for testing interface - Swagger dark theme */
@media (prefers-color-scheme: dark) {
    .swagger-container {
        border-color: var(--border-color, #3a3a3a);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .swagger-header {
        background: linear-gradient(to bottom, var(--darkened-bg, #252525), var(--body-bg, #1f1f1f));
        border-bottom-color: var(--border-color, #3a3a3a);
        color: var(--body-fg, #d4d4d4) !important;
    }

    .test-row {
        background: var(--body-bg, #1f1f1f);
        border-bottom-color: var(--border-color, #3a3a3a);
    }

    .send-request-btn:focus {
        box-shadow: 0 0 0 3px rgba(97, 175, 254, 0.5);
    }

    .test-input-group label {
        color: var(--body-fg, #d4d4d4);
    }

    .method-url-input {
        border-color: var(--border-color, #3a3a3a);
        background-color: var(--body-bg, #1f1f1f);
    }

    .method-url-input:focus-within {
        border-color: var(--link-fg, #4990e2);
        box-shadow: 0 0 0 3px rgba(73, 144, 226, 0.2);
    }

    .test-method-select {
        background-color: var(--darkened-bg, #2a2a2a);
        border-right-color: var(--border-color, #3a3a3a);
    }

    .test-url-input,
    .url-param-input,
    .auth-type-select,
    .auth-value-input,
    .header-key,
    .header-value,
    .request-body-textarea {
        background-color: var(--body-bg, #1f1f1f);
        color: var(--body-fg, #d4d4d4);
        border-color: var(--border-color, #3a3a3a);
    }
    
    .test-url-input[readonly] {
        background-color: var(--darkened-bg, #252525);
        color: var(--body-fg, #9ca3af);
    }

    .url-param-input:focus,
    .auth-type-select:focus,
    .auth-value-input:focus,
    .header-key:focus,
    .header-value:focus,
    .request-body-textarea:focus {
        border-color: var(--link-fg, #4990e2);
        box-shadow: 0 0 0 3px rgba(73, 144, 226, 0.2);
        background-color: var(--body-bg, #252525);
    }

    .url-param-item,
    .header-row {
        background-color: var(--darkened-bg, #252525);
        border-left-color: var(--link-fg, #4990e2);
    }

    .auth-value-input:disabled {
        background-color: var(--darkened-bg, #1a1a1a);
    }

    .add-header-btn,
    .format-json-btn,
    .generate-sample-btn {
        background-color: var(--body-bg, #1f1f1f);
        color: var(--link-fg, #4990e2);
        border-color: var(--border-color, #3a3a3a);
    }

    .add-header-btn:hover,
    .format-json-btn:hover,
    .generate-sample-btn:hover {
        background-color: var(--link-fg, #4990e2);
        color: #1f1f1f;
        border-color: var(--link-fg, #4990e2);
    }

    .curl-display {
        background-color: var(--darkened-bg, #1a1a1a);
        border-color: var(--border-color, #3a3a3a);
    }

    .curl-command {
        color: var(--body-fg, #d4d4d4);
    }
    
    .curl-copy-icon {
        opacity: 0.6;
    }
    
    .curl-copy-icon:hover {
        opacity: 1;
    }
    
    .curl-copy-feedback {
        color: var(--link-fg, #79aec8);
    }
    
    .curl-copy-feedback.error {
        color: #ff4d4f;
    }

    .actions-row {
        background: var(--darkened-bg, #252525);
    }

    .response-container {
        border-color: var(--border-color, #3a3a3a);
    }

    .response-meta {
        background-color: var(--darkened-bg, #252525);
        border-bottom-color: var(--border-color, #3a3a3a);
    }

    .response-tabs {
        background-color: var(--body-bg, #1f1f1f);
        border-bottom-color: var(--border-color, #3a3a3a);
    }

    .response-tab {
        color: var(--body-fg, #9ca3af);
    }

    .response-tab:hover {
        background-color: var(--darkened-bg, #252525);
        color: var(--link-fg, #4990e2);
    }

    .response-tab.active {
        background-color: var(--body-bg, #1f1f1f);
        color: var(--link-fg, #4990e2);
    }

    .response-body,
    .response-headers {
        background-color: var(--darkened-bg, #252525);
        color: var(--body-fg, #d4d4d4);
    }

    .status-success {
        background-color: rgba(0, 168, 84, 0.15);
        color: #52c41a;
        border-color: #52c41a;
    }

    .status-error {
        background-color: rgba(245, 34, 45, 0.15);
        color: #ff4d4f;
        border-color: #ff4d4f;
    }

    .status-info {
        background-color: rgba(24, 144, 255, 0.15);
        color: #40a9ff;
        border-color: #40a9ff;
    }

    .serializer-fields h3 {
        color: var(--body-fg, #d4d4d4);
    }

    .serializer-fields-table {
        border-color: var(--border-color, #3a3a3a);
    }

    .serializer-fields-table th {
        background-color: var(--darkened-bg, #252525);
        color: var(--body-fg, #9ca3af);
    }

    .serializer-fields-table td {
        border-bottom-color: var(--border-color, #3a3a3a);
        color: var(--body-fg, #d4d4d4);
    }

    .serializer-fields-table tbody tr:hover {
        background-color: var(--darkened-bg, #252525);
    }

    .serializer-fields-table code {
        background-color: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        border-color: rgba(255, 255, 255, 0.1);
        color: #ff7b89;
    }

    .field-checkmark {
        color: #52c41a;
    }
}
