/**
 * Tool-specific styles
 * Custom styles for individual tool interfaces
 */

/* Common Tool Interface Styles */
.converter-interface,
.json-validator-interface,
.regex-tester-interface {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* JSON Validator Specific Styles (jsonlint.com style) */
.jsonlint-header {
    text-align: center;
    margin-bottom: 20px;
}

.jsonlint-header h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: #333;
    margin: 0;
}

.json-file-upload {
    margin-bottom: 20px;
}

.json-file-upload .upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s;
}

.json-file-upload .upload-area:hover {
    border-color: #007bff;
    background: #e7f3ff;
}

.json-file-upload .upload-area.dragover {
    border-color: #007bff;
    background: #e7f3ff;
}

.json-file-upload .upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.json-file-upload .upload-icon {
    font-size: 2rem;
}

.json-file-upload .upload-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.json-editor-container {
    margin-bottom: 30px;
}

.json-editor-wrapper {
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.json-editor {
    width: 100%;
    min-height: 400px;
    padding: 20px;
    border: none;
    font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background: #fff;
    color: #333;
}

.json-editor:focus {
    outline: none;
}

.json-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 0 5px;
}

.json-actions-bar .validation-status {
    flex: 1;
    margin-right: 15px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.json-actions-bar .action-buttons {
    display: flex;
    gap: 10px;
}

.format-options-panel {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.format-options-panel .format-options {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.formatted-output-section {
    margin-top: 20px;
}

.formatted-output-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #333;
}

.json-output {
    width: 100%;
    min-height: 300px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
    background: #fff;
    color: #333;
}

.json-output:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Split Panel Layout */
.split-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

/* Input/Output Panels */
.input-panel,
.output-panel {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.input-panel h3,
.output-panel h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #333;
}

.input-panel textarea,
.output-panel textarea {
    width: 100%;
    min-height: 300px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    resize: vertical;
    background: #fff;
}

.input-panel textarea:focus,
.output-panel textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Format Selector */
.format-selector {
    margin-bottom: 15px;
}

.format-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.format-selector select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

/* Conversion Controls */
.conversion-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.format-swap {
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 10px;
    transition: all 0.2s;
}

.format-swap:hover {
    background: #dee2e6;
    transform: rotate(180deg);
}

/* Output Actions */
.output-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #007bff;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.tab-content {
    display: none;
}

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

/* Validation Status */
.validation-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

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

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

.validation-status.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Format Options */
.format-options {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    align-items: center;
}

.format-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

/* Schema Results */
.schema-results,
.compare-results,
.replace-output {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.error-list,
.diff-list {
    margin: 10px 0;
    padding-left: 20px;
}

.error-list li,
.diff-list li {
    margin: 8px 0;
    line-height: 1.6;
}

.error-list code,
.diff-list code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

/* Regex Tester Specific */
.pattern-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.pattern-input-group {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.pattern-delimiter {
    font-size: 24px;
    font-weight: bold;
    color: #666;
}

#regex-pattern {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
}

.flags-checkboxes {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.flags-checkboxes label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    cursor: pointer;
}

.pattern-validation {
    margin-top: 10px;
    padding: 8px;
    border-radius: 4px;
    font-size: 13px;
}

.test-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.results-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.match-summary {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 500;
}

.matches {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.match-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
}

.match-header {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.match-text {
    background: #e9ecef;
    padding: 8px;
    border-radius: 4px;
    font-family: monospace;
    margin: 8px 0;
    word-break: break-all;
}

.match-groups {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

.match-groups .group {
    display: inline-block;
    background: #fff3cd;
    padding: 4px 8px;
    border-radius: 3px;
    margin: 4px;
    font-size: 13px;
    font-family: monospace;
}

.replace-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 15px;
}

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

.form-group input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Patterns Library */
.patterns-library {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.pattern-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pattern-name {
    font-weight: 500;
    color: #333;
}

.pattern-code {
    font-family: monospace;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 13px;
    margin-top: 5px;
}

.use-pattern-btn {
    flex-shrink: 0;
    margin-left: 15px;
}

/* Error Messages */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    border: 1px solid #f5c6cb;
}

/* Success Messages */
.success {
    color: #155724;
}

/* Warning Messages */
.warning {
    color: #856404;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Markdown Preview Interface */
.markdown-preview-interface {
    width: 100%;
}

.split-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.editor-panel,
.preview-panel {
    display: flex;
    flex-direction: column;
}

.editor-panel h3,
.preview-panel h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #333;
}

#markdown-input {
    width: 100%;
    min-height: 400px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background: #fff;
    color: #333;
    box-sizing: border-box;
}

/* Make editor-panel span full width so markdown-input is as wide as tool-container */
.tool-container .markdown-preview-interface .split-view .editor-panel {
    grid-column: 1 / -1;
}

.tool-container .markdown-preview-interface .split-view .preview-panel {
    grid-column: 1 / -1;
    margin-top: 20px;
}

#markdown-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.markdown-preview-content {
    min-height: 400px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    overflow-y: auto;
}

.action-section {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

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

/* Dark Mode - Regex Tester */
[data-theme="dark"] .pattern-section,
[data-theme="dark"] .test-section,
[data-theme="dark"] .results-section,
[data-theme="dark"] .replace-section,
[data-theme="dark"] .patterns-library {
    color: #e0e0e0;
}

[data-theme="dark"] .pattern-section h3,
[data-theme="dark"] .test-section h3,
[data-theme="dark"] .results-section h3,
[data-theme="dark"] .patterns-library h4 {
    color: #e0e0e0;
}

[data-theme="dark"] .pattern-section {
    background: #1a1a1a;
}

[data-theme="dark"] .pattern-delimiter {
    color: #999;
}

[data-theme="dark"] #regex-pattern,
[data-theme="dark"] #regex-flags {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] #regex-pattern:focus,
[data-theme="dark"] #regex-flags:focus {
    border-color: #18a058;
    box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.2);
}

[data-theme="dark"] .flags-checkboxes label {
    color: #e0e0e0;
}

[data-theme="dark"] .pattern-validation.success {
    background: #1a3a1a;
    color: #4caf50;
    border-color: #2d5a2d;
}

[data-theme="dark"] .pattern-validation.error {
    background: #3a1a1a;
    color: #f44336;
    border-color: #5a2d2d;
}

[data-theme="dark"] .test-section,
[data-theme="dark"] .replace-section,
[data-theme="dark"] .patterns-library {
    background: #1a1a1a;
}

[data-theme="dark"] #test-string {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] #test-string:focus {
    border-color: #18a058;
    box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.2);
}

[data-theme="dark"] .results-section {
    background: #1a1a1a;
}

[data-theme="dark"] .match-summary .success {
    color: #4caf50;
}

[data-theme="dark"] .match-summary .error {
    color: #f44336;
}

[data-theme="dark"] .match-summary .warning {
    color: #ff9800;
}

[data-theme="dark"] .match-item {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .match-header {
    color: #e0e0e0;
}

[data-theme="dark"] .match-text {
    background: #1a1a1a;
    color: #e0e0e0;
}

[data-theme="dark"] .match-groups {
    border-top-color: #444;
}

[data-theme="dark"] .match-groups .group {
    background: #3a3a1a;
    color: #ffeb3b;
}

[data-theme="dark"] .form-group label {
    color: #e0e0e0;
}

[data-theme="dark"] .form-group input[type="text"],
[data-theme="dark"] #replacement {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .form-group input[type="text"]:focus,
[data-theme="dark"] #replacement:focus {
    border-color: #18a058;
    box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.2);
}

[data-theme="dark"] #replace-output {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .pattern-item {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .pattern-name {
    color: #e0e0e0;
}

[data-theme="dark"] .pattern-code {
    background: #1a1a1a;
    color: #4caf50;
}

[data-theme="dark"] .tabs {
    border-bottom-color: #444;
}

[data-theme="dark"] .tab-btn {
    color: #999;
}

[data-theme="dark"] .tab-btn:hover {
    color: #18a058;
}

[data-theme="dark"] .tab-btn.active {
    color: #18a058;
    border-bottom-color: #18a058;
}

[data-theme="dark"] .validation-status.success {
    background: #1a3a1a;
    color: #4caf50;
    border-color: #2d5a2d;
}

[data-theme="dark"] .validation-status.error {
    background: #3a1a1a;
    color: #f44336;
    border-color: #5a2d2d;
}

[data-theme="dark"] .validation-status.warning {
    background: #3a3a1a;
    color: #ff9800;
    border-color: #5a5a2d;
}

/* Dark Mode - Code Formatter/Minifier */
[data-theme="dark"] .formatter-interface,
[data-theme="dark"] .minifier-interface,
[data-theme="dark"] .code-formatter-interface {
    color: #e0e0e0;
}

[data-theme="dark"] .input-panel,
[data-theme="dark"] .output-panel {
    background: #1a1a1a;
}

[data-theme="dark"] .input-panel h3,
[data-theme="dark"] .output-panel h3 {
    color: #e0e0e0;
}

[data-theme="dark"] .input-panel textarea,
[data-theme="dark"] .output-panel textarea {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .input-panel textarea:focus,
[data-theme="dark"] .output-panel textarea:focus {
    border-color: #18a058;
    box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.2);
}

[data-theme="dark"] .input-panel textarea::placeholder,
[data-theme="dark"] .output-panel textarea::placeholder {
    color: #666;
}

[data-theme="dark"] .language-selector {
    color: #e0e0e0;
}

[data-theme="dark"] .language-selector label {
    color: #e0e0e0;
}

[data-theme="dark"] .language-selector select,
[data-theme="dark"] .format-selector select {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .language-selector select:focus,
[data-theme="dark"] .format-selector select:focus {
    border-color: #18a058;
    box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.2);
}

/* Dark Mode - JSON Validator */
[data-theme="dark"] .json-validator-interface,
[data-theme="dark"] .converter-interface {
    color: #e0e0e0;
}

[data-theme="dark"] .jsonlint-header h2 {
    color: #e0e0e0;
}

[data-theme="dark"] .json-file-upload .upload-area {
    background: #1a1a1a;
    border-color: #444;
}

[data-theme="dark"] .json-file-upload .upload-area:hover,
[data-theme="dark"] .json-file-upload .upload-area.dragover {
    background: #2a2a2a;
    border-color: #18a058;
}

[data-theme="dark"] .json-file-upload .upload-content p {
    color: #999;
}

[data-theme="dark"] .json-editor-wrapper {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .json-editor,
[data-theme="dark"] .json-output {
    background: #2a2a2a;
    color: #e0e0e0;
    border-color: #444;
}

[data-theme="dark"] .json-editor:focus,
[data-theme="dark"] .json-output:focus {
    border-color: #18a058;
    box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.2);
}

[data-theme="dark"] .format-options-panel {
    background: #1a1a1a;
}

[data-theme="dark"] .format-options {
    border-bottom-color: #444;
}

[data-theme="dark"] .formatted-output-section h3 {
    color: #e0e0e0;
}

/* Dark Mode - Markdown Preview */
[data-theme="dark"] .markdown-preview-interface {
    color: #e0e0e0;
}

[data-theme="dark"] .editor-panel h3,
[data-theme="dark"] .preview-panel h3 {
    color: #e0e0e0;
}

[data-theme="dark"] #markdown-input {
    background: #2a2a2a;
    color: #e0e0e0;
    border-color: #444;
}

[data-theme="dark"] #markdown-input:focus {
    border-color: #18a058;
    box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.2);
}

[data-theme="dark"] .markdown-preview-content {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

/* Dark Mode - General Elements */
[data-theme="dark"] .format-selector label {
    color: #e0e0e0;
}

[data-theme="dark"] .schema-results,
[data-theme="dark"] .compare-results,
[data-theme="dark"] .replace-output {
    background: #1a1a1a;
    color: #e0e0e0;
}

[data-theme="dark"] .error-list code,
[data-theme="dark"] .diff-list code {
    background: #2a2a2a;
    color: #e0e0e0;
}

[data-theme="dark"] .error-message {
    background: #3a1a1a;
    color: #f44336;
    border-color: #5a2d2d;
}

[data-theme="dark"] .format-swap {
    background: #2a2a2a;
    color: #e0e0e0;
}

[data-theme="dark"] .format-swap:hover {
    background: #3a3a3a;
}

/* Dark Mode - Generator Tools (UUID, ULID, etc.) */
[data-theme="dark"] .generator-interface {
    color: #e0e0e0;
}

[data-theme="dark"] .generator-options {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

[data-theme="dark"] .generator-options .option-group label {
    color: #e0e0e0;
}

[data-theme="dark"] .generator-options select,
[data-theme="dark"] .generator-options input[type="number"],
[data-theme="dark"] .generator-options input[type="text"] {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .generator-options select:focus,
[data-theme="dark"] .generator-options input:focus {
    border-color: #18a058;
    box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.2);
}

[data-theme="dark"] .results-list {
    margin-top: 15px;
}

[data-theme="dark"] .result-item {
    background: #2a2a2a;
    border-color: #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
}

[data-theme="dark"] .result-value {
    color: #e0e0e0;
    font-family: monospace;
    font-size: 14px;
}

[data-theme="dark"] .btn-copy {
    background: #3a3a3a;
    border: 1px solid #444;
    color: #e0e0e0;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

[data-theme="dark"] .btn-copy:hover {
    background: #4a4a4a;
}

/* Dark Mode - Text Tools */
[data-theme="dark"] .text-tool-interface {
    color: #e0e0e0;
}

[data-theme="dark"] .tool-options {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

[data-theme="dark"] .tool-options .option-group label {
    color: #e0e0e0;
}

[data-theme="dark"] .tool-options select,
[data-theme="dark"] .tool-options input[type="text"],
[data-theme="dark"] .tool-options input[type="number"] {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .tool-options select:focus,
[data-theme="dark"] .tool-options input:focus {
    border-color: #18a058;
    box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.2);
}

[data-theme="dark"] .tool-options input[type="checkbox"],
[data-theme="dark"] .generator-options input[type="checkbox"] {
    accent-color: #18a058;
}

[data-theme="dark"] .text-tool-interface .input-section,
[data-theme="dark"] .text-tool-interface .results-section {
    background: transparent;
}

[data-theme="dark"] .text-tool-interface .input-section label,
[data-theme="dark"] .text-tool-interface .results-section h3 {
    color: #e0e0e0;
}

[data-theme="dark"] .generator-interface .results-section,
[data-theme="dark"] .text-tool-interface .results-section {
    background: #1a1a1a;
    border-color: #18a058;
    padding: 20px;
    border-radius: 8px;
}

[data-theme="dark"] .generator-interface .results-section h3 {
    color: #e0e0e0;
}

[data-theme="dark"] #input-text,
[data-theme="dark"] #output-text,
[data-theme="dark"] #text1,
[data-theme="dark"] #text2 {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] #input-text:focus,
[data-theme="dark"] #output-text:focus,
[data-theme="dark"] #text1:focus,
[data-theme="dark"] #text2:focus {
    border-color: #18a058;
    box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.2);
}

[data-theme="dark"] #input-text::placeholder,
[data-theme="dark"] #output-text::placeholder,
[data-theme="dark"] #text1::placeholder,
[data-theme="dark"] #text2::placeholder {
    color: #666;
}

/* Dark Mode - Stats Section (Word Counter) */
[data-theme="dark"] .stats-section {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

[data-theme="dark"] .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

[data-theme="dark"] .stat-item {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #444;
}

[data-theme="dark"] .stat-label {
    color: #999;
    font-size: 12px;
    margin-bottom: 8px;
}

[data-theme="dark"] .stat-value {
    color: #18a058;
    font-size: 24px;
    font-weight: 600;
}

/* Dark Mode - Text Diff */
[data-theme="dark"] .diff-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

[data-theme="dark"] .diff-inputs .input-panel label {
    color: #e0e0e0;
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

[data-theme="dark"] .diff-view {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 15px;
    font-family: monospace;
    font-size: 13px;
}

[data-theme="dark"] .diff-line {
    padding: 4px 8px;
    margin: 2px 0;
}

[data-theme="dark"] .diff-line.diff-equal {
    color: #e0e0e0;
}

[data-theme="dark"] .diff-line.diff-added {
    background: #1a3a1a;
    color: #4caf50;
}

[data-theme="dark"] .diff-line.diff-removed {
    background: #3a1a1a;
    color: #f44336;
}

[data-theme="dark"] .diff-line .line-num {
    color: #666;
    margin-right: 10px;
    display: inline-block;
    min-width: 30px;
}

[data-theme="dark"] .diff-line .line-content.added {
    color: #4caf50;
}

[data-theme="dark"] .diff-line .line-content.removed {
    color: #f44336;
}

[data-theme="dark"] #diff-results {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #444;
}

[data-theme="dark"] #diff-results h3 {
    color: #e0e0e0;
}

/* Dark Mode - Time Tools (Date Calculator, Timestamp Converter, Cron Generator) */
[data-theme="dark"] .time-tool-interface {
    color: #e0e0e0;
}

[data-theme="dark"] .converter-panel,
[data-theme="dark"] .calculator-panel,
[data-theme="dark"] .cron-panel {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

[data-theme="dark"] .converter-panel .input-section,
[data-theme="dark"] .calculator-panel .input-section,
[data-theme="dark"] .operation-section,
[data-theme="dark"] .cron-builder {
    margin-bottom: 20px;
}

[data-theme="dark"] .converter-panel label,
[data-theme="dark"] .calculator-panel label,
[data-theme="dark"] .cron-panel label {
    color: #e0e0e0;
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

[data-theme="dark"] #timestamp-input,
[data-theme="dark"] #timestamp-unit,
[data-theme="dark"] #start-date,
[data-theme="dark"] #end-date,
[data-theme="dark"] #operation,
[data-theme="dark"] #amount,
[data-theme="dark"] #unit,
[data-theme="dark"] .cron-builder input[type="text"],
[data-theme="dark"] .cron-builder select {
    background: #2a2a2a;
    border: 1px solid #444;
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 4px;
}

[data-theme="dark"] #timestamp-input:focus,
[data-theme="dark"] #timestamp-unit:focus,
[data-theme="dark"] #start-date:focus,
[data-theme="dark"] #end-date:focus,
[data-theme="dark"] #operation:focus,
[data-theme="dark"] #amount:focus,
[data-theme="dark"] #unit:focus,
[data-theme="dark"] .cron-builder input:focus,
[data-theme="dark"] .cron-builder select:focus {
    border-color: #18a058;
    box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.2);
    outline: none;
}

[data-theme="dark"] #timestamp-input::placeholder,
[data-theme="dark"] #amount::placeholder,
[data-theme="dark"] .cron-builder input::placeholder {
    color: #666;
}

[data-theme="dark"] #timestamp-results,
[data-theme="dark"] #calc-results,
[data-theme="dark"] .cron-output {
    background: #1a1a1a;
    border: 1px solid #18a058;
    padding: 20px;
    border-radius: 8px;
}

[data-theme="dark"] #timestamp-results h3,
[data-theme="dark"] #calc-results h3,
[data-theme="dark"] .cron-output h3 {
    color: #e0e0e0;
    margin-top: 0;
}

[data-theme="dark"] .result-grid {
    display: grid;
    gap: 15px;
}

[data-theme="dark"] .result-grid .result-item {
    background: #2a2a2a;
    border: 1px solid #444;
    padding: 12px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-theme="dark"] .result-grid .result-item label {
    color: #999;
    font-size: 13px;
    margin-bottom: 0;
}

[data-theme="dark"] .result-value {
    color: #e0e0e0;
    font-family: monospace;
    font-size: 14px;
    flex: 1;
    margin: 0 10px;
}

[data-theme="dark"] .btn-copy-small {
    background: #3a3a3a;
    border: 1px solid #444;
    color: #e0e0e0;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

[data-theme="dark"] .btn-copy-small:hover {
    background: #4a4a4a;
}

[data-theme="dark"] .operation-section {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

[data-theme="dark"] .cron-expression {
    background: #2a2a2a;
    border: 1px solid #444;
    padding: 15px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 16px;
    color: #4caf50;
    text-align: center;
    margin: 15px 0;
}

[data-theme="dark"] .cron-description {
    background: #2a2a2a;
    border: 1px solid #444;
    padding: 12px;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 14px;
}

/* Dark Mode - Encoding Tools (Base64, URL, HTML, Binary, Hex, JWT) */
[data-theme="dark"] .encoding-interface {
    color: #e0e0e0;
}

[data-theme="dark"] .mode-selector {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
}

[data-theme="dark"] .mode-selector label {
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

[data-theme="dark"] .mode-selector input[type="radio"] {
    accent-color: #18a058;
}

[data-theme="dark"] .encoding-interface .input-panel,
[data-theme="dark"] .encoding-interface .output-panel {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

[data-theme="dark"] .encoding-interface .input-panel h3,
[data-theme="dark"] .encoding-interface .output-panel h3 {
    color: #e0e0e0;
    margin-top: 0;
    margin-bottom: 15px;
}

[data-theme="dark"] .encoding-interface textarea {
    background: #2a2a2a;
    border: 1px solid #444;
    color: #e0e0e0;
    padding: 12px;
    border-radius: 4px;
    font-family: monospace;
    width: 100%;
}

[data-theme="dark"] .encoding-interface textarea:focus {
    border-color: #18a058;
    box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.2);
    outline: none;
}

[data-theme="dark"] .encoding-interface textarea::placeholder {
    color: #666;
}

[data-theme="dark"] .encoding-options {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

[data-theme="dark"] .encoding-options h3 {
    color: #e0e0e0;
    margin-top: 0;
}

[data-theme="dark"] .encoding-options .option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

[data-theme="dark"] .encoding-options label {
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="dark"] .encoding-options input[type="checkbox"] {
    accent-color: #18a058;
}

[data-theme="dark"] .jwt-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

[data-theme="dark"] .jwt-section {
    background: #2a2a2a;
    border: 1px solid #444;
    padding: 15px;
    border-radius: 6px;
}

[data-theme="dark"] .jwt-section h4 {
    color: #e0e0e0;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

[data-theme="dark"] .jwt-section pre {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 12px;
    border-radius: 4px;
    color: #4caf50;
    font-family: monospace;
    font-size: 13px;
    overflow-x: auto;
    margin: 0;
}

[data-theme="dark"] .jwt-expired {
    background: #3a1a1a;
    color: #f44336;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 13px;
}

[data-theme="dark"] .jwt-valid {
    background: #1a3a1a;
    color: #4caf50;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 13px;
}

[data-theme="dark"] .encoded-results-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

[data-theme="dark"] .encoded-item {
    background: #2a2a2a;
    border: 1px solid #444;
    padding: 15px;
    border-radius: 6px;
}

[data-theme="dark"] .encoded-item label {
    color: #e0e0e0;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

[data-theme="dark"] .encoded-item textarea {
    background: #1a1a1a;
    border: 1px solid #444;
    color: #e0e0e0;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    width: 100%;
    resize: vertical;
}

[data-theme="dark"] .encoded-item .error {
    color: #f44336;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 768px) {
    [data-theme="dark"] .diff-inputs {
        grid-template-columns: 1fr;
    }
}

/* More Responsive Design */
@media (max-width: 768px) {
    .converter-interface,
    .json-validator-interface,
    .regex-tester-interface {
        padding: 10px;
    }

    .input-panel,
    .output-panel {
        padding: 15px;
    }

    .format-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .flags-checkboxes {
        flex-direction: column;
    }

    .pattern-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .use-pattern-btn {
        margin: 10px 0 0 0;
        align-self: flex-end;
    }

    /* JSON Validator Responsive */
    .jsonlint-header h2 {
        font-size: 1.2rem;
    }

    .json-editor {
        min-height: 300px;
        padding: 15px;
        font-size: 13px;
    }

    .json-actions-bar {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .json-actions-bar .validation-status {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .json-actions-bar .action-buttons {
        flex-wrap: wrap;
    }

    .json-actions-bar .action-buttons .btn {
        flex: 1;
        min-width: 100px;
    }
}

/* Text Tools Interface Styles */
.text-tool-interface {
    width: 100%;
}

.text-tool-interface .input-section {
    width: 100%;
    margin-bottom: 20px;
}

.text-tool-interface .input-section textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: 14px;
    resize: vertical;
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #333);
}

.text-tool-interface .input-section textarea:focus {
    outline: none;
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

[data-theme="dark"] .text-tool-interface .input-section textarea {
    background: var(--bg-primary, #141414);
    color: var(--text-primary, #f5f5f5);
    border-color: var(--border-color, #232323);
}

[data-theme="dark"] .text-tool-interface .input-section textarea:focus {
    border-color: var(--primary-color, #18a058);
    box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.2);
}

/* Encryption Tool Styles */
.encryption-tool-interface {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.encryption-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

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

.encryption-section .section-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0 0 20px 0;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.encrypt-form,
.decrypt-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.encrypt-options,
.decrypt-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.input-group label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.input-group textarea,
.input-group input[type="text"],
.input-group select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.input-group textarea:focus,
.input-group input[type="text"]:focus,
.input-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.input-group textarea.monospace,
.input-group input[type="text"].monospace {
    font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
}

.input-group textarea[readonly] {
    background-color: #f8f9fa;
    cursor: default;
}

.key-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.key-input-wrapper input {
    flex: 1;
    padding-right: 35px;
}

.btn-clear-key {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}

.btn-clear-key:hover {
    color: #333;
}

.output-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.output-actions .btn {
    padding: 6px 12px;
    font-size: 13px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .encryption-section {
        background: #1c1c1c;
        border-color: #333;
    }

    .encryption-section .section-title {
        color: rgba(255, 255, 255, 0.9);
        border-bottom-color: #333;
    }

    .input-group label {
        color: rgba(255, 255, 255, 0.7);
    }

    .input-group textarea,
    .input-group input[type="text"],
    .input-group select {
        background: #333;
        border-color: #444;
        color: rgba(255, 255, 255, 0.82);
    }

    .input-group textarea:focus,
    .input-group input[type="text"]:focus,
    .input-group select:focus {
        border-color: #1ea54c;
        box-shadow: 0 0 0 3px rgba(30, 165, 76, 0.1);
    }

    .input-group textarea[readonly] {
        background-color: #2a2a2a;
    }

    .btn-clear-key {
        color: #999;
    }

    .btn-clear-key:hover {
        color: rgba(255, 255, 255, 0.9);
    }
}

/* Responsive design for encryption tool */
@media (max-width: 768px) {
    .encrypt-options,
    .decrypt-options {
        grid-template-columns: 1fr;
    }

    .encryption-tool-interface {
        padding: 15px;
    }

    .encryption-section {
        padding: 20px;
    }
}

/* QR Code Generator Styles */
.qr-generator-interface {
    max-width: 900px;
    margin: 0 auto;
}

.qr-generator-interface .input-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.qr-generator-interface .input-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #333;
}

.input-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.input-tabs .tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.input-tabs .tab-btn:hover {
    color: #007bff;
}

.input-tabs .tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.tab-content {
    min-height: 200px;
}

.qr-generator-interface textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    background: #fff;
}

.qr-generator-interface textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.file-drop-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.file-drop-zone:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.file-drop-zone.drag-over {
    border-color: #007bff;
    background: #e7f3ff;
    transform: scale(1.02);
}

.drop-zone-content .upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.drop-zone-content .drop-text {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 10px 0 5px 0;
}

.drop-zone-content .drop-subtext {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.btn-clear-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-clear-file:hover {
    background: #c82333;
}

.qr-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.qr-options .option-group {
    gap: 10px;
}

.qr-options .option-group label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.qr-options input[type="number"],
.qr-options select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.qr-generator-interface .action-section {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.qr-generator-interface .results-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
}

.qr-generator-interface .results-section h3 {
    text-align: center;
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.2rem;
}

/* Barcode Generator Styles */
.barcode-generator-interface {
    max-width: 900px;
    margin: 0 auto;
}

.barcode-generator-interface .input-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.barcode-generator-interface .input-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #333;
}

.barcode-generator-interface input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    background: #fff;
}

.barcode-generator-interface input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.barcode-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    flex-wrap: wrap;
}

.barcode-options .option-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.barcode-options .option-group label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.barcode-options input[type="number"],
.barcode-options select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.barcode-generator-interface .action-section {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.barcode-generator-interface .results-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
}

.barcode-generator-interface .results-section h3 {
    text-align: center;
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.2rem;
}

/* Dark Mode - QR Code & Barcode Generator */
[data-theme="dark"] .qr-generator-interface .input-section,
[data-theme="dark"] .barcode-generator-interface .input-section {
    background: #1a1a1a;
}

[data-theme="dark"] .qr-generator-interface .input-section h3,
[data-theme="dark"] .barcode-generator-interface .input-section h3 {
    color: #e0e0e0;
}

[data-theme="dark"] .input-tabs {
    border-bottom-color: #444;
}

[data-theme="dark"] .input-tabs .tab-btn {
    color: #999;
}

[data-theme="dark"] .input-tabs .tab-btn:hover {
    color: #18a058;
}

[data-theme="dark"] .input-tabs .tab-btn.active {
    color: #18a058;
    border-bottom-color: #18a058;
}

[data-theme="dark"] .qr-generator-interface textarea,
[data-theme="dark"] .barcode-generator-interface input[type="text"] {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .qr-generator-interface textarea:focus,
[data-theme="dark"] .barcode-generator-interface input[type="text"]:focus {
    border-color: #18a058;
    box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.2);
}

[data-theme="dark"] .file-drop-zone {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .file-drop-zone:hover {
    border-color: #18a058;
    background: #2a3a2a;
}

[data-theme="dark"] .file-drop-zone.drag-over {
    border-color: #18a058;
    background: #1a3a1a;
}

[data-theme="dark"] .drop-zone-content .drop-text {
    color: #e0e0e0;
}

[data-theme="dark"] .drop-zone-content .drop-subtext {
    color: #999;
}

[data-theme="dark"] .qr-options,
[data-theme="dark"] .barcode-options {
    background: #1a1a1a;
}

[data-theme="dark"] .qr-options .option-group label,
[data-theme="dark"] .barcode-options .option-group label {
    color: #e0e0e0;
}

[data-theme="dark"] .qr-options input[type="number"],
[data-theme="dark"] .qr-options select,
[data-theme="dark"] .barcode-options input[type="number"],
[data-theme="dark"] .barcode-options select {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

[data-theme="dark"] .qr-options input:focus,
[data-theme="dark"] .qr-options select:focus,
[data-theme="dark"] .barcode-options input:focus,
[data-theme="dark"] .barcode-options select:focus {
    border-color: #18a058;
    box-shadow: 0 0 0 3px rgba(24, 160, 88, 0.2);
}

[data-theme="dark"] .qr-generator-interface .results-section,
[data-theme="dark"] .barcode-generator-interface .results-section {
    background: #1a1a1a;
    border: 1px solid #18a058;
}

[data-theme="dark"] .qr-generator-interface .results-section h3,
[data-theme="dark"] .barcode-generator-interface .results-section h3 {
    color: #e0e0e0;
}

/* Responsive Design - QR Code & Barcode Generator */
@media (max-width: 768px) {
    .qr-options,
    .barcode-options {
        flex-direction: column;
        gap: 15px;
    }

    .qr-options .option-group,
    .barcode-options .option-group {
        width: 100%;
    }

    .qr-options input[type="number"],
    .qr-options select,
    .barcode-options input[type="number"],
    .barcode-options select {
        width: 100%;
    }
}

/* ===== Color Tools Styles ===== */

/* Color Converter Interface */
.color-converter-interface {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.color-converter-interface .input-section {
    margin-bottom: 20px;
}

.color-converter-interface .input-section h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.color-converter-interface .format-selector {
    margin-bottom: 15px;
}

.color-converter-interface .format-selector label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.color-converter-interface .format-selector select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
}

.color-converter-interface #color-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 10px;
}

.color-converter-interface #color-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.color-converter-interface .color-preview-small {
    width: 60px;
    height: 60px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-top: 10px;
    background: #f0f0f0;
}

.color-converter-interface .output-section {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.color-converter-interface .output-section h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.color-converter-interface .converted-colors {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.color-converter-interface .color-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.color-converter-interface .color-swatch {
    width: 80px;
    height: 80px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    flex-shrink: 0;
}

.color-converter-interface .color-info {
    flex: 1;
}

.color-converter-interface .color-info > div {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-converter-interface .color-info strong {
    min-width: 60px;
    color: var(--text-secondary);
}

.color-converter-interface .color-value {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    color: var(--text-primary);
}

.color-converter-interface .btn-copy-small {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.color-converter-interface .btn-copy-small:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

/* Color Palette Generator Interface */
.palette-generator-interface {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.palette-generator-interface .input-section {
    margin-bottom: 20px;
}

.palette-generator-interface .input-section h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.palette-generator-interface .input-section input[type="color"] {
    width: 80px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    margin-right: 15px;
}

.palette-generator-interface .input-section input[type="text"] {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    width: 150px;
}

.palette-generator-interface .input-section input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.palette-generator-interface .palette-options {
    margin-bottom: 20px;
}

.palette-generator-interface .option-group {
    margin-bottom: 15px;
}

.palette-generator-interface .option-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.palette-generator-interface .option-group select {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
}

.palette-generator-interface .option-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.palette-generator-interface .palette-results {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.palette-generator-interface .palette-results h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.palette-generator-interface .palette-colors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.palette-generator-interface .palette-color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.palette-generator-interface .palette-color-item .color-swatch {
    width: 100%;
    height: 80px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
}

.palette-generator-interface .palette-color-item .color-hex {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    color: var(--text-primary);
    font-size: 12px;
}

/* Color Picker Interface - Additional styles for ColorToolsTool */
.color-picker-interface .color-preview {
    width: 100%;
    height: 200px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.color-picker-interface .color-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.color-picker-interface .color-inputs {
    margin-bottom: 20px;
}

.color-picker-interface .input-group {
    margin-bottom: 15px;
}

.color-picker-interface .input-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.color-picker-interface .input-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
}

.color-picker-interface .input-group input[type="number"] {
    width: 80px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    margin-right: 10px;
}

.color-picker-interface .color-sliders {
    margin-bottom: 20px;
}

.color-picker-interface .slider-group {
    margin-bottom: 15px;
}

.color-picker-interface .slider-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.color-picker-interface .slider-group input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    outline: none;
    -webkit-appearance: none;
}

.color-picker-interface .slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.color-picker-interface .slider-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.color-picker-interface .color-actions {
    display: flex;
    gap: 10px;
}

/* Dark mode adjustments for color tools */
[data-theme="dark"] .color-converter-interface .output-section,
[data-theme="dark"] .palette-generator-interface .palette-results {
    background: #1a1a1a;
    border-color: #333;
}

[data-theme="dark"] .color-converter-interface .color-item,
[data-theme="dark"] .palette-generator-interface .palette-color-item {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .color-converter-interface .color-preview-small {
    background: #2a2a2a;
    border-color: #444;
}

/* Responsive Design - Color Tools */
@media (max-width: 768px) {
    .color-converter-interface,
    .palette-generator-interface,
    .color-picker-interface {
        padding: 15px;
    }

    .palette-generator-interface .palette-colors {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .color-converter-interface .color-item {
        flex-direction: column;
    }

    .color-converter-interface .color-swatch {
        width: 100%;
        height: 100px;
    }
}

/* Color Picker Styles */
.color-picker-interface {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.color-picker-main {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.color-wheel-container {
    position: relative;
    flex-shrink: 0;
}

#color-wheel {
    border-radius: 50%;
    cursor: crosshair;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 3px solid #e0e0e0;
    display: block;
}

.color-wheel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.color-wheel-indicator {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: none;
    pointer-events: none;
    z-index: 10;
}

.color-preview-section {
    flex: 1;
    min-width: 200px;
}

.color-preview-large {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 3px solid #e0e0e0;
    position: relative;
    overflow: hidden;
}

.color-preview-text {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
    letter-spacing: 1px;
}

.color-formats-section {
    margin-top: 30px;
}

.color-formats-section h3 {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
}

.color-formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.color-format-box {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    position: relative;
}

.color-format-box:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}

.color-format-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    min-width: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-format-value {
    flex: 1;
    font-size: 14px;
    font-family: 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 4px 0;
}

.color-format-copy {
    background: #2563eb;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 36px;
}

.color-format-copy:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

.color-format-copy:active {
    transform: scale(0.95);
}

.color-format-copy .copy-icon {
    font-size: 16px;
    line-height: 1;
}

/* Dark mode support for color picker */
[data-theme="dark"] .color-picker-interface {
    color: rgba(255, 255, 255, 0.9);
}

@media (prefers-color-scheme: dark) {
    .color-picker-interface {
        color: rgba(255, 255, 255, 0.9);
    }

    #color-wheel {
        border-color: #444;
    }

    .color-preview-large {
        border-color: #444;
    }

    .color-formats-section h3 {
        color: rgba(255, 255, 255, 0.9);
    }

    .color-format-box {
        background: #1c1c1c;
        border-color: #333;
    }

    .color-format-box:hover {
        border-color: #18a058;
        box-shadow: 0 2px 8px rgba(24, 160, 88, 0.2);
    }

    .color-format-label {
        color: rgba(255, 255, 255, 0.7);
    }

    .color-format-value {
        color: rgba(255, 255, 255, 0.9);
    }

    .color-format-copy {
        background: #18a058;
    }

    .color-format-copy:hover {
        background: #159048;
    }
}

[data-theme="dark"] #color-wheel {
    border-color: #444;
}

[data-theme="dark"] .color-preview-large {
    border-color: #444;
}

[data-theme="dark"] .color-formats-section h3 {
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .color-format-box {
    background: #1c1c1c;
    border-color: #333;
}

[data-theme="dark"] .color-format-box:hover {
    border-color: #18a058;
    box-shadow: 0 2px 8px rgba(24, 160, 88, 0.2);
}

[data-theme="dark"] .color-format-label {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .color-format-value {
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .color-format-copy {
    background: #18a058;
}

[data-theme="dark"] .color-format-copy:hover {
    background: #159048;
}

/* Responsive design for color picker */
@media (max-width: 768px) {
    .color-picker-main {
        flex-direction: column;
        align-items: center;
    }

    .color-wheel-container {
        width: 100%;
        max-width: 300px;
    }

    #color-wheel {
        width: 100%;
        height: auto;
    }

    .color-preview-section {
        width: 100%;
    }

    .color-formats-grid {
        grid-template-columns: 1fr;
    }

    .color-format-box {
        flex-wrap: wrap;
    }

    .color-format-label {
        min-width: auto;
        width: 100%;
    }

    .color-format-value {
        width: 100%;
    }

    .color-format-copy {
        width: 100%;
    }
}

/* ====================================
   Color Picker Tab Interface
   ==================================== */

.color-picker-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: #3498db;
}

.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

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

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

/* ====================================
   Image Picker Interface
   ==================================== */

.image-picker-container {
    min-height: 400px;
}

.image-upload-area {
    border: 3px dashed #ddd;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.image-upload-area:hover {
    border-color: #3498db;
    background: #f0f8ff;
}

.image-upload-area.dragover {
    border-color: #3498db;
    background: #e8f4fd;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.upload-prompt h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.upload-prompt p {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

#browse-image-btn {
    margin-top: 20px;
}

.image-canvas-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.image-canvas-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    cursor: crosshair;
}

#image-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.image-picker-crosshair {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 10;
}

.image-picker-crosshair::before,
.image-picker-crosshair::after {
    content: '';
    position: absolute;
    background: #fff;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.image-picker-crosshair::before {
    left: 50%;
    top: -20px;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
}

.image-picker-crosshair::after {
    top: 50%;
    left: -20px;
    transform: translateY(-50%);
    height: 2px;
    width: 60px;
}

/* ====================================
   Color Map Picker Interface
   ==================================== */

.colormap-picker-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    padding: 20px;
}

.color-gradient-box {
    position: relative;
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: crosshair;
}

#color-gradient {
    display: block;
}

.gradient-picker-indicator {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3), 0 0 8px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 10;
}

.hue-slider-box {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hue-slider-box label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.hue-slider-box {
    position: relative;
}

#hue-slider {
    display: block;
    width: 100%;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hue-slider-indicator {
    position: absolute;
    top: 50%;
    width: 4px;
    height: 40px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3), 0 0 8px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 10;
}

/* ====================================
   Color Preview & Formats (Shared)
   ==================================== */

.color-preview-formats {
    margin-top: 30px;
}

.color-preview-section {
    text-align: center;
    margin-bottom: 30px;
}

.color-preview-large {
    width: 200px;
    height: 100px;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.color-preview-text {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 16px;
    border-radius: 4px;
}

/* Dark mode styles */
[data-theme="dark"] .tab-btn {
    color: #aaa;
}

[data-theme="dark"] .tab-btn:hover {
    color: #3498db;
}

[data-theme="dark"] .tab-btn.active {
    color: #3498db;
}

[data-theme="dark"] .image-upload-area {
    background: #1e1e1e;
    border-color: #444;
}

[data-theme="dark"] .image-upload-area:hover {
    border-color: #3498db;
    background: #252525;
}

[data-theme="dark"] .upload-prompt h3 {
    color: #e0e0e0;
}

[data-theme="dark"] .upload-prompt p {
    color: #aaa;
}

[data-theme="dark"] .upload-hint {
    color: #777;
}
