/* Reset & Base */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background: #f9f9f9;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
h1 {
    border-bottom: 2px solid #e1e4e8;
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: #24292e;
}

.info {
    color: #586069;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Controls */
.controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

button {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

button:active {
    transform: scale(0.98);
}

button:hover {
    opacity: 0.9;
}

button.flat {
    background-color: #2ea44f;
}

button.flat-blobs {
    background-color: #0366d6;
}

button.nested {
    background-color: #d73a49;
}

button.nested-blobs {
    background-color: #6f42c1;
}

/* Status Box */
.stats-box {
    background: #f1f8ff;
    border: 1px solid #c8e1ff;
    border-left: 4px solid #0366d6;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 30px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
    font-size: 13px;
}

.stats-box.error {
    background: #ffeef0;
    border-color: #f97583;
    border-left-color: #d73a49;
    color: #86181d;
}

/* Inputs */
.section-title {
    margin-top: 25px;
    font-weight: 600;
    color: #24292e;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

input {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input:focus {
    border-color: #0366d6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.3);
}

/* Cards */
.result-card {
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-card .kind {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6a737d;
    letter-spacing: 0.5px;
}

.result-card .score {
    float: right;
    background: #f6f8fa;
    padding: 2px 6px;
    border-radius: 4px;
    color: #586069;
}

.result-card .title {
    font-size: 16px;
    font-weight: 600;
    color: #24292e;
}

.result-card .meta {
    font-size: 13px;
    color: #586069;
    margin-top: 4px;
}

/* ... existing styles ... */

/* Interactive Results */
.result-card {
    /* ... existing properties ... */
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s, border-left-color 0.1s;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-left-color: #4a6cff;
    background-color: #fff;
}

.result-card:active {
    transform: scale(0.98);
}

/* Detail Box */
#detailBox {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    display: none; /* Hidden by default */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#detailBox h3 {
    margin-top: 0;
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
    color: #fff;
}

#detailBox pre {
    margin: 0;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}