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

:root {
    --md-sys-color-primary: #6750A4;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-surface: #FEF7FF;
    --md-sys-color-surface-container: #F3EDF7;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--md-sys-color-surface);
    color: #1C1B1F;
    margin: 2rem;
}

.drop-zone {
    border: 2px dashed var(--md-sys-color-primary);
    border-radius: 28px;
    padding: 3rem;
    text-align: center;
    background: var(--md-sys-color-surface-container);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #357abd;
    background: #f8f9ff;
    transform: translateY(-2px);
}

.drop-content {
    color: #4a90e2;
    font-size: 1.2rem;
}

.subtext {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.json-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3), 
                0 1px 3px 1px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.json-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2), 
                0 4px 8px 3px rgba(0,0,0,0.15);
}

.json-card h3 {
    color: #333;
    margin-top: 0;
}

.json-property {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.property-label {
    font-weight: 600;
    color: #2c3e50;
}

.property-value {
    color: #34495e;
    word-break: break-all;
}

/* 新增网格布局系统 */
#results {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.layout-controls {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

.layout-btn {
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-primary);
    border: none;
    border-radius: 20px;
    padding: 8px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.layout-btn:hover {
    background: #f3f4f6;
    border-color: #1b1f2415;
}

.layout-btn.active {
    background: #0969da;
    color: white;
    border-color: #0969da;
}

.header-controls {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-top: 1rem;
}

.history-panel {
    position: sticky;
    top: 20px;
    background: white;
    z-index: 100;
    max-height: 70vh;
    overflow-y: auto;
}

.history-link {
    color: #0969da;
    text-decoration: none;
}

.history-link:hover {
    text-decoration: underline;
}

/* GitHub风格caption样式 */
.json-property.caption {
    background: #f6f8fa;
    border-left: 4px solid #218bff;
}

.property-label.caption-label {
    color: #0969da;
    font-weight: 600;
}

body.dragover::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(33,139,255,0.1);
    border: 4px dashed #218bff;
    z-index: 1000;
    pointer-events: none;
}

.instructions details {
    margin: 1rem 0;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 0.5rem;
}

.instructions summary {
    cursor: pointer;
    color: #0969da;
}

@media (max-width: 768px) {
    #results {
        grid-template-columns: 1fr;
    }
}
