* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

header p {
    opacity: 0.9;
    font-size: 0.95em;
}

main {
    padding: 30px;
}

section {
    margin-bottom: 30px;
}

h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.input-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.drop-zone {
    border: 2px dashed #667eea;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #f8f9ff;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.drop-zone.drag-over {
    background: #e8ebff;
    border-color: #5568d3;
}

.drop-zone p {
    color: #667eea;
    font-size: 1.1em;
}

#jsonInput {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    resize: vertical;
}

#jsonInput:focus {
    outline: none;
    border-color: #667eea;
}

.path-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.path-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.path-option:hover {
    background: #f8f9ff;
    border-color: #667eea;
}

.path-option input[type="radio"] {
    margin-right: 10px;
}

.path-option label {
    cursor: pointer;
    flex: 1;
}

.path-info {
    color: #666;
    font-size: 0.9em;
}

.custom-path {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.custom-path label {
    font-weight: 500;
    color: #333;
}

.custom-path input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.custom-path input:focus {
    outline: none;
    border-color: #667eea;
}

.preview-container {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.preview-table th,
.preview-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.preview-table th {
    background: #f8f9ff;
    color: #333;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.preview-table tr:hover {
    background: #f8f9ff;
}

.actions-section {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    background: #333;
    color: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background: #e53e3e;
}

.toast.success {
    background: #48bb78;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 1.5em;
    }

    main {
        padding: 20px;
    }

    .input-controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .custom-path {
        flex-direction: column;
        align-items: stretch;
    }

    .custom-path input {
        width: 100%;
    }
}
