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

:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --border-color: #e0e0e0;
    --hover-color: #f5f5f5;
    --accent-color: #666666;
    --editor-bg: #fafafa;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #e0e0e0;
        --border-color: #333333;
        --hover-color: #2a2a2a;
        --accent-color: #999999;
        --editor-bg: #252525;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.container {
    width: 100%;
}

header {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--text-color);
}

nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.2s, color 0.2s;
    cursor: pointer;
}

nav a:hover {
    opacity: 0.7;
}

nav a.nav-link.active {
    color: var(--text-color);
    font-weight: 500;
    opacity: 1;
}

.iosim-placeholder {
    padding: 2rem;
    text-align: center;
    color: #666;
}

/* iosim.js Styles */
.iosim-content {
    padding: 1rem;
}

.iosim-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.iosim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.iosim-header h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
}

.iosim-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--accent-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    display: inline-block;
}

.iosim-device-selector {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.iosim-device-selector label {
    font-size: 0.875rem;
    color: var(--text-color);
}

.iosim-device-detected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 4px;
    font-size: 0.75rem;
}

.iosim-detected-label {
    color: var(--text-color);
    opacity: 0.7;
}

.iosim-detected-value {
    color: #10B981;
    font-weight: 500;
}

.iosim-url-input-group,
.iosim-repo-selector {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.iosim-url-input-group label,
.iosim-repo-selector label {
    font-size: 0.875rem;
    color: var(--text-color);
    min-width: 120px;
}

.iosim-url-input-wrapper {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.iosim-url-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    font-family: monospace;
}

.iosim-url-input:hover {
    border-color: var(--accent-color);
}

.iosim-url-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.iosim-preview-info {
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--editor-bg);
    border-radius: 4px;
    font-size: 0.75rem;
}

.iosim-select {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
}

.iosim-select:hover {
    border-color: var(--accent-color);
}

.iosim-select optgroup {
    font-weight: 600;
    color: var(--text-color);
    background: var(--bg-color);
}

.iosim-select option {
    padding: 0.5rem;
    background: var(--bg-color);
    color: var(--text-color);
}

.iosim-btn {
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.iosim-btn:hover {
    opacity: 0.8;
}

.iosim-btn-small {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

.iosim-preview {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--editor-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 1rem;
}

.iosim-placeholder {
    text-align: center;
    color: var(--accent-color);
}

.iosim-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.iosim-device-frame {
    background: linear-gradient(135deg, #1a1a2e 0%, #0a0a15 100%);
    border-radius: 24px;
    padding: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

.iosim-device-frame.iosim-xr-frame {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 50%, #1a1a2e 100%);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4), 0 0 40px rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.iosim-device-screen {
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.iosim-device-screen.iosim-xr-screen {
    background: linear-gradient(135deg, #000 0%, #0a0a15 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: inset 0 0 30px rgba(102, 126, 234, 0.1);
}

.iosim-device-content {
    background: var(--bg-color);
    overflow: hidden;
}

.iosim-terminal {
    background: var(--editor-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.iosim-terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    font-weight: 500;
}

.iosim-terminal-output {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.75rem;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    background: var(--bg-color);
}

.iosim-terminal-line {
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.iosim-terminal-prompt {
    color: var(--accent-color);
}

.iosim-terminal-info {
    color: var(--accent-color);
    opacity: 0.7;
}

.iosim-terminal-error {
    color: #ff3333;
}

.iosim-terminal-input {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

.iosim-terminal-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
}

.iosim-sync-info {
    display: flex;
    gap: 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--accent-color);
    flex-wrap: wrap;
    align-items: center;
}

.iosim-sync-status,
.iosim-device-info {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.iosim-device-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.iosim-device-address-input {
    flex: 1;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.7rem;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    min-width: 0;
}

.iosim-show-qr-btn {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.iosim-show-qr-btn:hover {
    background: var(--hover-color);
    border-color: var(--accent-color);
}

.iosim-device-qr-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    flex-direction: column;
    width: 100%;
    margin-top: 0.5rem;
}

.iosim-device-qr {
    width: 120px;
    height: 120px;
    border-radius: 4px;
    background: white;
    display: block;
}

.iosim-device-qr-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.iosim-qr-btn {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.iosim-qr-btn:hover {
    background: var(--hover-color);
    border-color: var(--accent-color);
}

.iosim-qr-btn:active {
    transform: scale(0.98);
}

.iosim-code {
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    background: var(--editor-bg);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

.iosim-terminal-support {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.iosim-terminal-support-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    user-select: none;
}

.iosim-terminal-support-header:hover {
    background: var(--hover-color);
}

.iosim-terminal-support-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.iosim-copy-btn {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.iosim-copy-btn:hover {
    background: var(--hover-color);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

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

.iosim-toggle-icon {
    font-size: 0.75rem;
    transition: transform 0.2s;
    color: var(--accent-color);
}

.iosim-terminal-support-content {
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--editor-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    max-height: 600px;
    overflow-y: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.iosim-feature-section {
    margin-bottom: 1.5rem;
}

.iosim-feature-section:last-child {
    margin-bottom: 0;
}

.iosim-feature-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--text-color);
}

.iosim-feature-section p {
    margin: 0.5rem 0;
    color: var(--text-color);
}

.iosim-feature-section ul {
    margin: 0.5rem 0 0.75rem 1.5rem;
    padding: 0;
    list-style-type: disc;
}

.iosim-feature-section li {
    margin: 0.25rem 0;
    color: var(--text-color);
}

.iosim-feature-section code {
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    background: var(--bg-color);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.85em;
    color: var(--accent-color);
    border: 1px solid var(--border-color);
}

.iosim-code-block {
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-color);
    white-space: pre-wrap;
    word-break: break-word;
}

.iosim-code-block code {
    background: transparent;
    padding: 0;
    border: none;
    font-size: inherit;
    color: inherit;
}

/* Map Viewer Styles */
.map-controls {
    margin-bottom: 1rem;
}

.map-toolbar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.map-search {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
}

.map-provider-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
}

.map-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.map-btn:hover {
    background: var(--hover-color);
}

.map-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    position: relative;
    z-index: 100;
    pointer-events: auto;
    background: var(--bg-color);
    padding: 0.5rem;
    border-radius: 4px;
}

.map-info-buttons {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 101;
    pointer-events: auto;
}

.map-layer-toggles {
    display: flex;
    gap: 0.25rem;
    padding-right: 0.5rem;
    border-right: 1px solid var(--border-color);
    position: relative;
    z-index: 102;
    pointer-events: auto;
}

.map-btn-small {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.2;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
    z-index: 10;
}

.map-btn-small:hover {
    background: var(--hover-color);
    transform: scale(1.05);
}

.map-btn-small:active {
    transform: scale(0.95);
    opacity: 0.8;
}

.map-btn-small.active {
    background: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Quest-specific touch improvements */
@media (pointer: coarse) {
    .map-btn-small {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-width: 48px;
        min-height: 48px;
    }
}

.map-container {
    width: 100%;
    height: 500px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

/* Cesium viewer styling */
.map-container .cesium-viewer {
    width: 100%;
    height: 100%;
}

.map-container .cesium-widget {
    width: 100%;
    height: 100%;
}

.map-container .cesium-widget canvas {
    width: 100% !important;
    height: 100% !important;
}
    background: var(--editor-bg);
}

/* Leaflet overrides for dark mode compatibility */
@media (prefers-color-scheme: dark) {
    .leaflet-container {
        background: var(--bg-color);
    }
    
    .leaflet-popup-content-wrapper {
        background: var(--bg-color);
        color: var(--text-color);
    }
    
    .leaflet-popup-tip {
        background: var(--bg-color);
    }
}

@media (max-width: 768px) {
    .map-toolbar {
        flex-direction: column;
    }
    
    .map-search,
    .map-provider-select,
    .map-btn {
        width: 100%;
    }
    
    .map-container {
        height: 400px;
    }
}

main {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.content-area {
    position: relative;
    min-height: 400px;
}

.editor-section {
    margin-bottom: 2rem;
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.editor-section.active {
    display: block;
    position: relative;
}

.editor-container {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--editor-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.editor-container:hover {
    border-color: var(--border-color);
    box-shadow: 0 0 0 1px var(--border-color);
}

#editor {
    width: 100%;
    min-height: 400px;
    padding: 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: background-color 0.2s;
}

.editor-container:hover #editor {
    background-color: rgba(222, 222, 222, 0.02);
}

@media (prefers-color-scheme: dark) {
    .editor-container:hover #editor {
        background-color: rgba(222, 222, 222, 0.05);
    }
}

#editor::placeholder {
    color: #999;
    opacity: 0.6;
}

.editor-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
    font-size: 0.875rem;
    color: #666;
    flex-wrap: wrap;
}

/* Editor Format Controls */
.editor-format-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
    font-size: 0.875rem;
    color: #666;
    flex-wrap: wrap;
}

.separator {
    color: var(--border-color);
}

.share-btn,
.clear-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-color);
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.share-btn:hover,
.clear-btn:hover {
    background: var(--hover-color);
    border-color: var(--text-color);
    color: var(--text-color);
}

.share-btn:active,
.clear-btn:active {
    transform: scale(0.98);
}

.editor-info .separator:last-of-type {
    margin-left: auto;
}

.clear-btn {
    margin-left: 0;
}

.share-url-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.share-url-qr-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    flex-direction: column;
}

.share-url-qr {
    width: 120px;
    height: 120px;
    border-radius: 4px;
    background: white;
    display: block;
}

.share-url-qr-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.toggle-qr-btn {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.toggle-qr-btn:hover {
    background: var(--hover-color);
    border-color: var(--accent-color);
}

.toggle-qr-btn:active {
    transform: scale(0.98);
}

.share-url-input {
    flex: 1;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.75rem;
    font-family: monospace;
}

.copy-url-btn {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.copy-url-btn:hover {
    background: var(--hover-color);
}

.format-type-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.format-label {
    font-size: 0.875rem;
    color: #666;
}

.format-select {
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
    min-width: 120px;
}

.format-actions {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    margin-left: 390px;
    flex-shrink: 0;
    justify-content: flex-end;
}

.format-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-color);
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.format-convert-wrapper {
    position: relative;
    display: inline-block;
}

.format-convert-select {
    display: none;
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    padding: 0.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
    min-width: 220px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 0;
}

.format-convert-select.show {
    display: block;
}

.format-convert-select option {
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: block;
    transition: background-color 0.2s;
}

.format-convert-select option:hover,
.format-convert-select option:focus {
    background: var(--hover-color);
}

.format-convert-select option:first-child {
    font-weight: 500;
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.25rem;
    padding-bottom: 0.75rem;
}

.format-btn:hover {
    background: var(--hover-color);
    border-color: var(--text-color);
    color: var(--text-color);
}

.format-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    font-size: 0.875rem;
}

.detected-language {
    color: #666;
    font-style: italic;
}

.format-status {
    color: #666;
}

@media (max-width: 1024px) {
    .editor-info,
    .editor-format-controls {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    /* Hide editor info and format controls when typing on mobile */
    .editor-container:focus-within .editor-info,
    .editor-container:focus-within .editor-format-controls {
        display: none;
    }
    
    .editor-info,
    .editor-format-controls {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    
    .editor-format-controls {
        flex-wrap: wrap;
    }
    
    .format-type-selector {
        width: 100%;
    }
    
    .format-select {
        flex: 1;
    }
    
    .format-actions {
        margin-left: auto;
        width: auto;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .format-btn {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .format-info {
        margin-left: 0;
        width: 100%;
        margin-top: 0.5rem;
    }
}

.section:not(.collapsible) {
    margin-bottom: 2rem;
}

.section h2 {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Collapsible sections - hidden by default */
.section.collapsible {
    display: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.2s;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--editor-bg);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 400px;
}

.section.collapsible.active {
    display: block;
    position: relative;
}

.section.collapsible:hover {
    border-color: var(--border-color);
}

.section-header {
    cursor: pointer;
    user-select: none;
    padding: 0.5rem 0;
    margin-bottom: 0;
    transition: color 0.2s;
    position: relative;
    padding-left: 1.5rem;
}

.section-header::before {
    content: '+';
    position: absolute;
    left: 0;
    font-weight: 300;
    transition: transform 0.2s;
    color: var(--text-color);
}

.section.collapsible.active .section-header::before {
    content: '−';
}

.section-header:hover {
    color: var(--text-color);
}

.section-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, margin-top 0.3s ease-out;
    margin-top: 0;
}

.section.collapsible.active .section-content {
    max-height: 2000px;
    opacity: 1;
    margin-top: 1rem;
    padding-left: 1.5rem;
}

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

.section li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.section li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-color);
}

.section a {
    color: var(--text-color);
    text-decoration: none;
}

.section a:hover {
    text-decoration: underline;
}

/* News Feed Styles */
.feed-controls {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.feed-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.feed-content-types {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.75rem;
    background: var(--editor-bg);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.content-type-label {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
    margin-right: 0.5rem;
}

.content-type-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.content-type-toggle:hover {
    background: var(--hover-color);
}

.content-type-toggle input[type="checkbox"] {
    cursor: pointer;
}

.content-type-toggle:has(input:checked) {
    background: var(--hover-color);
    border-color: var(--text-color);
}

.feed-search {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
}

.feed-filter {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
}

.feed-refresh-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.feed-refresh-btn:hover {
    background: var(--hover-color);
}

.feed-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.feed-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
}

.feed-loading,
.feed-error,
.feed-empty {
    padding: 2rem;
    text-align: center;
    color: #666;
}

.feed-error-note {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    color: #999;
}

.feed-error-note code {
    background: var(--editor-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
}

.feed-article {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.feed-article:hover {
    border-color: var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feed-article-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: #666;
}

.feed-source {
    font-weight: 500;
    color: var(--text-color);
}

.feed-time {
    color: #999;
}

.feed-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
}

.feed-badge.breaking {
    background: #ff4444;
    color: white;
    margin-left: auto;
}

.feed-article-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.feed-article-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.feed-article-title a:hover {
    color: var(--text-color);
    opacity: 0.8;
}

.feed-article-description {
    color: #666;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.feed-article-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.feed-article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.feed-read-more {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: opacity 0.2s;
}

.feed-read-more:hover {
    opacity: 0.7;
}

.feed-category-tag {
    padding: 0.2rem 0.5rem;
    background: var(--editor-bg);
    border-radius: 3px;
    font-size: 0.7rem;
    color: #666;
    text-transform: capitalize;
}

.feed-live-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #EF4444;
    color: white;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.feed-summary-btn {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s;
    font-family: inherit;
}

.feed-summary-btn:hover {
    background: var(--hover-color);
    border-color: var(--accent-color);
}

.feed-summary-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

.feed-summary-content {
    background: var(--bg-color);
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

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

.feed-summary-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.feed-summary-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-color);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.feed-summary-close:hover {
    background: var(--hover-color);
    color: var(--accent-color);
}

.feed-summary-source-info {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--accent-color);
    flex-wrap: wrap;
}

.feed-summary-bias-chart {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--editor-bg);
    border-radius: 6px;
}

.feed-summary-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--text-color);
    line-height: 1.3;
}

.feed-summary-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
}

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

.feed-summary-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.video-badge {
    background: #8B5CF6;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
}

.feed-article-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.feed-article-link:hover {
    color: var(--accent-color);
}

.feed-video-container {
    margin: 0.75rem 0;
}

.feed-video-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--editor-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.feed-video-link:hover {
    background: var(--hover-color);
    border-color: var(--text-color);
}

.feed-video-icon {
    font-size: 1rem;
}

/* Bias Chart Styles */
.feed-bias-chart {
    margin: 0.75rem 0;
    padding: 0.75rem;
    background: var(--editor-bg);
    border-radius: 4px;
}

.bias-chart-container {
    position: relative;
    height: 24px;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    overflow: hidden;
}

.bias-scale {
    display: flex;
    height: 100%;
    width: 100%;
}

.bias-scale-left {
    flex: 1;
    background: linear-gradient(to right, #3B82F6, #60A5FA);
}

.bias-scale-center-left {
    flex: 1;
    background: linear-gradient(to right, #60A5FA, #93C5FD);
}

.bias-scale-center {
    flex: 1;
    background: linear-gradient(to right, #93C5FD, #FBBF24, #FB923C);
}

.bias-scale-center-right {
    flex: 1;
    background: linear-gradient(to right, #FB923C, #F87171);
}

.bias-scale-right {
    flex: 1;
    background: linear-gradient(to right, #F87171, #EF4444);
}

.bias-indicator {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.bias-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.bias-label {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reliability-score {
    color: #666;
    font-size: 0.7rem;
}

/* Social Feed Styles */
.social-controls {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.social-controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--editor-bg);
    cursor: pointer;
    user-select: none;
}

.social-controls-header h3 {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    color: var(--text-color);
}

.social-controls-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: transform 0.2s;
}

.social-controls-toggle:hover {
    opacity: 0.7;
}

.social-controls.collapsed .social-controls-toggle {
    transform: rotate(-90deg);
}

.social-controls-content {
    padding: 1rem;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    overflow: hidden;
}

.social-controls.collapsed .social-controls-content {
    max-height: 0;
    padding: 0 1rem;
    opacity: 0;
}

.social-curation {
    margin-bottom: 1rem;
}

.social-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-platform-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    transition: all 0.2s;
    font-size: 0.875rem;
}

.social-platform-toggle:hover {
    background: var(--hover-color);
}

.social-platform-toggle input[type="checkbox"] {
    cursor: pointer;
}

.social-settings {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-search {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
}

.social-filter {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
}

.social-refresh-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.social-refresh-btn:hover {
    background: var(--hover-color);
}

.social-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    margin-top: 1rem;
}

.social-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
}

.social-loading,
.social-empty {
    grid-column: 1 / -1;
    padding: 2rem;
    text-align: center;
    color: #666;
}

.social-post {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    background: var(--bg-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.social-post:hover {
    border-color: var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.social-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.social-post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-platform-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
}

.social-platform-badge.twitter {
    background: #1DA1F2;
    color: white;
}

.social-platform-badge.tiktok {
    background: #000000;
    color: white;
}

.social-platform-badge.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.social-platform-badge.reddit {
    background: #FF4500;
    color: white;
}

.social-platform-badge.youtube {
    background: #FF0000;
    color: white;
}

.social-username {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-color);
}

.social-post-time {
    font-size: 0.75rem;
    color: #999;
}

.social-post-content {
    margin-bottom: 0.75rem;
}

.social-video-placeholder {
    background: var(--editor-bg);
    border-radius: 4px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 0.75rem;
    color: #666;
}

.social-video-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.social-post-image {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.social-post-text {
    color: var(--text-color);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.social-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.social-engagement {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.social-view-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: opacity 0.2s;
}

.social-view-link:hover {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .social-feed {
        grid-template-columns: 1fr;
    }
    
    .social-platforms {
        flex-direction: column;
    }
    
    .social-settings {
        flex-direction: column;
    }
    
    .social-search {
        width: 100%;
    }
}

/* Custom Search Styles */
.search-controls {
    margin-bottom: 1.5rem;
}

.search-mode-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.search-mode-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.search-mode-option:hover {
    background: var(--hover-color);
}

.search-mode-option input[type="radio"] {
    cursor: pointer;
}

.search-mode-option input[type="radio"]:checked + span {
    font-weight: 500;
}

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

.search-query {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    margin-bottom: 0.75rem;
}

.search-query:focus {
    outline: none;
    border-color: var(--border-color);
    box-shadow: 0 0 0 1px var(--border-color);
}

.search-options {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.search-option {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
}

.search-option[type="number"] {
    width: 120px;
}

.search-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-btn,
.search-clear-btn,
.search-save-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.search-btn {
    background: var(--text-color);
    color: var(--bg-color);
    font-weight: 500;
}

.search-btn:hover {
    opacity: 0.9;
}

.search-clear-btn:hover,
.search-save-btn:hover {
    background: var(--hover-color);
}

.search-saved-queries {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--editor-bg);
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.search-label {
    color: #666;
    font-weight: 500;
}

.saved-queries-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.saved-query-item {
    padding: 0.25rem 0.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-color);
}

.saved-query-item:hover {
    background: var(--hover-color);
}

.no-saved {
    color: #999;
    font-style: italic;
}

.search-results {
    min-height: 200px;
}

.search-placeholder,
.search-loading,
.search-empty,
.search-error {
    padding: 2rem;
    text-align: center;
    color: #666;
}

.search-hint {
    font-size: 0.875rem;
    color: #999;
    margin-top: 0.5rem;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.search-results-count {
    font-size: 0.875rem;
    color: #666;
}

.search-mode-badge {
    padding: 0.2rem 0.5rem;
    background: var(--editor-bg);
    border-radius: 3px;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-color);
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-result {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-result:hover {
    border-color: var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.search-result-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    flex: 1;
}

.search-result-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

.search-result-title a:hover {
    opacity: 0.8;
}

.search-result-source {
    font-size: 0.75rem;
    color: #999;
    margin-left: 1rem;
}

.search-result-content {
    color: #666;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0.5rem 0;
}

.search-result-meta {
    display: inline-block;
    margin-right: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: var(--editor-bg);
    border-radius: 3px;
    font-size: 0.7rem;
    color: #666;
}

/* iosim.js Mobile Responsive Styles */
@media (max-width: 768px) {
    .iosim-device-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .iosim-select {
        width: 100%;
    }
    
    .iosim-sync-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .iosim-device-address {
        flex-direction: column;
        align-items: stretch;
    }
    
    .iosim-device-address-input {
        width: 100%;
    }
    
    .iosim-terminal-support-content {
        max-height: 400px;
        font-size: 0.8rem;
    }
    
    .iosim-code-block {
        font-size: 0.7rem;
        padding: 0.5rem;
    }
}

@media (max-width: 768px) {
    .search-mode-selector {
        flex-direction: column;
    }
    
    .search-options {
        flex-direction: column;
    }
    
    .search-option {
        width: 100%;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .search-btn,
    .search-clear-btn,
    .search-save-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    nav {
        gap: 1rem;
    }

    #editor {
        min-height: 300px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .editor-info {
        flex-wrap: wrap;
    }
    
    .editor-info .separator:last-of-type {
        margin-left: 0;
    }
    
    .share-btn,
    .clear-btn {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .share-url-display {
        flex-direction: column;
        margin-top: 0.75rem;
        width: 100%;
    }
    
    .share-url-input {
        width: 100%;
    }
    
    .copy-url-btn {
        width: 100%;
    }
}
