* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #7209b7;
    --light-bg: #f8f9fa;
    --dark-text: #2b2d42;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
    --transition: all 0.2s ease;
}

body {
    background-color: #f5f5f5;
    background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark-text);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

h1 {
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-weight: 600;
}

.input-section {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-start;
}

textarea {
    flex: 1;
    min-width: 300px;
    height: 100px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-family: monospace;
    resize: vertical;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    transition: var(--transition);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 150px;
}

.btn i {
    font-size: 1rem;
}

.primary {
    background-color: var(--primary-color);
    color: white;
}

.primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.secondary {
    background-color: white;
    color: var(--dark-text);
    border: 1px solid #e0e0e0;
}

.secondary:hover {
    background-color: #f8f9fa;
    border-color: #d0d0d0;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.json-viewer {
    background: var(--light-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    font-family: monospace;
    white-space: pre-wrap;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.json-tree {
    margin-top: 20px;
}

.tree-node {
    margin-left: 20px;
    transition: var(--transition);
}

.tree-content {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 0;
    border-radius: 4px;
}

.tree-content:hover {
    background-color: rgba(0,0,0,0.03);
}

.collapse-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0 5px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: var(--transition);
}

.collapse-btn:hover {
    background-color: rgba(0,0,0,0.1);
    color: var(--primary-color);
}

.key {
    color: #881391;
    font-weight: bold;
}

.string {
    color: #22863a;
}

.number {
    color: #005cc5;
}

.boolean {
    color: #005cc5;
}

.null {
    color: #6f42c1;
}

.search-box {
    margin-bottom: 20px;
    padding: 12px;
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.hidden {
    display: none;
}

.error {
    color: #dc3545;
    margin-top: 10px;
}

.log-entry {
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 0;
    margin-bottom: 15px;
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-content {
    padding: 15px;
    background-color: white;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    border: 1px solid #e0e0e0;
    border-top: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.log-entry-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    background: var(--light-bg);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.log-entry-header:hover {
    background: #e9e9e9;
    transform: translateY(-1px);
}

.log-entry-number {
    color: #666;
    font-size: 0.9em;
}

.log-entry-preview {
    color: #666;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.stats {
    margin-bottom: 20px;
    padding: 12px;
    background: var(--light-bg);
    border-radius: var(--border-radius);
    font-size: 0.9em;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    color: var(--secondary-color);
    font-weight: 500;
}

@media (min-width: 768px) {
    .input-section {
        flex-direction: row;
    }
    
    .button-group {
        flex-direction: column;
        justify-content: flex-start;
    }
    
    textarea {
        height: 120px;
    }
}

@media (max-width: 767px) {
    .button-group {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
    }
    
    .btn {
        flex: 1;
        min-width: 0;
    }
    
    textarea {
        width: 100%;
    }
}

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

.log-entry {
    animation: fadeIn 0.3s ease-out;
}

/* Focus styles */
*:focus {
    outline: none;
} 