@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Fira Code', monospace;
    display: flex;
    justify-content: center;
    align-items: stretch;
    min-height: 100vh;
    background: linear-gradient(to top, #e0eafc, #cfdef3);
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: none;
    background-color: rgba(255, 255, 255, 0.6);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(100, 100, 100, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #333;
    display: flex;
    flex-direction: column;
}

.main-content {
    display: flex;
    gap: 20px;
    flex-grow: 1;
}

.panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.input-panel {
    min-width: 300px;
}

.output-panel {
    min-height: 400px; /* Or adjust as needed */
}

h1 {
    text-align: center;
    font-weight: 500;
    color: #3a7bd5;
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    height: 100%;
    min-height: 400px;
    padding: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.7);
    color: #333;
    font-family: 'Fira Code', monospace;
}

textarea::placeholder {
    color: #777;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

button {
    padding: 8px 16px;
    background: linear-gradient(90deg, #3a7bd5 0%, #00d2ff 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

button.raw-strings-on {
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
}

button:hover {
    box-shadow: 0 0 20px rgba(0, 150, 255, 0.5);
    transform: translateY(-2px);
}

#json-tree {
    margin-top: 0;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px;
    border-radius: 8px;
    font-size: 14px;
}

.tree ul {
    list-style-type: none;
    padding-left: 25px;
    border-left: 1px dashed rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
}

.tree li {
    position: relative;
}

.tree li ul {
    display: none;
}

.tree li.expanded > ul {
    display: block;
}

.toggle {
    cursor: pointer;
    margin-right: 8px;
    font-weight: bold;
    color: #3a7bd5;
    transition: transform 0.2s ease;
    display: inline-block;
}

.tree li.expanded .toggle {
    transform: rotate(90deg);
}

.tree li::before {
    content: "";
    position: absolute;
    top: 0.8em;
    left: -15px;
    border-top: 1px dashed rgba(0, 0, 0, 0.2);
    width: 15px;
    height: 1em;
}

.tree li:last-child::before {
   border-left: none;
}

.index {
    color: #fff;
    background-color: #3f51b5;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    margin-right: 5px;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.item-count {
    color: #777;
    margin-left: 8px;
    font-size: 0.9em;
}

.key {
    color: #c2185b; /* a pink/magenta */
}

.string {
    color: #00796b; /* a teal color */
    white-space: pre-wrap;
    word-break: break-all;
}

.number {
    color: #e64a19; /* a deep orange color */
}

.boolean {
    color: #512da8; /* a purplish color */
}

.null {
    color: #757575; /* a grey color */
}

.summary {
    color: #555;
}

.tree li.collapsible .summary {
    display: inline;
}

.tree li.collapsible.expanded .summary {
    display: none;
}

.root-array-info {
    color: #555;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-weight: 500;
    border: 1px solid rgba(0,0,0,0.08);
}

.tree ul.array-list::before,
.tree ul.array-list::after {
    content: '[';
    display: block;
    color: #555;
    padding-left: 5px;
}

.tree ul.array-list::after {
    content: ']';
} 