






/* JSON Tree Viewer Styles */
.tree-container {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    background: #fafafa;
    padding: 1rem;
    border-radius: 8px;
    min-height: 300px;
    overflow: auto;
}

.tree-node {
    margin-left: 20px;
    border-left: 1px dashed #dee2e6;
    padding-left: 10px;
}

.toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid #667eea;
    background: #fff;
    color: #667eea;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    margin-right: 5px;
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: #667eea;
    color: #fff;
}

.json-key { color: #800000; font-weight: bold; }
.json-string { color: #008000; }
.json-number { color: #0000ff; }
.json-boolean { color: #b22222; }
.json-null { color: #808080; }
.upload-section, .compression-settings {
            margin-bottom: 1.5rem;
        }
        .video-info {
            margin-top: 0.5rem;
            font-size: 0.9rem;
            color: #555;
        }
        .progress-bar {
            position: relative;
            width: 100%;
            height: 25px;
            background-color: #f3f3f3;
            border-radius: 5px;
            overflow: hidden;
            margin-top: 1rem;
        }
        .progress-fill {
            height: 100%;
            width: 0;
            background-color: #59955b;
            transition: width 0.3s;
        }
        .progress-text {
            position: absolute;
            width: 100%;
            text-align: center;
            line-height: 25px;
            color: #fff;
            font-weight: bold;
        }

        #downloadBtn {
    display: none; /* Initially hidden */
}



@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}



.tool-header {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
    padding: 3rem 1rem 2rem;
    position: relative;
    overflow: hidden;
}

.tool-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.tool-header-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}

.tool-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: pulse 2s infinite;
}

.tool-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #fff, #f0f8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.tool-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    border-radius: 2px;
}

.tool-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.tool-features {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.feature-tag {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.feature-tag:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.tool-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tool-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}



.tool-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(102, 126, 234, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.08);
}

.result-section {
    margin-top: 1rem;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.result-item label {
    min-width: 80px;
    font-weight: 500;
    color: #555;
}

.result-item input {
    flex: 1;
    font-family: 'Courier New', monospace;
}

.output-container {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.copy-btn:hover {
    background: rgba(102, 126, 234, 1);
    transform: scale(1.05);
}

.copy-success {
    background: #28a745 !important;
}

/* Code container for syntax highlighting */
.code-container {
    position: relative;
    display: block;
}

.code-container textarea {
    position: relative;
    z-index: 2;
    background: transparent;
}

.code-container pre {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 1rem;
    border: 2px solid transparent;
    background: #fafafa;
    pointer-events: none;
    z-index: 1;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    white-space: pre-wrap;
    overflow: hidden;
    border-radius: 12px;
}

/* Keyboard shortcut hints */
kbd {
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-family: monospace;
    margin-left: 8px;
    opacity: 0.7;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
}

.toast-success {
    background: #4CAF50;
}

.toast-error {
    background: #f44336;
}

/* Install button */
.install-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: bounce 2s infinite;
    transition: all 0.3s ease;
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Sample data button */
.btn-sample {
    background: linear-gradient(135deg, #17a2b8, #138496) !important;
    font-size: 0.9rem;
    padding: 0.6rem 1.5rem;
}

/* Language selector styling */
.language-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.language-selector label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.language-selector select {
    width: 120px;
    padding: 0.6rem 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    background: linear-gradient(135deg, #ffffff, #f8f9ff);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 0.65rem auto;
    padding-right: 2rem;
}

.language-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15), 0 4px 12px rgba(0,0,0,0.1);
    background: white;
}

.language-selector select:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: white;
}

/* Two-column editor layout */
.editor-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.input-section,
.output-section {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.section-header {
    background: linear-gradient(135deg, #f8f9ff, #e8f0fe);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.output-stats {
    font-size: 0.85rem;
    color: #666;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
}

.editor-layout .code-container {
    position: relative;
}

.editor-layout textarea {
    border: none;
    border-radius: 0;
    background: #fafafa;
    min-height: 400px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

.editor-layout .copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(102, 126, 234, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10;
}

/* Standard two-column layout for all tools */
.tool-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.tool-layout .input-section,
.tool-layout .output-section {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.tool-layout .section-header {
    background: linear-gradient(135deg, #f8f9ff, #e8f0fe);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-layout .section-content {
    padding: 1.5rem;
}

.tool-layout textarea {
    width: 100%;
    min-height: 300px;
    border: none;
    background: #fafafa;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    border-radius: 8px;
    padding: 1rem;
}

.tool-layout .copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(102, 126, 234, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10;
}

/* Responsive design */
@media (max-width: 768px) {
    .editor-layout,
    .tool-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .language-selector {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .language-selector label {
        margin-bottom: 0.5rem;
    }
    
    .language-selector select {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .section-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .output-stats {
        align-self: stretch;
        text-align: center;
    }
    
    .tool-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .tool-actions .btn {
        width: 100%;
    }
}

.error {
    color: #e74c3c;
}

.success {
    color: #27ae60;
}

@media (max-width: 768px) {
    
    
    
    
    
    
    
    
   
    
    .tool-header {
        padding: 2rem 1rem 1.5rem;
    }
    
    
    
    .tool-header h1 {
        font-size: 2.2rem;
    }
    
    .tool-header p {
        font-size: 1rem;
    }
    
    .tool-features {
        gap: 0.5rem;
    }
    
    .feature-tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }
    
    .tool-panel {
        padding: 1rem;
        border-radius: 15px;
    }
    
    .tool-actions {
        flex-direction: column;
    }
    
    
    
    .result-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .result-item label {
        min-width: auto;
    }
}