:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --accent-hover: #2980b9;
    --bg-color: #eef2f5;
    --panel-bg: #ffffff;
    --border-color: #dfe6e9;
    --text-color: #2d3436;
    --text-secondary: #636e72;
    --header-bg: #f8f9fa;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Toolbar styling */
.actions {
    position: sticky;
    top: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.actions span {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary-color);
}

button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 10px;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.3);
}

button:active {
    transform: translateY(0);
}

/* Card Styling for Top Level Items */
.card {
    background: var(--panel-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

/* Group Headers */
.group-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
    transition: background-color 0.2s;
}

/* Top level header style */
.card>.group-header {
    background-color: var(--header-bg);
    padding: 15px 20px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
}

.card>.group-header:hover {
    background-color: #f1f2f6;
}

/* Nested header style */
.sub-group>.group-header {
    padding: 8px 10px;
    font-size: 0.95em;
    font-weight: 600;
    color: #57606f;
    margin: 4px 0;
    border-radius: 6px;
}

.sub-group>.group-header:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Toggle Arrow */
.group-header::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--text-secondary);
    margin-right: 12px;
    transition: transform 0.2s;
}

.group-header.collapsed::before {
    transform: rotate(-90deg);
}

/* Content Areas */
.group-content {
    transition: max-height 0.3s ease-out;
    /* Note: max-height anim requires JS or fixed height, plain hidden toggle is instant */
    /* Use display toggling for now as it's cleaner without complex CSS animation setup */
}

.card>.group-content {
    padding: 15px 20px;
}

.sub-group {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 2px solid #f1f2f6;
    margin-top: 8px;
    margin-bottom: 8px;
}

.group-content.hidden {
    display: none;
}

/* Form Fields */
.field-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f6fa;
}

.field-row:last-child {
    border-bottom: none;
}

.field-row:hover {
    background-color: #fafbfc;
}

.field-label {
    flex: 0 0 40%;
    font-size: 0.95em;
    color: var(--text-color);
    padding-right: 15px;
    font-weight: 500;
}

.field-key-raw {
    display: block;
    font-size: 0.8em;
    color: #b2bec3;
    font-family: 'Consolas', 'Monaco', monospace;
    margin-top: 2px;
}

input[type="number"],
input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: var(--primary-color);
    background-color: #fff;
    transition: all 0.2s;
}

input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

input:hover {
    border-color: #b2bec3;
}

/* Tutorial Box */
.tutorial-box {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tutorial-box h3 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    color: #856404;
}

.tutorial-box p {
    margin: 0;
    font-size: 0.95em;
}